LCD Short Test is a simple application to test if any of the data pins on your
LCD connection are shorting. It does this by raising each pin individually and
checking if any other pins are receiving the signal. Your best bet is to
disable the power to the LCD module while you test this. That’s best for it’s
protection and will prevent the output of false positives due to interaction
with the LCD driver itself.
Currently it does not test the 3 pins from PORTD that are on this port, nor can
it tell if you are shorting against the backlight, power, or contrast pins on
the port. Only D0-D7.
Possible modifications would be to get it working with the other PORTD pins on
J15, and get it to work with other ports.
Note: Be careful. You can’t do this to all of the ports, and make sure you
don’t, say, do it to the PORTC pins that are the UART Rx/Tx, since they are the
MIDI connection :). I did this, and I crashed MIOS, the PIC, and my MIDI
interface all at once!
DISCLAIMER: You might ruin both your PIC and your LCD module. Use at own risk. Personally, I’d wait before using this until one of the senior members says that doing this is a good idea.
How to read the output from the application:
The shorts are reported via MIDI sysex dumps. I only ever use the lower four bits in each byte so as to avoid using the 8’th bit and confusing the MIDI driver. In the dump you will see the port (0x0b for PORTB), followed by two bytes, representing which bit we have turned on (ie 0xFE is 11111110 in binary, which means we’ve risen the first pin). Following is another two bytes, representing the readout on the port (again with the data byte split into two bytes for Sysex transfer). Let’s say it’s 0xFC, which equals 11111100 in binary. That means that when we rose data pin 1, it rose both pins 1 and 2. Therefore there is a short between pins 1 and 2!
Full example:
Sysex message is F0 00 00 0B 0F 0E 0F 0C
Breaking this up, we have:
Sysex header: F0 00 00
Port: 0B (PORTB)
Risen pin: 0F 0E (0xFE, or binary 11111110, meaning pin 0 is risen)
Port readout: 0F 0C (0XFC, or binary 11111100, meaning both pin 0 and 1 are receiving signal)
Meaning: Pin 1 and two are shorting.
Obviously you will always see these in pairs (in the above example, pin 1 will also cause pin 0 to receive signal).
link: http://th0mas.sixbit.org/lcd_short_test_v0_1.zip
Again: Wait until someone says that this should be a safe thing to do before running it.
Cheers,
Tom