Hello
I have an Graphic display 24bit for pixel and i want use this with the
foxboard.
I have connected the display to the portG, but I have a problem with
the communication.
At the moment I use these functions to send a byte:
void lcd_put_byte(char value, char clk)
{
if (value&0x01)
gpiosetbits(PORTG, PG8);
else
gpioclearbits(PORTG, PG8);
if (value&0x02)
gpiosetbits(PORTG, PG9);
else
gpioclearbits(PORTG, PG9);
if (value&0x04)
gpiosetbits(PORTG, PG10);
else
gpioclearbits(PORTG, PG10);
if (value&0x08)
gpiosetbits(PORTG, PG11);
else
gpioclearbits(PORTG, PG11);
if (value&0x10)
gpiosetbits(PORTG, PG12);
else
gpioclearbits(PORTG, PG12);
if (value&0x20)
gpiosetbits(PORTG, PG13);
else
gpioclearbits(PORTG, PG13);
if (value&0x40)
gpiosetbits(PORTG, PG14);
else
gpioclearbits(PORTG, PG14);
if (value&0x80)
gpiosetbits(PORTG, PG15);
else
gpioclearbits(PORTG, PG15);
// cs e clk
gpioclearbits(PORTG, PG1);
gpiosetbits(PORTG, PG3);
gpioclearbits(PORTG, PG3);
if (clk==1)
{
gpiosetbits(PORTG, PG3);
gpioclearbits(PORTG, PG3);
}
gpiosetbits(PORTG, PG1);
}
the problem and the slowness with which the byte is sent because the
byte is sent bit per bit.
Does a way exist to send a whole byte?
I excuse but I do not speak English very well