gLCD EBM001 in mode SPI
Posted: Sat Aug 22, 2015 4:30 pm
Hello,
Is it possible to change the type of screen EBM001 SPI hardware?
On the version of Flowcode V5 FC5_xxx_gLCD_.c in the SPI output software.
On the V6 version of Flowcode, the function is compressed and unchangeable ...
Thank you
V5 FC5_xxx_gLCD_.c
Is it possible to change the type of screen EBM001 SPI hardware?
On the version of Flowcode V5 FC5_xxx_gLCD_.c in the SPI output software.
On the V6 version of Flowcode, the function is compressed and unchangeable ...
Thank you
V5 FC5_xxx_gLCD_.c
Code: Select all
void gLCD_SendByte (char Command, unsigned int Lcdout)
{
/*Macro_gLCD_SendByte_Start*/
char i, data;
//unsigned int mask = 0x8000;
FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_CS, %a_MX_GFXLCD_PIN_CS); //MX_GFXLCD_CS 0 start of sequence
if (Command == MX_GFXLCD_CMD)
{
FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_RS, %a_MX_GFXLCD_PIN_RS); //0 = MX_GFXLCD_CMD
}
else
{
FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_RS, %a_MX_GFXLCD_PIN_RS); //1 = MX_GFXLCD_PARAMeter
}
data = Lcdout;
for (i=0;i<8;i++)
{
FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_CL, %a_MX_GFXLCD_PIN_CL); //Clock 0
if (data & 0x80)
FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_SD, %a_MX_GFXLCD_PIN_SD); //Output MSB
else
FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_SD, %a_MX_GFXLCD_PIN_SD);
FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_CL, %a_MX_GFXLCD_PIN_CL); //Clock 1
data = data << 1; //Shift Data to left
}
FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_CS, %a_MX_GFXLCD_PIN_CS); //End of sequence
/*Macro_gLCD_SendByte_End*/