[MSP430]/MSP430F5x2011. 11. 26. 22:00

[MSP430F55XX EVM] TFT LCD출력 테스트

[MSP430F55XX EVM] TFT LCD출력 테스트



한프레임 출력하는데 70ms정도 나온다
MSP430F5x의 최대 클럭(33Mhz)으로 설정시 48ms로 예전 버전의 MSP430보다 상당히 빨라졌다.



MSP430F5510 TFT LCD 출력 테스트 동영상
드라이버 코드만 수정하면 쉽게 테스트 가능하므로 간단히 SD Card의 BMP파일을 FTF LCD에 출력하는 테스트를 진행해 보았다.





MSP430F5529 EVM보드의 핀맵






MSP430F5529 TFT LCD 출력 드라이버 코드



//-----------------------------------------------------------------------------
//TFT LCD

#define LCD_LAT_BIT      BIT5
#define LCD_LAT_PORT     PORT3
#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      BIT5
#define LCD_EN_PORT      PORT7
#define LCD_ENABLE()     Cbi(LCD_EN_PORT, LCD_EN_BIT)
#define LCD_DISABLE()     Sbi(LCD_EN_PORT, LCD_EN_BIT)

#define LCD_RST_BIT      BIT2
#define LCD_RST_PORT     PORT7
#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      BIT3
#define LCD_RS_PORT      PORT7
#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      PORT8
#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      //BIT5
#define LCD_RD_PORT      //LATD
#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      BIT4
#define LCD_BL_PORT      PORT7
#define LCD_BL_OFF()     Cbi(LCD_BL_PORT, LCD_BL_BIT)
#define LCD_BL_ON()      Sbi(LCD_BL_PORT, LCD_BL_BIT)

#define _LCD_DAT_OUT(Data)    PORT1=Data;PORT2=(Data>>8)


#define TFTGpioInit()     P1DIR=0xFF;P2DIR=0xFF;\
                                        Sbi(P7DIR, BIT2|BIT3|BIT4|BIT5);\
                                        Sbi(P8DIR, BIT1)   
//-----------------------------------------------------------------------------





MSP430F5529 SD Card 드라이버 코드
SD Card의 CS는 [LCD_EXP EVM] 보드의 MA_29번핀(/CS0)에 연결되어 있다.


#define _SPI1_ENABLE     1

//-----------------------------------------------------------------------------
// SD Card HAL
#define MMC_CS_PORT      PORT8
#define MMC_CS_BIT      BIT2

#define MMC_CS_INIT()     Sbi(P8DIR, MMC_CS_BIT);\
          MMC_CS_HIGH()
          
          
#define MMC_CS_HIGH()     Sbi(MMC_CS_PORT, MMC_CS_BIT)
#define MMC_CS_LOW()     Cbi(MMC_CS_PORT, MMC_CS_BIT)

#define MMC_ASSERT_INIT()    MMC_CS_INIT();MMC_CS_HIGH()
#define MMC_ASSERT()     MMC_CS_LOW()
#define MMC_DEASSERT()     MMC_CS_HIGH()


#define MMC_SpiInit()     SPI1_Init()
#define MMC_SendByte     SPI1_WriteReadByte
#define MMC_Send(Data)      SPI1_WriteByte(Data)
#define MMC_Recv()      SPI1_WriteReadByte(0xFF)
#define MMC_RecvP(Data)     MMC_Send(0xFF); (*(Data)=SPI1_ReadByte())
#define MMC_SPISpeed     SPI1_SetSpeed

#define SPI_Mode3()
//-----------------------------------------------------------------------------



Posted by nexp

댓글을 달아 주세요