If it is a resistive touchscreen then you would be able to read it like the Propeller would a potentiometer, right? Just a simple capacitor charge circuit. Then it could be read in only one cog.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Computers are microcontrolled.
@tripp, your schematic seems to be missing the LCD control lines RD* WR* RS .... Are there other connections not shown?
Also I have to assume Propeller RES* is connected correctly.
microcontrolled said...
If it is a resistive touchscreen then you would be able to read it like the Propeller would a potentiometer, right?
You're basically right. A 4 wire touchscreen is like 4 resistors arranged in a big plus + with one resistor per "arm" ....
Attached is a drawing that shows some basic Propeller pin connections ... the capacitors are missing in the measurement points.
P11,12,13,14,15 would be connected the same in every figure.
In the upper panels, P11 = out and high, P14 = out and low, P15 state = 1 no touch, 0 touch.
In the lower left panel, P11 is input, P12 = out and high, P13 = out and low, P14 and P15 make the ADC input connections.
In the lower left panel, P11 is input, P15 = out and high, P14 = out and low, P13 and P12 make the ADC input connections.
I have no idea if this works, but this is what I'll try. I would like some feedback on it.
A Propeller ADC is good for about 256 levels, so the resolution may be good enough to work.
The RES is connected correctly, see updated PDF. Are there other connections not shown?: all of·the LCD pins, and some DC/DC step up components for backligt on a 2.4" LCD.
microcontrolled said...
If it is a resistive touchscreen then you would be able to read it like the Propeller would a potentiometer, right?
A dedicated touchscreen ADC has it's advantages though.· Most have a interrupt pin to signal a touch, so you can use the cog for other tasks while checking the pin.·
Here is a program that could do the capacitor charge read and convert it to coordinates. It is commented for use and should work well. Read the comments for instructions. Try it out and tell me if it works. I have a schematic attached as well, but you would need this circuit on the X and Y, not just the X.
I am hoping that you do not deside to use an IC, after I wrote the program and all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Computers are microcontrolled.
Here is an updated touchscreen Propeller ADC drawing (pins reassigned).
The caps and resistors would be the same as in the counters app note ADC.spin.
6 pins to read the touchscreen seems a bit much.
@micro, your code looks very nice. Want to try writing an object like the ADC.spin for my drawing?
I'm thinking an object would have the following public methods:
pub start(xi,xo,xg,yi,yo,yg)
{{
xi = adcpinx
xo = fbpinx
xg = xgnd
yi = adcpiny
yo = fbpiny
yg = ygnd
}}
pub stop
pub touched
{{
is touched ... pins set to detect touch mostly
}}
pub getX
pub getY
What makes your schematic better? More accurate? Just wondering, since I'm still not too good on my circuit designing skills. Thanks for the complement on my object. I used the equation for calculating the exact cap time from the "TestRCDecay" object for the Propeller labs. The setting for the CTR registers was also from there, but the rest was my own. I'll look at your circuit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Computers are microcontrolled.
@tripp, you still need to add the LCD control lines to your schematic.
@micro, I guess a few differences are where the input logic 1 level threshold is for a given chip at a given temperature (capacitance changes over temperature and a balanced circuit with two caps mitigates that to a point). Using your approach only 4 Propeller pins would be necessary. I'm thinking that another resistor may also be necessary in the x and y of my drawing. In any event, almost exactly the same layout can be used.
microcontrolled said...
In my setup only 2 propeller pins would be needed. I'll start experimenting with yours now.
Actually, I don't believe the axes can always be tied to ground. Look at my first picture which is a lot like yours except it doesn't show the charge capacitor. The axis you're reading needs to behave like the center tap of a variable resistor. If the other side of the "center tap" is tied to ground constantly, the reading will not be very useful. In the picture below you could replace RL with your capacitor.
The reason for P11 and the extra resistor in my first picture with the 4 drawings is for detecting a touch (pins are different between the two drawings). Detecting touch is important because constantly reading and saving the values won't work. So even with your method, it seems 5 pins are necessary. Of course if you can prove me wrong, it would be a good thing.
Order placed! Very reasonable shipping cost from Xtune as well.
I noticed the Xtune board does not include the SD card adaptor, but that the one you used is available from SparcFun - I may use a different one, but can you confirm that this is the one you used: Breakout Board for DOSonCHIP FAT16 FAT32 uSD Module (sku: BOB-08215) ?
Thanks,
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
I've ordered the board & LCD and I'm still waiting for it.
For the touchscreen, I plain to use the ADS7843 controller, 16 pin SOIC package and serial communication to the propeller.
As I receive the board, i'll try to make an object for this controller.
I'll send my work as it was functionnal.
Thank you tripp for this nice job !
Tripp : On wich propeller I/O do you connect the LCD ? and can you post a programm to use the LCD ?
Board arrived! Just had time to fire it up and try Rayman's Serial control driver (with your initialization code mods) - and I can draw circles on the screen! It will take me a while to get to grips with the LCD controller, but I'll post some driver code when I manage to get some time to write some.
One thing - when I load an image with Rayman's software , only about half of it appears on the screen - i.e. it's shifted right by about half the screen width. Any ideas? Could you post the actual code you used?
Also, can you tell me how the screen is fixed to the circuit board - my screen is lifting on one end, but I'm afraid to lift it up any further (which I would need to do to try to fix it down permanently).
Thanks,
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
RossH: Here is the code i use for displaying images, it uses a 10Mhz crystal so you may need to change the crystal settings in code.
I get the same result when displaying images in 16-bit try to check the 24-bit radiobutton.
I cant get circle funktion working, can you post your code?
Thanks! I didn't think to try 24 bit. I'll try your code out tonight, and also post the code I used (which was just Raymans code but with your initialization changes).
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
I have the same problem as you for driving the LCD :
When using Rayman's Serial control driver, with Tripp initialisation code :
I can draw lines as I need
the circles are half drawed
Pixel function don't work
Background and foreground functions are OK
for Images only about half of it appears on the screen
I have tried to modify the initialisation code, but without success
Does anyone have modified with success the driver ?
This is very cool. Can you provide a mechanical spec. If a header can be soldered to it to link to a control / communications board, your on your way.
Excellent work!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent!
Send $1 to CannibalRobotics.com.
Here is the results of my effoerts to modify the PSM driver to match the ProPad.
Circles are well drawed, as pixels, lines, but there is a bug with the rectangles.
I can download images on the screen now !
I'll post the driver if someone is intersested !!
Hi MagIO2...thanks for your reply. I just want to understand if I can save some external memory in order to have a kindo of portable device. In that case I do not have a PC to "prepare" the image and send it to the prop but I will have the prop to "draw" the image. Since I expect to refresh the image every 1/2 sec, if I can use the display memory as "video buffer", I will not need to add any external memory.
Nicola
Yes, you can use the display-memory as screen buffer. But if you need to re-read what's been written it will get very slow. The transmission is really fast if you can write the whole image at once from upper left to lower right (having windows smaller than the whole display is possible). This is a bulk-write .. you set the address once and then send all the data.
But random access is expensive. You will see the image generation then. Problem here is:
1. you have to address each pixel which means to send the address
2. switching from write to read costs extra cycles, as the display will answer the read one cycle later.
Comments
Here is the schematic:
Hires PDF: http://www.xtune.se/images/PropPad/schematic.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
SX Spinning light display·
http://designedbymemicros.blogspot.com/
Also I have to assume Propeller RES* is connected correctly.
You're basically right. A 4 wire touchscreen is like 4 resistors arranged in a big plus + with one resistor per "arm" ....
Attached is a drawing that shows some basic Propeller pin connections ... the capacitors are missing in the measurement points.
P11,12,13,14,15 would be connected the same in every figure.
In the upper panels, P11 = out and high, P14 = out and low, P15 state = 1 no touch, 0 touch.
In the lower left panel, P11 is input, P12 = out and high, P13 = out and low, P14 and P15 make the ADC input connections.
In the lower left panel, P11 is input, P15 = out and high, P14 = out and low, P13 and P12 make the ADC input connections.
I have no idea if this works, but this is what I'll try. I would like some feedback on it.
A Propeller ADC is good for about 256 levels, so the resolution may be good enough to work.
Post Edited (jazzed) : 2/7/2010 6:57:24 AM GMT
Are there other connections not shown?: all of·the LCD pins, and some DC/DC step up components for backligt on a 2.4" LCD.
I've had a busy weekend, but I've had time to assemble one PropPad.
Link: http://www.xtune.se/product_info.php?products_id=131·price $80
And for all that have bought a PCB you need to ad a resistor on J2, see picture:
Or monut a smd powerswith from sparkfun: sku: COM-08769
·
I am hoping that you do not deside to use an IC, after I wrote the program and all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
SX Spinning light display·
http://designedbymemicros.blogspot.com/
The caps and resistors would be the same as in the counters app note ADC.spin.
6 pins to read the touchscreen seems a bit much.
@micro, your code looks very nice. Want to try writing an object like the ADC.spin for my drawing?
I'm thinking an object would have the following public methods:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
SX Spinning light display·
http://designedbymemicros.blogspot.com/
@micro, I guess a few differences are where the input logic 1 level threshold is for a given chip at a given temperature (capacitance changes over temperature and a balanced circuit with two caps mitigates that to a point). Using your approach only 4 Propeller pins would be necessary. I'm thinking that another resistor may also be necessary in the x and y of my drawing. In any event, almost exactly the same layout can be used.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.
Robots are microcontrolled.
I am microcontrolled.
SX Spinning light display·
http://designedbymemicros.blogspot.com/
The reason for P11 and the extra resistor in my first picture with the 4 drawings is for detecting a touch (pins are different between the two drawings). Detecting touch is important because constantly reading and saving the values won't work. So even with your method, it seems 5 pins are necessary. Of course if you can prove me wrong, it would be a good thing.
I'd order one right now - but the Xtune web site won't let me ship one to Australia
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
Order placed! Very reasonable shipping cost from Xtune as well.
I noticed the Xtune board does not include the SD card adaptor, but that the one you used is available from SparcFun - I may use a different one, but can you confirm that this is the one you used: Breakout Board for DOSonCHIP FAT16 FAT32 uSD Module (sku: BOB-08215) ?
Thanks,
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
I have looked to the connection diagram but I do not see how you connect the display, how many pins do you use?
Thanks
Nicola
I've ordered the board & LCD and I'm still waiting for it.
For the touchscreen, I plain to use the ADS7843 controller, 16 pin SOIC package and serial communication to the propeller.
As I receive the board, i'll try to make an object for this controller.
I'll send my work as it was functionnal.
Thank you tripp for this nice job !
Tripp : On wich propeller I/O do you connect the LCD ? and can you post a programm to use the LCD ?
The Breakout Board for microSD Transflash is: http://www.sparkfun.com/commerce/product_info.php?products_id=544
Be careful when you·solder the connections to the touchscreen, losen the LCD before.
·
Board arrived! Just had time to fire it up and try Rayman's Serial control driver (with your initialization code mods) - and I can draw circles on the screen! It will take me a while to get to grips with the LCD controller, but I'll post some driver code when I manage to get some time to write some.
One thing - when I load an image with Rayman's software , only about half of it appears on the screen - i.e. it's shifted right by about half the screen width. Any ideas? Could you post the actual code you used?
Also, can you tell me how the screen is fixed to the circuit board - my screen is lifting on one end, but I'm afraid to lift it up any further (which I would need to do to try to fix it down permanently).
Thanks,
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
I get the same result when displaying images in 16-bit try to check the 24-bit radiobutton.
I cant get circle funktion working, can you post your code?
Mike: you can now order a fully assembled and tested·unit: http://www.xtune.se/product_info.php?products_id=131
Edit: the LCD is fitted with double sided tape, just slide a nail under the LCD to get it loose.
Post Edited (tripp) : 2/18/2010 7:21:52 PM GMT
Thanks! I didn't think to try 24 bit. I'll try your code out tonight, and also post the code I used (which was just Raymans code but with your initialization changes).
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
I have the same problem as you for driving the LCD :
When using Rayman's Serial control driver, with Tripp initialisation code :
I can draw lines as I need
the circles are half drawed
Pixel function don't work
Background and foreground functions are OK
for Images only about half of it appears on the screen
I have tried to modify the initialisation code, but without success
Does anyone have modified with success the driver ?
Best regards
Excellent work!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent!
Send $1 to CannibalRobotics.com.
But yes, you could also read the memory. But it's better to know what you display, as reading is slower than writing.
Here is the results of my effoerts to modify the PSM driver to match the ProPad.
Circles are well drawed, as pixels, lines, but there is a bug with the rectangles.
I can download images on the screen now !
I'll post the driver if someone is intersested !!
Best regards from France
Looks really amazing btw.
Graham
Nicola
But random access is expensive. You will see the image generation then. Problem here is:
1. you have to address each pixel which means to send the address
2. switching from write to read costs extra cycles, as the display will answer the read one cycle later.
What kind of image do you draw?