About using sed1335 in stm32f103 microcontrollers

    It's no secret that one of the main interests of the output of information from devices is the display. Basically, MK will connect character displays based on hd44780. A rare exception is graphic displays graphic displays WG12864A resolution 128 * 64. But what if you need more.




    And so I ordered the display WG320240B0-FFH-VZ-000. Datashit .

    This model was offered to me by a supplier. I did not check immediately. The backlight goes LCD. You need to choose LED, because I could not find the DC-AC driver.

    The display is ordered, it's time to start it with something. Used stm32f103 as a buffer.

    Then googling began. In Russian, I especially did not find anything.
    But I realized that I need to dig to the side

    SED1335
    The SED1335F is a multi-purpose integrated circuit for an LCD controller that can display text and graphics on a medium-sized liquid crystal display. S-MOS recommends that SED1335 be used in new projects, as the SED1330 will be gradually replaced by the SED1335.

    I wandered to the site en.radzio.dxp.pl/ssd1963 where the sed1335lib.zip library was downloaded
    I added to my project
    graphic.c 
    graphic.h
    SED1335-STM32.c
    sed1335.c
    sed1335.h
    


    in Main ()
    added

    GLCD_Initialize();
    GLCD_ClearGraphic();	
    GLCD_CircleSS(80,80,60,-90,90);
    GLCD_ClearText();
    GLCD_TextGoTo(7,12);
    GLCD_WriteText("5.6 kg/cm2");
    

    And the display worked for me.

    Since there is no backlight yet, I will post other people's photos



    Briefly about the composition and functions of this library

    // раздел настройки драйвера
    #define SED1335_PORT GPIOA   
    #define SED1335_A0	GPIO_Pin_10
    #define SED1335_WR	GPIO_Pin_8
    #define SED1335_RD	GPIO_Pin_9
    #define SED1335_CS	GPIO_Pin_11
    #define SED1335_RES	GPIO_Pin_12
    #define SED1335_D0   0
    


    // команды записи и чтения данных в дисплей
    void GLCD_InitPorts(void)
    void GLCD_WriteData(unsigned char dataToWrite)
    void GLCD_WriteCommand(unsigned char commandToWrite)
    unsigned char GLCD_ReadData(void)
    unsigned char GLCD_ReadByteFromROMMemory(unsigned char * ptr)
    


    Graphic part and text part
    void GLCD_Rectangle(unsigned int x, unsigned int y, unsigned int b, unsigned int a);//Прямоугольник
    void GLCD_Circle(unsigned int cx, unsigned int cy ,unsigned int radius); //Окружность
    void GLCD_Line(int X1, int Y1,int X2,int Y2); //Линия
    void GLCD_SetPixel(unsigned int x,unsigned int y, int color) // установить пиксель в черный или белый цвет
    void GLCD_WriteText(char * tekst) // отправка строки в дисплей
    void GLCD_WriteTextP(char * tekst), // отправка строки в дисплей
    void GLCD_SetCursorAddress(unsigned int address) // Установка курсора
    void GLCD_TextGoTo(unsigned char x, unsigned char y) //, Смещение курсора
    void GLCD_GraphicGoTo(unsigned int x, unsigned int y) // смещение кисти
    void GLCD_ClearText(void), // очистка текста
    void GLCD_ClearGraphic(void), // очистка графики
    void GLCD_Bitmap(char * bmp, int x, int y, int width, int height) // вывести картинку
    


    Thanks for attention

    Also popular now: