minor inconvenience in the process), the characters will
all be displayed together as they are being entered
Once the four input names are entered, the variables
for each formula are set. Each variable is a word-sized
numeric value, entered as individual digits with leading
zeros as needed. Variables 1, 2, and 3 will be used in the
conversion formula for input 1/ADC channel 0; variables
4, 5, and 6 for input 2/ADC 1; and variables 7, 8, and 9
for input 3/ADC 3.
The conversion formula for the counter/timer input
on portB. 6 differs slightly from the ADC conversion
formula in that there is no offset variable:
Count = (raw count value from timer1 variable10)
After all the names and formula variables are
entered, the software resets and starts calculating
and displaying your data with updates every half
second. In Figure 1, you can see that my project's
software and display format is slightly different from
that described here because it's a dedicated unit
that I don't plan to use for other purposes. If you
have a similar permanent application in mind, you
can omit the user interface buttons and input
subroutines, and just hard-code the input names
and variable values. The software described here
(available at the article link) uses up just over 1.3K
words of the PIC's 2K word Flash memory.
The very simple schematic for the process monitor is
shown in Figure 4. The three-button user interface uses
the remaining digital-mode inputs on portA, while portB
is configured with one digital input for timer1 on portB. 6
and digital outputs to drive a HD44780-compatible
alphanumeric LCD. One portA and one portB outputs
are available in case you want to modify the code so
your process monitor can also be a process controller.
The signal conditioning circuit for each analog input
will have to be tailored to your particular application. It
36 January 2014
■ FIGURE 5. Printed circuit board for this project.
■ FIGURE 4. Schematic of the process monitor. Refer to the text for analog input circuit options.