288Views5Replies
Is Picaxe capable of recognizing rising edge clock signals?
In other words, is the Picaxe microcontroller (any size) capable of recognizing a change from low to high (pressing a switch for instance) and acting on that change itself, not just the presence of a high? Or is there at least a way of emulating this type of response in the code?
Thanks!
Comments
9 years ago
As one who wrote code to actually branch on a raising edge on a Pic pin.
I can not lie, the answer to your question is a YES !
Both polled or interrupt also YES.
However, sorry to say, the branch when needed Pic instruction code does not really exist :-)
So, I'm curious, what are you contemplating that gives rise to something in this world where most everything is going down hill ?
A
9 years ago
Most microcontrollers will implement Interrupts as either level or edge triggered, the PICs are unlikely not to, PICaxe which is a proprietary system, may or may not implement interrupts in their code though.
You COULD synthesise the function with a polled method like:
Repeat
READ pins.
IF pins <> old pins THEN
we have a change and can work out what and use it.
Oldpins:= pins.
Until false;
Answer 9 years ago
Yes they do support interrupts - you need to get the right family member though so read the manuals and specs, not that difficult as it's aimed at an educational market.
9 years ago
Maybe the datasheets answer your question?
http://www.rev-ed.co.uk/picaxe/
9 years ago
Yeah, basic stamp has a function called pulsin, and picaxe probably has a similar function. It basically waits for either a high or a low (you specify)