• 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


    Mysterious PORTB problem

    Thread Starter: xldaedalus

    I'm using Proton+ to develop firmware for a product with switches. The MCU is an 18F26K22. Most of the switches reside on PORTB. I am NOT using a...

    xldaedalus Today, 03:21 Go to last post

    PIC18F1330 PLL problem

    Thread Starter: rcurl

    I'm just starting out on a new project that uses a PIC18F1330. I haven't used this specific chip before, so I began by trying to blink an LED just...

    tumbleweed Today, 11:13 Go to last post

    Pic16f18877 oread

    Thread Starter: evoortman

    Hi, On a PIC16F18877 the OREAD command doesn't seem to work. The code is working on a PIC16F1939. Both controllers use 32MHz int osc. If i...

    See_Mos Today, 11:19 Go to last post

    Lin bus and auto baud detection

    Thread Starter: Tim

    Lin bus looks to be a great system for an application i'm working on. One of the main things is the slave can be really simple without needing a...

    towlerg Yesterday, 15:13 Go to last post