Proton BASIC Compiler - Checking your Pic's clock

  • PicŪ Basic

  • Checking your Pic's clock

    An easy way to see if your PICŪ is running, and at the desired clock speed, is to use a scope, or a LED and a 1k resistor. The LED's long lead goes to the PICŪ pin and the short lead goes through the 1k resistor to GND (or 0V)

    You can use any pin available on the PICŪ (except the Vpp = Programming pin), and what you need to test is a simple routine

              PortA,0 = 1           ' Switch PICŪ pin On
              Delayms 500          ' Half second delay
              PortA,0 = 0           ' Switch pic pin Off
              Delayms 500          ' Half second delay
              Goto TEST            ' Repeat over and over
    By observing the flash rate of the LED (or the scope's trace), you will see if the rate is about correct.
    Now you know the following -
    The PICŪ is running (phew !)
    The PICŪ clock rate is set correctly
    Code timings is going to work out

    If the PICŪ clock was set incorrectly, the flash rate will be either too fast or too slow.

    If you don't get the LED to flash, then check the PICŪ supply voltage, if ok
    then check the configuration settings, especially the clock source, ie Internal Osc, XT, etc.
    If you're using an Xtal or other external clock, it may be easiest to start by using the internal clock,
    if the PICŪ is running then,
    you know the only problem is either the external oscillator or the configuration clock source.

    If the flash rate is incorrect, then the clock is either specified wrong or the oscillator settings is incorrect.

    Consult the PDF file for the specific PICŪ to set it right.

    PICŪ are easy to get going, if they don't it's usually a small (but important) overlook somewhere.
  • Recent Activity


    Valid time in NMEA sentance

    Thread Starter: SimonJA

    Is there any way to know that a GPS nmea sentence has the correct time? I use a module to keep a pic rtc accurate but have noticed that when...

    david Yesterday, 20:40 Go to last post

    I'm over the moon with joy. :-)

    Thread Starter: Les

    I just had to show you this, because I am over the moon with it. LOL I've just about finished procedures on the Proton 8-bit compiler so I am busy...

    towlerg Yesterday, 16:13 Go to last post

    GPS speed logger for RC planes.

    Thread Starter: david

    Hi All, This is a simple project to allow the logging of RC plane speeds to help determine battery, motor and prop variables. The code is crude and...

    david Yesterday, 21:01 Go to last post