Skip to content

Drivers for LCD HY28A-LCDB with these hardware: ILI9320 for LCD and DS7843 for Touch Panel

Notifications You must be signed in to change notification settings

topogigio/HY28A-LCDB-Drivers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HY28A-LCDB Drivers

Drivers for LCD HY28A-LCDB with these hardware:

  • ILI9320 for LCD
  • DS7843 for Touch Panel

Pre-requisite

Hardware:

Wiring Diagram:

  • See files Wiring.txt

Linux Distro:

  • Wheezy image: 2013-02-09-wheezy-raspbian.img on SD 4/8Gb

Compiler:

  • gcc version 4.6.3 (Debian 4.6.3-14+rpi1)

Libraries:

Compile:

  • gcc -o spi -lrt main.c -lbcm2835 -lm -mfloat-abi=hard -Wall

Execute:

  • sudo ./spi

Reference Manual Touch Panel Functions_ void TP_Cal(void); void DrawCross(unsigned short Xpos, unsigned short Ypos); void TP_DrawPoint(unsigned short Xpos, unsigned short Ypos); FunctionalState setCalibrationMatrix( Coordinate * displayPtr,Coordinate * screenPtr,Matrix * matrixPtr); FunctionalState getDisplayPoint(Coordinate * displayPtr,Coordinate * screenPtr,Matrix * matrixPtr ); unsigned short Read_X(void); unsigned short Read_Y(void);

LCD Functions: long getImageInfo(FILE*, long, int); int LCD_PutImage(unsigned short, unsigned short, char*); void LCD_Reset(void); void LCD_Init(unsigned char); void LCD_WriteReg(unsigned short, unsigned short); void LCD_WriteIndex(unsigned char); void LCD_WriteData(unsigned short); void LCD_SetPoint(unsigned short, unsigned short, unsigned short); unsigned short LCD_ReadReg(unsigned short); unsigned short LCD_ReadData(void); void LCD_Clear(unsigned short); void LCD_Text(unsigned short, unsigned short, char *, unsigned short, unsigned short); void PutChar(unsigned short, unsigned short, unsigned char, unsigned short, unsigned short); int sgn(int); void LCD_DrawLine(unsigned short, unsigned short, unsigned short, unsigned short, unsigned short); void LCD_DrawBox(unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, int); void LCD_DrawCircle(unsigned short, unsigned short, unsigned short, unsigned short); void LCD_DrawCircleFill(unsigned short, unsigned short, unsigned short, unsigned short, unsigned short); void LCD_SetPoint(unsigned short, unsigned short, unsigned short); unsigned short LCD_GetPoint(unsigned short, unsigned short); static unsigned short LCD_BGR2RGB(unsigned short); static void LCD_SetCursor(unsigned short, unsigned short); void DelayMicrosecondsNoSleep(int delay_us); void LCD_DisplayOn(void); void LCD_DisplayOff(void);

Details in file main.c

About

Drivers for LCD HY28A-LCDB with these hardware: ILI9320 for LCD and DS7843 for Touch Panel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published