Dear Forum, when I use (merely as an example) the command hi2cout 0, ("SD",1) (after HI2CSETUP) ,I can send this command to my touch screen (Digole 320x240 touchscreen). That works OK.
As I understand it, the command hi2cin 0,(B0,B1,B2,B3) should read a series of bytes that are send from the touchscreen to the Picaxe after I've sent the command hi2cout 0, ("RPNXYC").
However, the screen returns either 79, 2552, 255, 255 or 158, 60, 120, 240, depending on if the screen is touched or not. These values do not depend on where one touches the screen although this should be the case.
I now have two questions: 1) is the command hi2cin 0,(B0,B1,B2,B3) the right format for receiving a command from the slave (what is the meaning of the "0" ?) and 2) does the Picaxe (28x2) wait for an input forever, or does it continue after a time-out?
Attached is the programme I used.
Thanks very much in advance, Jan Jor.
As I understand it, the command hi2cin 0,(B0,B1,B2,B3) should read a series of bytes that are send from the touchscreen to the Picaxe after I've sent the command hi2cout 0, ("RPNXYC").
However, the screen returns either 79, 2552, 255, 255 or 158, 60, 120, 240, depending on if the screen is touched or not. These values do not depend on where one touches the screen although this should be the case.
I now have two questions: 1) is the command hi2cin 0,(B0,B1,B2,B3) the right format for receiving a command from the slave (what is the meaning of the "0" ?) and 2) does the Picaxe (28x2) wait for an input forever, or does it continue after a time-out?
Attached is the programme I used.
Thanks very much in advance, Jan Jor.
Attachments
-
1 KB Views: 5