SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By silic0re
#70815
I apologize ahead of time for the really quick post, but here are some sample readings from the OLED touchscreen. I put an evenly spaced 5x5 square grid on the screen, and pressed each point on the grid in turn, recording a large number of samples to get a general idea of the touchpad's space.

In general it looks like the output is rotated about 45°, translated, and skewed a bit. It's also affected by pressure, but I haven't graphed that yet. I have manually calibrated the touchscreen with an algorithm that progressively takes the rotation, translation, skew, and finally pressure out of things. It does okay, but definitely needs a bit of work, and needs to be developed into something that can be autocalibrated from a few touch points.

Image
By gussy
#72013
I finally got around to finishing routing the breakout board last night, all I had to do was tidy it up and route the touchscreen controller.

I have printed it out 1:1 and it seems to line up with the display's connector fairly well, enough for testing anyway. The idea is that the display plug's on and then folds back over all the components, I will put an insulator in between them to its all safe, but its really just to test out the display before I put them onto my real project.

Here are some images of the schematic/board, I have double checked everything and all but the vreg ic looks fine. The vreg IC keeps failing my 7mil DRC, as its pads are too close together, yet I copied the datasheet exactly, so maybe a 7mil clearance is just not enough.

Anyway, I would really appreciate it if you could have a look over it silic0re, you are the resident expert here on these display's.

http://habnetwork.net/pictures/OLED_CB_Schematic.jpg
http://habnetwork.net/pictures/OLED_CB_Board.jpg
Note that this is a SPI only breakout at the moment, which is enough for my current needs.

Cheers!
By silic0re
#72323
Hey Gussy,

That's fantastic news, that your breakout board is coming along! It looks quite good, here are some thoughts as I compare your schematics to the one's I've been using:

- OLED Pin 54 (VCI 3.3V), I have this connected to 3.3V, and you have it connected to GND (don't trust me, and check the datasheet / appnote -- it may be an error on my part!)

- ADS7846 Pin 9 (VREF), I think this may have to be connected to GND through a 0.1uF capacitor, if it's unused. You'll have to double check the datasheet -- I also used their evaluation kit schematics as a baseline.

- On those lines too, you may wish to include small filter caps in line with the touchscreen lines X+, X-, Y+, Y-. This will limit the bandwidth, but is also supposed to give smoother readings. I don't have any and just use averaging in software, but I'm thinking of adding them in to my next revision. The ADS7846 evaluation kit schematic I looked at also had the option of using these, and I think they used small values (0.01-0.01uF, if I remember correctly) by default.

- For your AR_VDD and AR_VSS, I would also break these lines out to your header. This will let you both (1) check the voltages, and (2) if the buck/boost/inverter doesn't function correctly for whatever reason, you could just not populate that section of the circuit, and input the voltages easily from an external source. This saved me a great deal of effort! :)

----

Lastly, something that you're likely not going to want to hear. With the OLED's I have, I found that the OLED doesn't seem to want to give up the SDO pin when it's CS is inactive -- it seems to pull the line low, preventing any other SPI devices (such as the touch screen controller) from communicating properly. This is a pretty big oversight (if it's correct, and not just limited to my setup). Potential work-arounds include breaking out the SDO pins of each SPI device separately, or putting a little buffer on the OLED's SDO that puts it into a high-Z state if the OLED CS is inactive.

Mechanically, I noticed that your OLED connector is quite high into the board -- you may wish to place this much closer to the bottom of the board, so that the OLED can wrap around to the other side easily. I've placed my connectors about 3mm from the board end (at their closest), and this does give a few mm of slack. I think there's on the order of 7-8mm of cable, total? Let me measure for you... 6mm from the end of the metal case to the beginning of the actual connector, but it will also come off from the back of the case maybe another 2mm, giving you an absolute maximum of 8mm of cable. Don't forget that you'll have to take the height of your parts into consideration (if you haven't already :) ).

Looking good!
By silic0re
#72324
A quick note regarding the above graph and the strange rotated, translated, and skewed touchpad measurements I was getting -- I actually had the registers assigned incorrectly, so I was looking at (say) Z1 instead of Y. I fixed my code, and the touchscreen works beautifully. :)

Sorry about any confusion!
By gussy
#72335
silic0re wrote:- OLED Pin 54 (VCI 3.3V), I have this connected to 3.3V, and you have it connected to GND (don't trust me, and check the datasheet / appnote -- it may be an error on my part!)
I see what I did there, your right it should be 3.3v as its one of the supply pins.
This also made me spot another problem. Pin 20 (IOVCC) was connected to GND for some reason, now its connected to 3.3v as it should be.
silic0re wrote:- ADS7846 Pin 9 (VREF), I think this may have to be connected to GND through a 0.1uF capacitor, if it's unused. You'll have to double check the datasheet -- I also used their evaluation kit schematics as a baseline.
The datasheet leaves it unconnected in the examples (page 8). I can't see anywhere that says about a capacitor, but I could be missing something.
silic0re wrote:- On those lines too, you may wish to include small filter caps in line with the touchscreen lines X+, X-, Y+, Y-. This will limit the bandwidth, but is also supposed to give smoother readings. I don't have any and just use averaging in software, but I'm thinking of adding them in to my next revision. The ADS7846 evaluation kit schematic I looked at also had the option of using these, and I think they used small values (0.01-0.01uF, if I remember correctly) by default.
Good catch, I was wondering about some filtering, I will add these in.
silic0re wrote:- For your AR_VDD and AR_VSS, I would also break these lines out to your header. This will let you both (1) check the voltages, and (2) if the buck/boost/inverter doesn't function correctly for whatever reason, you could just not populate that section of the circuit, and input the voltages easily from an external source. This saved me a great deal of effort! :)
They are broken out to testpoints/smd pads for this very purpose. I will probably just use a ATX PSU for +-5v for starters, then try and get the regulator working.
I may break them out to pins. Putting the header on the side might be a good idea, especially if I need to breakout more SD lines.
silic0re wrote:Lastly, something that you're likely not going to want to hear. With the OLED's I have, I found that the OLED doesn't seem to want to give up the SDO pin when it's CS is inactive -- it seems to pull the line low, preventing any other SPI devices (such as the touch screen controller) from communicating properly. This is a pretty big oversight (if it's correct, and not just limited to my setup). Potential work-arounds include breaking out the SDO pins of each SPI device separately, or putting a little buffer on the OLED's SDO that puts it into a high-Z state if the OLED CS is inactive.
It's exactly the sort of thing I want to hear!! :)
The micro I will be using has 2 SPI ports, so I will just break out each SPI bus so I can have complete control.
silic0re wrote:Mechanically, I noticed that your OLED connector is quite high into the board -- you may wish to place this much closer to the bottom of the board, so that the OLED can wrap around to the other side easily. I've placed my connectors about 3mm from the board end (at their closest), and this does give a few mm of slack. I think there's on the order of 7-8mm of cable, total? Let me measure for you... 6mm from the end of the metal case to the beginning of the actual connector, but it will also come off from the back of the case maybe another 2mm, giving you an absolute maximum of 8mm of cable. Don't forget that you'll have to take the height of your parts into consideration (if you haven't already :) ).
I think my oled displays must have a bit of a different cable to yours. If you sit the OLED on top of that board layout (printed out to 1:1) with the connector tucked under the display, the ends line up with the connector.
I am thinking about how to mount this all onto a bigger board though, what your saying makes sense.
silic0re wrote:A quick note regarding the above graph and the strange rotated, translated, and skewed touchpad measurements I was getting -- I actually had the registers assigned incorrectly, so I was looking at (say) Z1 instead of Y. I fixed my code, and the touchscreen works beautifully. :)
I saw that in the other thread, good to hear its not so much of an impossible task as it sounds.

Thanks for all the help, I will make the changes to the board and post up some more pictures this weekend

Cheers!
By silic0re
#72463
silic0re wrote:
- ADS7846 Pin 9 (VREF), I think this may have to be connected to GND through a 0.1uF capacitor, if it's unused. You'll have to double check the datasheet -- I also used their evaluation kit schematics as a baseline.

The datasheet leaves it unconnected in the examples (page . I can't see anywhere that says about a capacitor, but I could be missing something.
Hmm, you're right. The interesting thing is that the ADS7846 datasheet I have seems to leave it unconnected, while the ADS7843 datasheet seems to have it connected to VCC, and decoupled to ground through a small capacitor. The evaluation kit schematic seems to have a jumper with several options for what you can do with the VREF, but in all cases decouples it to ground. Interesting! (Here is the evaluation kit schematic: http://focus.ti.com.cn/cn/lit/ug/sbau067/sbau067.pdf )


Everything else sounds good! I'm glad to hear that you're definitely making progress. One thing to note: I added some small 0.1uF decoupling capacitors to the X+, X-, Y+, and Y- lines by just soldering them onto the pins and wirewrapping a line to ground. For some reason this seemed to give really strange behavior with the touchscreen controller -- values were generally kind of 'averaged', and it always registered some pressure on the screen. It's possible that I might have had a bridge (or some other issue) somewhere, but I did have a good look. I've just taken the capacitors off, and the controller now works fine and gives some beautiful values. So! If you do include the decoupling caps on the touchscreen lines, be prepared to potentially depopulate them. :) (The evaluation kit schematic /does/ show these capacitors, so I'm not sure what the situation is with my setup...)
By tobi79
#74757
Hi all,

I'm playing with the 2.0" OLED, with the SPI interface. Everything is working fine, but I don't really understand one thing, and maybe someone can explain it to me.
If I draw a pixel by writing the coordinates to R20h and R21h, my visible display area is between the y-coordinates 32 and 207 and the x-coordinates 0 and 219. Not, as expected, between y = 0-175 and x = 0 - 219.

It's not a problem, but looks strange to me. I'm using the default values for all registers.

Cheers,

Tobi
By silic0re
#74830
Hi tobi,

I have no clue -- do you have a link to the 2.0" OLED? It sounds like it could be an issue with 1) having a "window" set in the controller?, or 2) perhaps somewhere your Y coordinate values are getting bitshifted 5 to the left?, or 3) maybe the controller was just wired that way for some odd reason... it would be easy to add a constant offset to your code when pixel plotting, although it might make certain operations (like bulk transfers) a little slower as you'd likely have to pad them with those extra 32 characters of non-viewable pixels per line.


----

In other news, I have the 2.8" OLED going almost full-tilt at 10Mhz on SPI. It's still not anywhere as fast as the display in parallel mode (the SPI is maybe 2-4 fps now?, where I think I measured the parallel some time ago to be 25-30fps, but there looked to be some thrashing involved in the screen updates at that speed). I haven't been able to drive the display any quicker as I can't seem to drive the SPI peripheral on the ARM I'm using any higher without things not working, but 10Mhz still seems plenty quick!
By gussy
#74833
silic0re wrote:In other news, I have the 2.8" OLED going almost full-tilt at 10Mhz on SPI. It's still not anywhere as fast as the display in parallel mode (the SPI is maybe 2-4 fps now?, where I think I measured the parallel some time ago to be 25-30fps, but there looked to be some thrashing involved in the screen updates at that speed). I haven't been able to drive the display any quicker as I can't seem to drive the SPI peripheral on the ARM I'm using any higher without things not working, but 10Mhz still seems plenty quick!
That's very encouraging to hear. 2-4FPS is plenty for simple data/information/text display. I will see if I can get the SPI and display working at 24MHz when I get it all together. Maybe we can get 10FPS out of the display in SPI mode?

I still haven't got my breakout boards made yet (I know, I am slack!), I'm waiting to finish designing a few more boards to get a development panel made. Maybe in a few weeks time.

What ARM are you using? I'm planning on using a LPC2148.
By mpanetta
#74968
I did not see if you posted it or not, how much was the display? Did you have to do anything special to get them from OSD since they supposedly don't like small orders?
By gussy
#74977
mpanetta wrote:I did not see if you posted it or not, how much was the display? Did you have to do anything special to get them from OSD since they supposedly don't like small orders?
They are great to deal with, they take paypal too which is good. The displays are around $30usd.
By home_boy
#75504
Hi, can somebody post the eagle library with 61 pin connector? I was trying to make one myself but I'm not sure with pin numbering, so the 100% working library would be best solution. Thanks
By Joku
#75735
OSD never got back to me despite 3 emails that now seem like a lifetime ago. It seems vision-opto are much more capable of answering emails.. I'm about to order a few "C0280QGLH-T" versions... 2.8" with touch screen. I'm still amazed just how cheap these screens are.

I'll be interfacing to PICs.. not sure which just yet.. most likely either the PIC32MX460F512L or PIC24FJ256GB110... probably the PIC32. Someone commented they were going to use the PIC32.. any progress on that?
By Pantheron
#75910
Hello,

i got the 2.8" oled with tp on a pcb with an lpc2148.

I can do some videos to show the speed if u want ;P



Pantheron
By gussy
#75951
Pantheron wrote:Hello,

i got the 2.8" oled with tp on a pcb with an lpc2148.

I can do some videos to show the speed if u want ;P



Pantheron
Please Share some more info!! What interface are you using?