Stupid is as stupid...
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
Post a Comment