Stupid is as stupid...

Well after looking at the test circuit again I realised that I was using a pin on the PIC for 2 incompatible purposes, driving the RS232 communications and the enable line for the LCD display. Doh. One minor change and it is all working.

I discovered a handy procedure in the JAL libraries to display a progress bar or bar graph and although I could write my own it was quicker to just use this one. Voilá, a bar chart showing the analogue value, in this case a light level detected using a light-dependent resistor.

The LCD is only for testing and playing purposes, the real beef is the RS232 connection, shown here on an HP iPaq running Pocket Zeus Lite as a basic serial terminal.

The PIC is programmed to output the analogue value once a second (roughly) in a standardised 8-character format of

C1V0099# [C = channel; V = value (10-bit, range 0-1023); # = terminator]

which can be read by anything that can understand RS232.

So far only one channel is being implemented, but I'm going to remove the LCD now, re-program for 8 channels and start using the PIC timer and interrupts to get an exact 1 second interval between sending each set of 8 values.

Initially I'm going to use a Psion II for testing (seriously!) and later on build a bespoke dashboard module using a PIC 16F873, graphical display and steering column switches.

Comments

Popular posts from this blog

Skoda Rapid Heater Re-circulation Motor Repair

Apple iPad SSH Connection to Linux Laptop

Update on the touch monitor