SPI Flash/Touch

More
25 Apr 2012 06:07 #31 by PhracturedBlue
SPI Flash/Touch was created by PhracturedBlue
rcH4x0r,
I noticed you configured the SPI Flash for Mode 3 (CPOL=1, SCLK is '1' on idle) whereas the SPI Touch module seems to need Mode 0 (CPOL=0, SCLK is '0' on idle). Is this based on observation or just what you had and it worked? The SST chip supports either mode, but when I set CPOL=0, the flash stopped responding (and the touch screen DIDN'T start responding any better) so I guess it isn't quite that simple. The code I have now toggles PenIRQ on touch/release, which is good, but I'm not getting any data back from the TSC2008 on the serial bus so far.

I don't think my logic analyzer is fast enough to capture the SPI traffic from the stock firmware, and I'm not really sure what I am doing wrong.

Please Log in or Create an account to join the conversation.

More
25 Apr 2012 13:46 #35 by PhracturedBlue
Replied by PhracturedBlue on topic Re: SPI Flash/Touch
I figured it out. the PSI1 was indeed misconfigured. I had to set both CPOL=0 and CPHA=0, and then configure the PenIRQ as internal pullup, and then I was able to read from the touch sensor.

Please Log in or Create an account to join the conversation.

More
25 Apr 2012 17:53 #41 by rcH4x0r
Replied by rcH4x0r on topic Re: SPI Flash/Touch
Ok, looks like you got me there. I did look at the Walkera code for the flash chip & thought I got it right but apparently not :S

Are you getting XY coords now?

Please Log in or Create an account to join the conversation.

More
25 Apr 2012 18:38 - 25 Apr 2012 18:46 #42 by PhracturedBlue
Replied by PhracturedBlue on topic Re: SPI Flash/Touch
Yep, X, Y, and Z are working (Z looks a little funny, I'm not sure the pressure sensor actually works properly to be honest)

Edit: I didn't write the mapping routines to convert the raw data to pixel coordinates yet, but that is pretty easy. What I am not sure of is whether we need a calibration setting or if all the Devo-8 Tx's can get by with the same calibration values.
Last edit: 25 Apr 2012 18:46 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
25 Apr 2012 22:04 - 25 Apr 2012 22:06 #50 by rcH4x0r
Replied by rcH4x0r on topic Re: SPI Flash/Touch
Woot, you just reminded me of another easy to find field in the settings - touchscreen calibration :) Have you looked for the pen down handler in the original Walkera code?

100% not all touchscreens are the same
Last edit: 25 Apr 2012 22:06 by rcH4x0r.

Please Log in or Create an account to join the conversation.

More
25 Apr 2012 22:21 #51 by PhracturedBlue
Replied by PhracturedBlue on topic Re: SPI Flash/Touch
I didn't spend much time on it. It is pretty easy to manage the touch sensor so there was no need for reverse engineering. There are several standard calibration routines out there, so I'll probably just pick one. I'm currently only using 8-bit mode and letting the sensor do the noise-reduction. I need to see if that is sufficient accuracy/reliability or if I need 12-bit or averaging. Initial testing indicated that what I've got is probably good enough.

Please Log in or Create an account to join the conversation.

More
26 Apr 2012 09:33 #55 by FDR
Replied by FDR on topic Re: SPI Flash/Touch

PhracturedBlue wrote: ....
Edit: I didn't write the mapping routines to convert the raw data to pixel coordinates yet, but that is pretty easy. What I am not sure of is whether we need a calibration setting or if all the Devo-8 Tx's can get by with the same calibration values.


If the LCD and touch-screen assembly has large tolerances, than it can be useful to calibrate each unit to hanlde those tiny buttons accurately...

P.S: You haven't send me the settings mapping program to play with! ;)
I will be out from next tuesday to thursday...

Please Log in or Create an account to join the conversation.

More
26 Apr 2012 12:52 #56 by PhracturedBlue
Replied by PhracturedBlue on topic Re: SPI Flash/Touch

FDR wrote:

PhracturedBlue wrote: ....
If the LCD and touch-screen assembly has large tolerances, than it can be useful to calibrate each unit to hanlde those tiny buttons accurately...

or we don't use such small boxed in our GUI...

P.S: You haven't send me the settings mapping program to play with! ;)
I will be out from next tuesday to thursday...

umm..which setting mapping program are we discussing? I don't recall that discussion.

Please Log in or Create an account to join the conversation.

More
26 Apr 2012 12:58 #57 by FDR
Replied by FDR on topic Re: SPI Flash/Touch
Oops! :oops:
Sorry my bad, rcH4x0r asked me to map the system settings with HIS tool...

Please Log in or Create an account to join the conversation.

Time to create page: 0.050 seconds
Powered by Kunena Forum