Skip to content
Drivers for LCD HY28A-LCDB with these hardware: ILI9320 for LCD and DS7843 for Touch Panel
C Objective-C
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Docs moved Gnu lic May 23, 2013
lcd Rename main2.c to main.c Apr 16, 2018
GNU GENERAL PUBLIC LICENSE.TXT moved Gnu lic May 23, 2013
README.md Update README.md Jul 30, 2013

README.md

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

You can’t perform that action at this time.