Search results

  1. C

    Time variable at different clock frequencies

    I've been using the time variable with different clock frequencies and found that if I set 1 Mhz then the time variable increments about once every 16 seconds. Could the compiler be assuming that any clock frequency other than 4 MHz is 16MHz? This is with 08M2+ using programming editor version...
  2. C

    Reset on setfreq k31 command 14M2

    I had an interesting problem with a program running on a 14M2. It has the usual structure: init: ' initialise code sertxd ("hello", cr,lf) main: ' main code sertxd ("main", cr, lf) setfreq k31 ' delay handling nap 3 goto main I'm trying to minimise the power...
  3. C

    Measuring the PicAxe Supply Voltage

    Here's a code fragment I use for monitoring the supply voltage: symbol ADCON0 = $1f readBattery: ; enable the ADC peek ADCON0, b2 b2 = b2 or 1 ; set bit 0 to enable the ADC poke ADCON0, b2 ; get the supply voltage by reading the 1.024V ; adc calibration voltage using the supply voltage...
  4. C

    Pulsin edge detection

    I've spent some time looking but can't find a clear answer to this. I can see that pulsin specifies which edge is used to detect the start of the period but which edge is used to detect the end? Would pulsin c.3, 1, w0 return the time between successive rising edges on c.3 or will it be from...
Top