Digital Solutions
iDigole Buyer ProtectioniDigole Buyer
My shopping cart
0 Items:
Secure Checkout
Top Rated Plus
Visit Our Live Auctions
99.9% Customer's Satisfaction
Forum : Digole Serial Display :

 Search Forum.. 
 Creat New Topic   Reply 

Neebie question on downloading font. Inputting size .....

I'm new but would like to try to download a font to my digole display using the SUF conmand.


The manual says to input 2 bytes of data length of font. LSB, MSB formation.   I looked at the "Walk_Man" file in the library.  The data appears to be 1018 bytes.  The program has a line indicating the font positon as "0" followed by four bytes,"7,15,22,25" which I assume is the size of the font data or 1018.

How did they arrive at that?  I would like to attemp downloading a font "u8g_fntpgm_uint8_t u8g_font_fur42n[2194] U8G_FONT_SECTION("u8g_font_fur42n"  to my display.  But I don't know how to correctly indicate the "2194 bytes" in the proper formulation as requred by Digole.

Can someone please take the time to explain how to calculate the proper intergers to input??


RE:Neebie question on downloading font. Inputting size .....

 unsigned char dx[]={0,7,15,22,25};
are the X position to display a char on screen.
mydisp.downloadUserFont(sizeof(myfont),myfont,section);  //section=0,1,2 or 3
This code is saving user font to display module, the detail of function "downloadUserFont" in file DigoleSerial.h is:
void downloadUserFont(int lon, const unsigned char *data, uint8_t sect) {
        uint8_t c;
        unsigned char b;
        write((uint8_t) (lon / 256));
        write((uint8_t) (lon % 256));
        b = 0;
        for (int j = 0; j < lon; j++) {
            c = pgm_read_byte_near(data + j);
            if ((++b) == 64) {
                b = 0, delay(_WRITE_DELAY);

RE:Neebie question on downloading font. Inputting size .....

Thank you for posting that....with a little online research...I see it now.

For others who might not see it let me share what I learned online.

Using an online calculator that can handle "dec to hex to binary" (mathisfun.com has a nice one) to do the number crunching, here is an example;

Find the MSB and LSB of a font size that is 2194 bytes.

2194 =0000100010010010 in 16bit binary.  Now separate that binary number into two 8 bit chunks of data.

2194 = 00001000      10010010    The 8 bits on the left are the MSB because a small bit change results in a large/significant change in the number value.  A bit change to the right 8 bits results in a much smaller./least signiicant change to our number.

Now plug each 8 bit binary number into the online calculator and we get;

MSB = 00001000 = 0x08 hex or 8 dec.

LSB = 10010010 = 0x92 hex or 146 dec.

To find the MSB/LSB in software use the math functions of "divide" and "modulo"

Font_size = 2194

MSB = Font_size [divide] 256

LSB = Font_size [modulo] 256

Hope this helps someone.

Copyright Digole Digital Solutions, 2008-2017. All rights reserved.
Powered by Victor Sun