Hi,
I have the 2.2 TFT display. I'm trying to read data from the display based on the data sheet at:
http://www.adafruit.com/products/797
I modified the code to do something like this:
writeCommand(HX8340B_N_RDDCOLMOD);
SPDR = 0;
while (!(SPSR & _BV(SPIF)));
byte value1 = SPDR; // SPI.transfer(0);
SPDR = 0;
while (!(SPSR & _BV(SPIF)));
byte value2 = SPDR; // SPI.transfer(0);
Which should read the two bytes from the RDDCOLMOD command (read the color mode).
However, I always get 0 back.
This has me wondering...is the TFT's SDO hooked up to MISO? Or, is the MISO output for the shield *only* for the microSD? I can't quite tell by looking at the board. Anyone know?
thanks
corbin
2.2 TFT display and MISO
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: 2.2 TFT display and MISO
Haven't tried reading from the display. The board files and schematics are here.
-
- Posts: 10
- Joined: Sun May 13, 2012 3:43 pm
Re: 2.2 TFT display and MISO
Thanks! That answers my question; according to the BTL221722-276L data sheet, the SDI pin is the "Serial data input/output PIN" -- so I guess it goes both ways. And yes according to the schematic the SDI pin is obviously hooked up (to MOSI) as it gets data in.
So...in theory I should be able to read stuff off the display, but I can't get it working.
My goal is to detect if the display is initialized, and if not to initialize it. This would allow "hot swapping" of the display.
Let me know if anyone has hacked the code to read from one of these displays.
-corbin
So...in theory I should be able to read stuff off the display, but I can't get it working.
My goal is to detect if the display is initialized, and if not to initialize it. This would allow "hot swapping" of the display.
Let me know if anyone has hacked the code to read from one of these displays.
-corbin
Please be positive and constructive with your questions and comments.