본문 바로가기

[AVR]/AVR_EVM

[ATXmega128a1 EVM] TFT LCD EXP 보드 테스트

[ATXmega128a1 EVM] TFT LCD EXP 보드 테스트



ATXmega128a1 보드를 이용하여 LCD_EXP_EVM 보드 를 테스트 했다.


회로도
LCD_EXP_EVM보드 회로도


ATXmega128 EVM 보드 회로도



ATXmega128a1 TFT LCD(COM26T2844) 테스트 예제 코드
//-----------------------------------------------------------------------------
// TFT LCD(COM26T2844) Driver
#define LCD_LAT_BIT      BIT8
#define LCD_LAT_PORT     PORTA
#define LCD_LAT_ON()     Sbi(LCD_LAT_PORT, LCD_LAT_BIT)
#define LCD_LAT_OFF()     Cbi(LCD_LAT_PORT, LCD_LAT_BIT)
#define LCD_DATA_LATCH()    LCD_LAT_ON();LCD_LAT_OFF();

#define LCD_EN_BIT      BIT1
#define LCD_EN_PORT      PORTF
#define LCD_ENABLE()     Cbi(LCD_EN_PORT, LCD_EN_BIT)
#define LCD_DISABLE()     Sbi(LCD_EN_PORT, LCD_EN_BIT)

#define LCD_RST_BIT      BIT5
#define LCD_RST_PORT     PORTF
#define LCD_RST_ON()     Sbi(LCD_RST_PORT, LCD_RST_BIT)
#define LCD_RST_OFF()     Cbi(LCD_RST_PORT, LCD_RST_BIT)

#define LCD_RS_BIT      BIT4
#define LCD_RS_PORT      PORTF
#define LCD_RS_OFF()     Cbi(LCD_RS_PORT, LCD_RS_BIT)
#define LCD_RS_ON()      Sbi(LCD_RS_PORT, LCD_RS_BIT)

#define LCD_WR_BIT      BIT1
#define LCD_WR_PORT      PORTE
#define LCD_WR_OFF()     Cbi(LCD_WR_PORT, LCD_WR_BIT)
#define LCD_WR_ON()      Sbi(LCD_WR_PORT, LCD_WR_BIT)

#define LCD_RD_BIT      //BIT7
#define LCD_RD_PORT      //PORTA
#define LCD_RD_OFF()     //Cbi(LCD_RD_PORT, LCD_RD_BIT)
#define LCD_RD_ON()      //Sbi(LCD_RD_PORT, LCD_RD_BIT)

#define LCD_BL_BIT      BIT0
#define LCD_BL_PORT      PORTF
#define LCD_BL_OFF()     Cbi(LCD_BL_PORT, LCD_BL_BIT)
#define LCD_BL_ON()      Sbi(LCD_BL_PORT, LCD_BL_BIT)

#define TFTGpioInit()     PORTJ_DIR = 0xFF;\
          PORTK_DIR = 0xFF;\
          Sbi(PORTF_DIR, BIT0|BIT1|BIT4|BIT5);\
          Sbi(PORTE_DIR, BIT1);
//----------------------------------------------------------------------------- 


XMega128a1 TFT LCD테스트 동영상



기존 ATMega128 7.3728Mhz에서 TFT LCD테스트와 비교하면 속도차를 느낄 수 있다.

반응형