본문 바로가기

[DSP]/PICCOLO

[TMS320F28069 EVM] TFT LCD 테스트

[TMS320F28069 EVM] TFT LCD 테스트


[EXP-DSP EVM] 보드를 이용하면 8비트 모드로 TFT LCD를 쉽게 테스트 해 볼 수 있다. TMS320F28069는 최대 80MHz 동작하므로 속도는 느리지 않을것 같다.

일단 기존 코드에 드라이버 부분만 수정하면 프로그램 수정없이 테스트 가능하므로 속도 테스트를 해보자

TFT LCD 드라이버 코드
//-----------------------------------------------------------------------------
// TFT LCD Driver
#define TFT_DRV_COM44     1

#define LCD_LAT_BIT      BIT8
#define LCD_LAT_ON()     sbi(GPIOA_S, LCD_LAT_BIT);NOP();
#define LCD_LAT_OFF()     cbi(GPIOA_C, LCD_LAT_BIT);NOP();
#define LCD_DATA_LATCH()    LCD_LAT_ON();LCD_LAT_OFF();

#define LCD_EN_BIT      BIT30
#define LCD_EN_PORT      
#define LCD_ENABLE()     cbi(GPIOA_C, LCD_EN_BIT);NOP();
#define LCD_DISABLE()     sbi(GPIOA_S, LCD_EN_BIT);NOP();

#define LCD_RST_BIT      BIT6
#define LCD_RST_PORT     PORTA
#define LCD_RST_ON()     
#define LCD_RST_OFF()     

#define LCD_RS_BIT      BIT31
#define LCD_RS_PORT      
#define LCD_RS_OFF()     cbi(GPIOA_C, LCD_RS_BIT);NOP();
#define LCD_RS_ON()      sbi(GPIOA_S, LCD_RS_BIT);NOP();

#define LCD_WR_BIT      BIT12
#define LCD_WR_PORT      
#define LCD_WR_OFF()     cbi(GPIOA_C, LCD_WR_BIT);NOP();
#define LCD_WR_ON()      sbi(GPIOA_S, LCD_WR_BIT);NOP();

#define LCD_RD_BIT      BIT7
#define LCD_RD_PORT      
#define LCD_RD_OFF()     //cbi(GPIOA_C, LCD_RD_BIT);NOP();
#define LCD_RD_ON()      //sbi(GPIOA_C, LCD_RD_BIT);NOP();

#define LCD_BL_BIT      BIT6
#define LCD_BL_PORT      PORTB
#define LCD_BL_OFF()     
#define LCD_BL_ON()      

#define _LCD_DAT_OUT(Data)    PORTA = (PORTA&(~0xFF)) | (Data>>8)&0xFF;NOP();\
          LCD_DATA_LATCH();\
          PORTA = (PORTA&(~0xFF)) | (Data&0xFF)&0xFF;NOP();

#define TFTGpioInit()     EALLOW;\
          Sbi(GpioCtrlRegs.GPADIR.all, 0xFF);\
          Cbi(GpioCtrlRegs.GPAMUX1.all, 0xFF);\
          GpioCtrlRegs.GPAMUX2.bit.GPIO30 = 0;\
          GpioCtrlRegs.GPADIR.bit.GPIO30 = 1;\
          GpioCtrlRegs.GPAMUX2.bit.GPIO31 = 0;\
          GpioCtrlRegs.GPADIR.bit.GPIO31 = 1;\
          GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 0;\
          GpioCtrlRegs.GPADIR.bit.GPIO12 = 1;\
          GpioCtrlRegs.GPAMUX1.bit.GPIO8 = 0;\
          GpioCtrlRegs.GPADIR.bit.GPIO8 = 1;\
          EDIS;
//-----------------------------------------------------------------------------



TMS320F28069 EVM 핀맵


[EXP-DSP] TFT LCD관련 자료





TMS320F28069 EVM TFT LCD테스트 프로그램 동영상

반응형