If its SPI then by definition it would have Clock, Data In, and Chip Select (slave select).
What are you saying yours does not have?
Do you have a link to yours?
CrossRoads:
If its SPI then by definition it would have Clock, Data In, and Chip Select (slave select).
What are you saying yours does not have?
Do you have a link to yours?
there is not link for this 'special' SPI LCD.
but i can list all the pins of this LCD: VDD, CS, MOSI(SDI), SDO, SCK, RST, BL, GND
holmes4:
Its not "special" in any way. Just normal SPI. CS, MOSI(SDI), SDO, SCK, those are the standard SPI pins.
Mark
ok, actually, comparing with this SPI LCD(LCD display with ILI9341 driver on Arduino - Displays - Arduino Forum), there is not D/C pin at my SPI LCD .
if i want write cmd, i can do it like this:
void TFT::sendCMD(INT8U cmd)
{
digitalWrite(pin_cs, LOW);
digitalWrite(pin_sck, LOW);
digitalWrite(pin_sdi, LOW);
digitalWrite(pin_sck, HIGH);
SPI.transfer(cmd);
digitalWrite(pin_cs, HIGH);
}
I don't know whether i can write this function in TFT.cpp, because digitalWrite() is used in *.ino file.
so, i need one way(like this: ) to set CS, SCK, SDI Pin's HIGH and LOW ouput
{
  digitalWrite(pin_cs, LOW);
  digitalWrite(pin_sck, LOW); << not needed - is controlled by SPI mode
  digitalWrite(pin_sdi, LOW); << not needed - pin is ignore when CS is High
  digitalWrite(pin_sck, HIGH); << not needed
  SPI.transfer(cmd);        << SCK & SDI are toggled here
  digitalWrite(pin_cs, HIGH); Â
}
Why do you think the extra control changes are needed?
digitalWrite(pin_cs, LOW);
digitalWrite(pin_sck, LOW); << not needed - is controlled by SPI mode
digitalWrite(pin_sdi, LOW); << not needed - pin is ignore when CS is High
digitalWrite(pin_sck, HIGH); << not needed
SPI.transfer(cmd); << SCK & SDI are toggled here
digitalWrite(pin_cs, HIGH);
}
Why do you think the extra control changes are needed?
thanks for your comments.
because i have tested this LCD with normal I/O pin by output HIGH/LOW and it works, but the display speed is toooo slowly, so, i try the SPI way and i want to port this code ]