|
Forum Index : Microcontroller and PC projects : Touch SPI Bug?
| Author | Message | ||||
| panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1116 |
Using PM's 470 backpack, I have come across a problem that appears to be a bug? I am running 5.04.09 running on a 64 pin 470 board with an SSD1963 7" display If I try to use D13 (470 pin 50) on the Arduino shield which is SPI Clk as a digital out, as soon as I set it to 1 the touch function on the 7" screen stops working. I have checked the board and the 7" display uses SPI2 which should mean that using SPI1Clk (the D13 pin referred to above) should have no impact on touch? The code below demonstrates the issue - the top touch checkbox works as it should for multiple touches but as soon as the bottom checkbox is touched, all touch functionality stops and the only recovery is a power reset. If the line pin(50)=1 in the touchdown interrupt is commented out, both buttons work as they should when touched. ' Peter Mather 470 board running 5.04.09 ' with SSD1963 7" display ' initialise graphics cls font 4,2 setpin 50,dout ' D13 which is SPI1Clk pin(50)=0 ' all works when SPI1Clk is low GUI checkbox #1,"Test Touch",50,20,100,RGB(green) gui checkbox #2,"Test Touch 2",50,220,100,RGB(green) gui interrupt TouchDown 'Main program loop entry ctrlval(#1) = 0 ctrlval(#2) = 0 do loop print " Program error - should never get here! " end ' Interrupt service routines sub TouchDown if ctrlval(#2) = 1 then print "Button 2 touched" pin(50)=1 ' this will now disable touch else Print "Button 1 touched" endif End sub If I have misread the manual on the SPI usage, I would appreciate any advice on where I have gone wrong. Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
Works OK for me. ![]() No errors, no lockups, touch continues to work fine. Smoke makes things work. When the smoke gets out, it stops! |
||||
| panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1116 |
What platform and what software version G? My config is ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
E64 module(same chip as you), 5.04.08 I have one permanently setup here with a 7" LCD on it for development, which is why I could test your code immediately. Smoke makes things work. When the smoke gets out, it stops! |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1044 |
T_CS is on pin 51. Maybe a bridge between pins 50 & 51 so when pin 50=1 then the touch T_CS pin won't pull low to select the touch. Gerry F4 H7FotSF4xGT |
||||
| panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1116 |
Bingo! Got it in 1 Gerry - thanks and apologies to Geoff/Peter. Thanks, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
Nice suggestion, Gerry!!!!! Smoke makes things work. When the smoke gets out, it stops! |
||||
| panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1116 |
SOAB! Bin using this board for over 2 years but never D13 till now! Mr. Murphy has a lot to answer for! Thanks G and Gerry, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |