Recent content by popchops

  1. P

    Help with finite state machine please

    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...
  2. P

    Help with finite state machine please

    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...
  3. P

    Help with finite state machine please

    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...
  4. P

    20x2 hspiout problem

    Hi folks, I have a related question: do I need to connect SPI SDI pin if I only need SPI output? Is it ok to leave it floating? Thx - Pops.
  5. P

    Communications between devices...

    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...
  6. P

    Communications between devices...

    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...
  7. P

    DS18B20 - marked as obsolete(!)

    I also would like to know. ☝
  8. P

    ADC input impedance and capacitors.

    Does it matter if the ADC pin input goes >>5V or less than 0V, when the pin is not being sampled? Pops.
  9. P

    ADC input impedance and capacitors.

    Thanks very much. nA don't matter. So long as I'm not leaking mA. Pops.
  10. P

    ADC input impedance and capacitors.

    See below my wierd simulation. Does the ADC really leak current when its not measuring? Thanks !!
  11. P

    ADC input impedance and capacitors.

    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...
  12. P

    Bulk order of LSI LS7184N Quadrature Decoder IC

    Yes - I will use a picaxe 08M2. It's fast enough even for full quadrature detection of all edges up to 100 Hz. Thanks Hippy.
  13. P

    Bulk order of LSI LS7184N Quadrature Decoder IC

    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...
  14. P

    Minimal (Fast) Quadrature Detector code for (optical) Rotary Encoder

    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...
Top