📜 ⬆️ ⬇️

About using sed1335 in stm32f103 microcontrollers

It is not a secret for anyone that one of the main interests of displaying information from devices is the display. Basically on the MK connect symbolic displays based on hd44780. A rare exception is the compilation of graphic displays and graphic displays WG12864A with a resolution of 128 * 64. But what to do if you need more.




And so I ordered the display WG320240B0-FFH-VZ-000. Datashit .
')
The supplier offered me this model. I did not immediately check. 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. As a buffer applied stm32f103.

Then googling began. I didn’t find anything in Russian.
But I realized that I had to dig in the direction

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

I wandered to 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 has earned me.

Since there are still no highlights, I’ll 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

Source: https://habr.com/ru/post/233405/


All Articles