Using SX pins for the +5 and ground of a sensor
![John Kauffman](https://forums.parallax.com/uploads/userpics/555/nZBNEPT0B6FMD.jpg)
I'm using a Memsic accelerometer (Parallax part #28017) and an SX28. The project needs to be small, so I am building it around a couple of DIP sockets strapped to a 9 volt battery.
I recall from another project on a forum that if the current demands were not too high, the SX pins could be used as the Vdd and VSS for the sensor. Then SX can then turn on the sensor only when needed.
The SX datasheet says SX pins source/sink 45 mA. Memsic sensor datasheet says it uses less then 5 mA.
The question is how to actually wire and code it.
- Do I set the sensor pin +5 to RC.1 and sensor ground pin to RC.2 and then in code set RC.1 high and RC.2 low?
- Do I need at least one of the sensor pins to go directly to the power supply?
- An additinal sensor pin is supposed to always be low. Can I just wire that to RC.3 & set RC.3 low?
Thanks.
I recall from another project on a forum that if the current demands were not too high, the SX pins could be used as the Vdd and VSS for the sensor. Then SX can then turn on the sensor only when needed.
The SX datasheet says SX pins source/sink 45 mA. Memsic sensor datasheet says it uses less then 5 mA.
The question is how to actually wire and code it.
- Do I set the sensor pin +5 to RC.1 and sensor ground pin to RC.2 and then in code set RC.1 high and RC.2 low?
- Do I need at least one of the sensor pins to go directly to the power supply?
- An additinal sensor pin is supposed to always be low. Can I just wire that to RC.3 & set RC.3 low?
Thanks.
Comments
2) Connect the sensor +5V pin to any available SX I/O pin and set that pin to high when you want the sensor on
How do you put a SX pin in a "high impedance" state?
Thnx,
MikeS
You make it an INPUT.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
As Homer would say,...... "D'oh!" I knew that.
MikeS