[ECOS] Hi

Prabhat Shrivastav shrivastavp@myw.ltindia.com
Thu Apr 22 08:30:00 GMT 2004


Hi Mikkel 

i have used Epson SED13305F00A1 as a Graphic LCD controller with SH7729
Hitachi controller + eCos.
i used GPIO for interfacing to LCD .

/************* Write to COMMAND Register *******************/
/************** Uses one byte variable **********************/
#define  write_GLCD_CMD(DSP_DATA) 							\
	CYG_MACRO_START							\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0E) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0D) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PCDR,DSP_DATA) ;			\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x05) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x05) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0D) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0D) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0E) ;				\
	CYG_MACRO_END


/************** Write into DATA Register *******************/
/**************** Uses one char variable ********************/
#define  write_GLCD_DATA(DSP_DATA) 						\
	CYG_MACRO_START 							\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0E) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0C) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PCDR,DSP_DATA) ;			\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x04) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x04) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0C) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0C) ;				\
		HAL_WRITE_UINT8(CYGARC_REG_PDDR,0x0E) ;				\
	CYG_MACRO_END


Prabhat Shrivastav




--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list