Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - bluedog54

Pages: [1]
1
OLEDs / Large custom fonts in 8080 parallel mode
« on: July 16, 2015, 04:53:39 PM »
I made some custom numeric characters that are 7 bytes wide and 92 pixels tall.  In serial mode, they all display perfectly, but are too slow to keep up with my volume control operation. So I switched to 8080 parallel mode. Using your routines for custom characters (1 or 2 bytes wide and 11 pixels tall), I have my giant characters displaying perfectly for about 35 lines, then for no reason, the character starts at the top again and shifted to the left by a bunch of pixes, then after about another 35 pixes, it starts again at the top of the character, but the x is lined up again.  Also, it doesnt matter if I shift the y axis up or down, it still resets the y after the same number of rows are displayed.

Is there a limitation or something I should now about the OLED_WriteMemoryStart_160128RGB() command that you cant use it for over a maximum size area? 

 I have only 1 character loaded in ram (after the icon data)...its a 6. (I get the same results with other characters). 

// Large Font Start
const unsigned char chr_f7s_30[] =         // 7 bytes per row 53 pixels wide
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFE, 0x00,
0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x00,
0x07, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x1F, 0xFF,
0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x3F, 0xFF, 0x01, 0xFF, 0xF8, 0x00, 0x00, 0x7F, 0xF8, 0x00, 0x7F,
0xF8, 0x00, 0x00, 0x7F, 0xF0, 0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,
0xFE, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x1F, 0xFC, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x1F, 0xF8, 0x00,
0x00, 0x01, 0xFF, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x01,
0xFF, 0x80, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0x80,
0x1F, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x0F, 0xF0,
0x00, 0x00, 0x00, 0xFF, 0x80, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x0F, 0xF0, 0x00, 0x00,
0x00, 0xFF, 0x80, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0xFF,
0x80, 0x07, 0xF8, 0x00, 0x00, 0x01, 0xFF, 0x80, 0x07, 0xF8, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x07,
0xFC, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x07, 0xFC, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x03, 0xFE, 0x00,
0x00, 0x03, 0xFE, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x07, 0xFE, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x07,
0xFE, 0x00, 0x01, 0xFF, 0x80, 0x00, 0x0F, 0xFC, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x1F, 0xFC, 0x00,
0x00, 0xFF, 0xF0, 0x00, 0x7F, 0xF8, 0x00, 0x00, 0x7F, 0xFC, 0x03, 0xFF, 0xF0, 0x00, 0x00, 0x3F,
0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x0F, 0xFF, 0xFF,
0xFF, 0xC0, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFE, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xE0, 0x00, 0x00, 0x00,
0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
};
//Large Font End

My routine:

 void OLED_LargeFont_160128RGB(unsigned long textColor, unsigned long backgroundColor)    // function to show Large font character
{
    int i;
    int count;
    unsigned char index = 0;
    unsigned char y_pos = 118;  //was 118
    unsigned char mask = 0x80;
       
   for(i=0;i<92;i++)     // display large font character
    {
        OLED_SetPosition_160128RGB(51,y_pos);
        OLED_WriteMemoryStart_160128RGB();
        for (count=0;count<8;count++)
        {
            if((chr_f7s_30[index] & mask) == mask)
                OLED_Pixel_160128RGB(textColor);
            else
                OLED_Pixel_160128RGB(backgroundColor);
            mask = mask >> 1;
        }
        index++;
        mask = 0x80;
        for (count=0;count<8;count++)
        {
            if((chr_f7s_30[index] & mask) == mask)
                OLED_Pixel_160128RGB(textColor);
            else
                OLED_Pixel_160128RGB(backgroundColor);
            mask = mask >> 1;
        }
        index++;
        mask = 0x80;
                for (count=0;count<8;count++)
        {
            if((chr_f7s_30[index] & mask) == mask)
                OLED_Pixel_160128RGB(textColor);
            else
                OLED_Pixel_160128RGB(backgroundColor);
            mask = mask >> 1;
        }
        index++;
        mask = 0x80;
                for (count=0;count<8;count++)
        {
            if((chr_f7s_30[index] & mask) == mask)
                OLED_Pixel_160128RGB(textColor);
            else
                OLED_Pixel_160128RGB(backgroundColor);
            mask = mask >> 1;
        }
        index++;
        mask = 0x80;
               for (count=0;count<8;count++)
        {
            if((chr_f7s_30[index] & mask) == mask)
                OLED_Pixel_160128RGB(textColor);
            else
                OLED_Pixel_160128RGB(backgroundColor);
            mask = mask >> 1;
        }
        index++;
        mask = 0x80;
                for (count=0;count<8;count++)
        {
            if((chr_f7s_30[index] & mask) == mask)
                OLED_Pixel_160128RGB(textColor);
            else
                OLED_Pixel_160128RGB(backgroundColor);
            mask = mask >> 1;
        }
        index++;
        mask = 0x80;
                for (count=0;count<8;count++)
        {
            if((chr_f7s_30[index] & mask) == mask)
                OLED_Pixel_160128RGB(textColor);
            else
                OLED_Pixel_160128RGB(backgroundColor);
            mask = mask >> 1;
        }
        index++;
        mask = 0x80;
        y_pos--;
   }
//   index = 0;
//   y_pos = 118;
}


Thanks!!!

Also, the character seems still to paint slowly....do you have any suggestions for a faster giant character write?

Here is my

2
OLEDs / Using NHD-1.69-160128UGC3 CPU and PS signal
« on: April 10, 2015, 05:07:59 PM »
Hi, I have running the display very successfuly using the serial interface, a MEGA Aduino and your sample code. I am now trying to get it switch to 8080 parallel mode and having difficulty.  In the application note, the signals CPU and PS are tied to GND and 3.3V respectively, but in the sample code toggles these lines in the case of 8080 parallel.

Can you tie these as shown in the app note and comment out the logic for the CPU and PS in the code?

Thanks!

Pages: [1]