I like it. Problem is - there is typically other stuff that needs to be run each iteration, whilst also maintaining the finite state machine. So what about this: nested select case commands allow evaluation of the transition request in each possible state. If the input in any given state...
As a novice programmer, I use a lot of If...Then...Else to consider combinations of state variables AND pin inputs but the code becomes horrendous to navigate and the IF condition seems quite inflexible. I know that switch case command is common in C for state machine implementations - I think...
I agree. An FSM action depends not only on the pin inputs but also the current STATE. I hit this thread because I am also interested in the most efficient method/ BASIC commands to use in coding a finite state machine. I don't want any time to be wasted considering states other than the current...
If I want to transmit only via HSPI, what do I need to do with the unused input pin (hspi sdi) on the Picaxe?
The command description for hspiout says:
"Due to the internal operation of the microcontrollers SPI port, a hspiout command will only function when the hspiin 'input pin' is in the...
Great thread. My problem is that I'm currently using HSPI pins to communicate between a 28X2 and a Texas Instruments digital attenuator PGA3211. (PGA only supports SPI). I really would like to read and write to another smaller 08M2 PICAXE but that only supports I2C, and HI2C uses the same pins...
Quick question: does the Picaxe ADC consume current when it's not sampling? Is there any internal impedance/leakage?
I ask because I'm trying to simulate my whole relay circuit including voltage divider (to measure relay drive voltage). The Picaxe provides a route to ground even when my...
Yes I currently have tested on a 28X2, just this minute soldering in a 08M2 to confirm it works. It will never be as good/elegant as the HW decoder chips, but it's good enough considering that my main loop needs a minimum IR timeout of 27ms to scan for IR input. Cannot be interrupted in this...
Thanks again Hippy. The interrupt flags might be very brief, so I don't want to poll them some time after the interrupt. This helps me to decide that, rather than encoding information and timing interrupts together, I need one fast interrupt and separate stable +/- status indicated by a second...