18m2 contolling nintendo ds lite touch screen

ajcgkm

New Member
Another two days of head banging but finally sussed it out and here it is for you to do as you see fit. Link to video showing what I did with it on youtube, lets see what you can do.

https://www.youtube.com/watch?v=sJ4GRVSkJ0g

here is schematicpicaxe ds lite touch screen.jpg

Code:
'**************************************
'* 18m2 nintendo ds lite touch screen *
'* by A.J.Cartwright 9/2/13           *
'* 4 wire touch screen x1,y1,x2,y2    *
'*       __________                   *
'*      |o  o  o  o| 4 pins from      *        
'*       x1 y2 x2 y1 ds lite screen   *
'*                                    *
'**************************************


symbol x_pos =w0	'x coordinates
symbol y_pos =w2	'y coordinates

main:
 'once working write whatever code you want here
 pause 100
 debug w0	'once your happy that your screen is showing data
 debug w2	'remove these two lines they are only to show it's working
 gosub readx_pos
 gosub ready_pos
goto main 


'******************************
'code to read the x position
readx_pos:
 let dirsB =%01010000 
 let pinsB =%00010000 	
 readadc B.7,x_pos 	' read x position and store in x_pos
 pause 5
return


'******************************
'code to read the y position
ready_pos:
 let dirsB =%10100000
 let pinsB =%00100000
 readadc B.4,y_pos	' read y postion and store in y_pos
 pause 5
return
 
Top