AllanBertelsen
Senior Member
Hi -
I've been looking for a way to get as much out off tree pins on a 08M as possible. Without to much complexity.
The first idea was to read with to input pins and address with a third output pin. If output is low I can read sensor 1 and 2 and when output is high I can read sensor 3 and 4.
Then I got the idea to use a BCD to decimal decoder (fx. 74HC42). Now I use output 2 pins for addressing and one input for reading sensors. That will only give me four reading as in the firs approach.
The third idea is to us a Johnson decade counter with 10 decoded outputs 74HC4017. Here one output pin is use for resetting the counter. A second output pin is used as clock. And the third input pin is use for reading sensor. Now after reset the first output pin on 74HC4017 will be high and all other 9 pins low. This pin feed the first sensor witch can be read by the picaxe input pin. Then we lower and raise the second picaxe output pin (our clock). Now the second sensor is on the line. This can be done for 10 sensors. I think I saw that 74HC4017 has a carry output making it possible to connect several 74HC4017 in series. Then you can read 20, 30 or more sensors with only 3 pins.
Any experience with such approaches?
I've been looking for a way to get as much out off tree pins on a 08M as possible. Without to much complexity.
The first idea was to read with to input pins and address with a third output pin. If output is low I can read sensor 1 and 2 and when output is high I can read sensor 3 and 4.
Then I got the idea to use a BCD to decimal decoder (fx. 74HC42). Now I use output 2 pins for addressing and one input for reading sensors. That will only give me four reading as in the firs approach.
The third idea is to us a Johnson decade counter with 10 decoded outputs 74HC4017. Here one output pin is use for resetting the counter. A second output pin is used as clock. And the third input pin is use for reading sensor. Now after reset the first output pin on 74HC4017 will be high and all other 9 pins low. This pin feed the first sensor witch can be read by the picaxe input pin. Then we lower and raise the second picaxe output pin (our clock). Now the second sensor is on the line. This can be done for 10 sensors. I think I saw that 74HC4017 has a carry output making it possible to connect several 74HC4017 in series. Then you can read 20, 30 or more sensors with only 3 pins.
Any experience with such approaches?