2.4" LCD Touchscreen. Getting the screen to come on and do something, anything?
eagletalontim
Posts: 1,399
Well, I am back at it again and this time with something that is way out of my abilities. I have purchased 2 each 2.4" LCD touchscreens from here :
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=57_58&products_id=55
I have been following these 2 posts which are also working with touchscreens :
Thread 1: http://forums.parallax.com/showthread.php?137266-Propeller-GUI-touchscreen-and-full-color-display > Using the same screen as I am but using latches instead of direct connections to the Prop as I am doing.
Thread 2: http://forums.parallax.com/showthread.php?137999-LCD-touchscreen-A-development-thread > Using a different display, but not using latches. Similar code as well.
What I have done so far is wired up my display exactly like done in Thread 2. I am using the screen initialization method in Thread 1 since it is for my screen. I have attached the testing file that I have modified for my setup from Thread 2. When the Prop is powered on, the LCD backlight comes on instantly but after that, nothing changes on the screen. I have temporarily connected LED's to each pin that controls the screen and some of them flash the LED about 1 second after power is connected so I know the program is running and the screen is receiving the signal. I have also tried 2 different screens with no change with either screen.
Here is the pinout of the LCD :
Do I have something wrong?
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=57_58&products_id=55
I have been following these 2 posts which are also working with touchscreens :
Thread 1: http://forums.parallax.com/showthread.php?137266-Propeller-GUI-touchscreen-and-full-color-display > Using the same screen as I am but using latches instead of direct connections to the Prop as I am doing.
Thread 2: http://forums.parallax.com/showthread.php?137999-LCD-touchscreen-A-development-thread > Using a different display, but not using latches. Similar code as well.
What I have done so far is wired up my display exactly like done in Thread 2. I am using the screen initialization method in Thread 1 since it is for my screen. I have attached the testing file that I have modified for my setup from Thread 2. When the Prop is powered on, the LCD backlight comes on instantly but after that, nothing changes on the screen. I have temporarily connected LED's to each pin that controls the screen and some of them flash the LED about 1 second after power is connected so I know the program is running and the screen is receiving the signal. I have also tried 2 different screens with no change with either screen.
Here is the pinout of the LCD :
Do I have something wrong?
Comments
That would indeed be a bad idea! Yes, you need caps for running anything reliably on the prop. There are severals threads discussing capacitor issues.
If that is the code as it is, it will run the Start method but it still needs to run the Draw method and the Pixel method from somewhere.
Also a photo of the board would be helpful if there is some discussion about capacitors being left out.
If the code I posted is close, could someone help me get it farther than that? I don't have a way to take a picture and upload it at the moment. I am not even sure a picture will help since my circuit looks like a spider sitting on top of the 40 pin Prop.
Also I know average joe is not using chip select, but this code came from the C source code that came with the display and they toggle chip select as part of the startup sequence
If not, I'll put my thinking cap on again...
try
The touchscreen ones are the next 6. Then there are the 4 SD card ones. The display, touchscreen and SD card are three separate circuits.
Yes I see what you mean about all the CS pins! The one you want is labeled 'CS", (not F_CS, nor D_CS nor SD_CS).
You will need some new routines to toggle CS.
RD can be tied to 3V3.
A photo here would be very helpful. Just one thing wrong and the whole circuit won't work. that is ok all prototypes look like that.
@average joe - yes, good find. It might be easier to use P16 and count up 5 pins as the current pins allocation is split in two.
The tristate code can be deleted - that was there for when those pins are shared by other things.
Then you just need a DIRA with the correct pins enabled.
The LED's flash now, but the screen does not change. The backlight comes on, but no screen flicker, no pixels showing up, just all black
Based on the first schematic from Average Joe's thread, there are 3 pins on the prop that are shared. Pins 23, 24, and 25 which are P16, P17 and P18. Are those supposed to be shared? There are 2 pin connections from the 40 pin connection on the display connected to each of the prop pins I listed.
Can you explain that a bit more - I can't see that looking at the schematic. P16 only goes to one place as far as I can see, but I might be missing something there.
Then test things one line at a time
change that to
That repeat will hang the prop at that point. Go along on the 40 pin header on the display and measure the volts on the reset pin. Then redo the code with that repeat moved down one line. Recheck the pin is what it should be
Once you get down to LCD_Write with a repeat underneath that line, you should be able to find E5 on the pins. (use windows calculator to convert hex to binary).
This is the way I tested the display out the first time. I'll be doing it again in the next few days with a new board design. Test things one line at a time.
This makes it less likely to loose an errant repeat in debugging IMO.
"Go along on the 40 pin header on the display and measure the volts on the reset pin. ...
Recheck the pin is what it should be
Once you get down to LCD_Write with a repeat underneath that line, you should be able to find E5 on the pins. (use windows calculator to convert hex to binary)."
Does this mean connect the meter to the reset pin and measure voltage on the D0 though D15 pins?
I know all the pins are wired correctly and the pins on the display are getting voltage. Man this is frustrating!
then, pass and this should make D0 high
repeat this for hex digits
1, 2, 4, 8. These are the individual pins for each digit...SO..
pin0, pin1, pin2, pin3
that means $04 will make pin 2 high.
if you set to $40,this will change pin 7... and so on
try something like,
comment each code pair out when it tests ok