touchscreen (difference between let pins and high/low)

dsvilko

Senior Member
I have finally received an inexpensive touchscreen from DX (http://www.dealextreme.com/details.dx/sku.20654) and I am ready to start experimenting. The theory seems simple enough and there is a good tutorial:
http://www.user.dccnet.com/wrigter/picaxe/08M sea of keys and touchpad encoder.htm that I plan to follow.
The very simple and elegant 08M code provided in that page uses the let dirs/pins commands to switch between measuring the two axes. What I would like to know is if it is possible/safe to use the discreet let pin/output/input/high/low commands for the same purpose. I'll be using the 20X2 and it would be much more convenient if I don't have to worry about the rest of the pins on the selected port. Hope you understand what I am getting at :)
Can two 'high'(or low) picaxe outputs be connected through a resistor? Is there any other dangerous connection?
 

Chavaquiah

Senior Member
Absolutely possible and actually safer, yes. Using dirs/pins is faster when you want to control/read all pins from a port but, otherwise, doing it one pin at a time works just the same (except you don't have to worry about changing unwanted pins).

When reading multiple digital inputs, it should be better to read the whole port and then mask out unwanted bits (good to detect simultaneous signals, for instance) but, again, reading one pin at a time is not only only possible but even safer.

Although I suspect in this case you'll be using ADC instead of digital reads, so maybe a moot point.

When connecting two pins together the resistor is sort of mandatory. Otherwise, a short circuit might happen.
 
Top