From Tim's website
Revision as of 08:31, 21 April 2011 by Tim (talk | contribs)
Jump to: navigation, search

Is the oscillator running?

Check the signal on OSC2 (pin 10) - there should be a 4MHz sine wave.

If this isn't observed then check the PIC config word includes either the HS or XT type oscillators. The version available for download currently has a bug since it selects an R/C oscillator.

Is the program running?

Pull the input to pin 2 (AN0) high and low and checking the output of pin 26 (B5) - It should match the input.

If this isn't observed then check the LCD connections (see below) - The program waits indefinitely on a busy signal from the LCD at the start.

Does anything appear on the display?

If the screen is completely blank or just a series of black squares then check the contrast input to the LCD.

The message "Please Wait..." should appear at the start.

If this message isn't observed then check the LCD connections and view the control lines with an oscilloscope (see image).

LCD control signals
  1. The program starts with an initialisation sequence:
    1. 15ms delay
    2. RS low (select register 0)
    3. Repeat the following 3 times
      1. Set data
      2. EN low (clock data in)
      3. 200us delay
      4. EN high
      5. 5ms delay
  2. Send five commands followed by 14 characters (Image shows two characters)
    1. RS low
    2. RW high (read)
    3. Wait for D7 to go low
    4. RW low (write)
    5. Set data
    6. EN low (clock data in)
    7. 200us delay
    8. EN high
    9. Wait 5ms if a command was sent

Does a counter increment on the display?

The message "Please Wait..." should appear at the start and the counter should increase once per second if the input to pin 2 (AN0) is receiving pulses from a radio receiver.

If the counter isn't incrementing then check the output of pin 26 (B5) is pulsing approximately once per second, which should follow the input to pin 2 (AN0).

Display counter increments but characters are garbled

There is no consistency checking on the input pulses, so if there are errors on the input then the displayed text will contain errors.

The error LED comes on

The error LED comes on when a pulse is received that doesn't match one of the expected patterns (see the Rugby Clock Circuit page). It will go out when a long pulse is received marking the start of a new minute. If you have a good MSF signal then the clock will function properly and the error LED will stay off. If there are errors in the signal then the display may show invalid or incorrect values and the error LED should come on.