http://www.youtube.com/watch?v=QvcJKPHmFQQ
This is my second project using the 08m2 to output a clock signal to a cmos 4026 counter.
Took a bit of brain bashing to work this one out. The sneaky hall sensor just keeps sending out a positive voltage so the picaxe goes mentl and the counter is all over the place.
So I used a cmos 4011 to cancel that signal to 0 volts so the the 08m2 is unaware anything is there. Then when the magnet passes it reverses the negative to a positive and the 08m2 wakes up and sends a pulse to the cmos 4026.
But wait you say the 4026 is a up counter so how is it counting down. It's not I used a sneaky bit of programming to trick it ( a simple for next loop )
That bit of code in the 3rd user manual to run a 7 segment display is all I used to go up or down. It simply wipes out the number and puts new number in but looks like it counts down as well as up.
This is my second project using the 08m2 to output a clock signal to a cmos 4026 counter.
Took a bit of brain bashing to work this one out. The sneaky hall sensor just keeps sending out a positive voltage so the picaxe goes mentl and the counter is all over the place.
So I used a cmos 4011 to cancel that signal to 0 volts so the the 08m2 is unaware anything is there. Then when the magnet passes it reverses the negative to a positive and the 08m2 wakes up and sends a pulse to the cmos 4026.
But wait you say the 4026 is a up counter so how is it counting down. It's not I used a sneaky bit of programming to trick it ( a simple for next loop )
That bit of code in the 3rd user manual to run a 7 segment display is all I used to go up or down. It simply wipes out the number and puts new number in but looks like it counts down as well as up.
Code:
display_gear_routine:
pulsout 4,5
if b1 =0 then endclk ' if its a zero return
for b8 = 1 to b3 ' b3 holds the gear value
pulsout 0,5 ' pulse out to value to pin 0
next b8 '
endclk:
return