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?


sort by: active | newest | oldest
iceng6 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 ?

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:


READ pins.
IF pins <> old pins THEN
we have a change and can work out what and use it.
Oldpins:= pins.

Until false;
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.
Kiteman6 years ago
Maybe the datasheets answer your question?
76543216 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)