pset-function examples

Home Forums Displays & Touchscreens pset-function examples

This topic contains 14 replies, has 3 voices, and was last updated by  jwm 1 week, 5 days ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #347 Reply

    Achim Döbler
    Keymaster
    #365 Reply

    Achim Döbler
    Keymaster

    Pset example for all Solomon Systech SSD1351 display driver.

    Attachments:
    1. ssd1351.c
    #372 Reply

    Achim Döbler
    Keymaster

    Pset example for all Solomon Systech SSD1322 display driver.

    Attachments:
    1. ssd1322.c
    #387 Reply

    Achim Döbler
    Keymaster

    Pset example for all Solomon Systech SSD1306 display driver.
    CAUTION: If necessary, adapt the init function to your OLED!

    Attachments:
    1. ssd1306.c
    #390 Reply

    Achim Döbler
    Keymaster

    Pset example for ST7735R / ST7735S display driver.
    CAUTION: If necessary, adapt the init function to your LCD!

    Attachments:
    1. ST7735R.c
    #474 Reply

    Achim Döbler
    Keymaster

    Pset example for all Solomon Systech SSD1325 display driver.
    CAUTION: If necessary, adapt the init function to your OLED!

    Attachments:
    1. ssd1325.c
    #503 Reply

    Nazo Nıgrık

    Hello Dear Friend,

    First of all I would like to say that you are amazing !

    I have a Question. I have a 128×64 | 0.96″ | SPI OLED. I would like to built a code on the developing board of STM32F0308-DISCO. You shared great documantation. But if you mind Could you share a full project to make it more easy for us (as an new developer)

    #505 Reply

    Michael

    Dear Achim,

    thank you so much for your outstanding uGui project!
    In one of your vids I watched on youtube, I’ve seen that you used a display with SEPS525 controller.
    As I understand so far I need to adjust the pset function.
    Is there anything else I must do to get your gui to work?
    It would be great, if you could provide sample code for SEPS525.
    Thank you and keep to the excellent work!

    Your, Michael

    #509 Reply

    Dan

    Hi Achim,
    I have the SSD1325 OLED device working, thanks to your software and your ssd1325.c file but now we have switched to a SSD1322 device so I tried to use your ssd1322.c file but it does not have an init function, I tried using the ssd1325_init() but it does not seem to work, the screen is completely dark. (I first tried to run the exact same software that worked on the SSD1325 expecting to see some pixels lit or something but the display was dark) How can I get something to show? I converted the working ssd1325.c code to use the SSD1322 update_display() and ssd1322_pset() but it did nothing. Any suggestions would be appreciated!
    Dan

    #1676 Reply

    jwm
    Participant

    Hello Achim,

    I like your package and would like to use it with a SSD2119 TFT 3.5″,320×240 display. I currently have the display running with an Xmega128A1U on the EBI bus clocked at 100MHz on the EBI bus. Takes 2 wait states, but the demo mode from Crystalfonz is VERY FAST! Now I would like to know if you have a pset-function for the SSD2119 chip. Would really appreciate an example so I can move on to the rest of the design and use your uGUI.

    Thanks for your help
    Jerry

    #1681 Reply

    jwm
    Participant

    For those of you looking for a SSD2119 PSET example, I have enclosed a copy of my complete basic driver for the SSD2119 chip. Keep in mind, this example is for an Atmel Xmega128A1U CPU, and the SSD2119 is interfaced to the EBI bus. Notes in the source code explains the EBI bus speed I achieved and the number of wait states needed for your CPU EBI bus speed. The display response using the EBI bus is very impressive on the Xmega because it is not bit-banged. The display looks like two memory locations to the SRAM interface. The command port is one 8-bit location, and the Data port is the other. The code does two writes each port in order to send the complete 16-bit value to the SSD2119 chip. So your TFT hardware interface must be set for 8-bit 8080 mode and RGB565 color format.

    Enjoy the code
    Jerry

    Attachments:
    1. TFT_SSD2119.zip
    #1703 Reply

    Andrei Bucsa

    Hi Achim,

    I try your SSD1322 pset function and for some reason did not works; I succeed to use uGUI for other displays.
    Inside the c file I have the followings:

    void ssd1322_pset(UG_S16 x, UG_S16 y, UG_COLOR c)
    {
    unsigned int p;
    unsigned char b;

    b = c & 0x0F;
    if(x >= 256) return;
    if(x < 0)return;

    p = y*128 + (x>>1);
    b &= 0xF;

    switch(x%2)
    {
    case 0: buff[p] &= 0x0F; buff[p] |= b << 4; break;
    case 1: buff[p] &= 0xF0; buff[p] |= b; break;
    }
    }

    void update_display( void ) // it requires to define a global variable buff but I have no idea how I need to use this function
    {

    }

    void update_img(unsigned char* p) // i have no idea how to use that…

    {

    }

    My testing code is (this didn’t require I assume timer based UG_Update();):

    UG_GUI gui;
    ….

    UG_Init(&gui, ssd1322_pset, 256, 64);
    OLED_Init(); // the init function for SSD1322
    UG_FontSelect(&FONT_8X14);
    UG_ConsoleSetArea(0, 0, 256, 64);
    UG_ConsoleSetBackcolor(C_BLACK);
    UG_ConsoleSetForecolor(C_WHITE);
    UG_ConsolePutString(“Beginning\n”);
    UG_ConsolePutString(“System\n”);
    UG_ConsolePutString(“Initialization…\n”);

    UG_ConsolePutString(“System Initialization Complete\n”);

    However the display is black, code not works and I have no idea how to use update_display and update_img(unsigned char *p)
    Can you please give me some hints?

    Thanks,
    Best Regards,
    Andrei

    #1704 Reply

    Andrei Bucsa

    I figure out what was happened… missing some brackets.
    The function should look like:

    void ssd1322_pset(UG_S16 x, UG_S16 y, UG_COLOR c)
    {
    unsigned int p;
    unsigned char b;

    b = (c & 0x0F); // limit the color to 16 tones of gray (4 bits)
    if((x >= 256) || (x < 0) || (y >= 64) || (y < 0)) return; // test if the point is withing boundaries (0, 0) to (256, 64)

    p = y * 128 + (x >> 1); // point the memory location each line use 128 bytes

    switch(x%2) // patch the nibble with the pixel color
    {
    case 0: buff[p] &= 0x0F; buff[p] |= (b << 4); break;
    case 1: buff[p] &= 0xF0; buff[p] |= b; break;
    }
    }

    also, pset write in a buffer which is maximum size of the OLED memory so the space should be allocated from the beginning in main:

    unsigned char buff[256 * 32]; // 256×64 4BPP OLED

    the function update_display() needs to be called in order to refresh the RAM display, after the buffer is modified; I assume prior that should be called UG_Update();

    I did not find a function that place a bitmap directly on the display, so I will implement-it by myself.

    Too bad such a good project being abandoned… 🙁

    Hope this is helpful for others.

    Regards,
    Andrei

    #1717 Reply

    Achim Döbler
    Keymaster

    Dear Andrei,
    I’m glad that you found your bug.
    I really like that you also share the results for others.
    BTW: No, the project is still alive!
    BR Achim

    #1773 Reply

    jwm
    Participant

    I have enclosed an SSD1963 TFT driver with Initialization and Pset code source files for uGUI. This code is for a processor that uses an EBI bus, so it is treated like an SRAM with 2 memory locations. This code also supports the Atmel (Microchip) ATSAMx70 ARM Cortex-M7 300MHz processor family, (this version is for an ATSAMS70Q21) with a define that puts in a DSB() instruction before each TFT Command or Data write to make it work properly when using compiler optimizations -O1 to -Os in your code. Otherwise, without the DSB the TFT will not get initialized. This code is for a 5″ display, but should work for any display size set for 800 x 480 pixels. This code is released under the MIT License. Enjoy.

    Attachments:
    1. TFT_SSD1963.zip
Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: pset-function examples
Your information: