From Tim's website
Revision as of 12:00, 14 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