17.04.2014 Views

Software Manual - G4JNT

Software Manual - G4JNT

Software Manual - G4JNT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When turned on the display will briefly show an introductory message, then start showing the four<br />

voltages in a display similar to that shown. Chan 1 is the voltage on the pin labelled 0 on the 4-way<br />

header, Chan 2 that on pin 1, Chan 3 on pin 2 and Chan 4 on pin 4.<br />

To change the position of the decimal point in any channel, push down and hold the push button for<br />

two seconds. The display should then change to that of Figure 2 .<br />

Rotating the rotary controller will then shift the display between 00000/0.000/00.00/000.0 When<br />

it is showing the correct format for Channel , press the button briefly, and the display will change to<br />

showing the format for channel 2. Rotate the knob to obtain the desired format and push briefly to<br />

store the format for this channel. Repeat for channels 3 and 4. Pressing the button will rotate<br />

through all four channels repeatedly allowing you to alter the position of the decimal point. When<br />

all are set to your satisfaction, press and hold down the button for 2 seconds to save the format in<br />

non-volatile memory. These settings will remain until altered again in the same way.<br />

Voltmeter <strong>Software</strong> Details<br />

Refer to the source code listing in 4chanVmeter.asm . The PIC code selects each analogue channel<br />

input in turn and connects this to the internal 10-bit A/D converter. The A/D output is a number in<br />

the range 0 – 1023, corresponding to 0 – 4.092V on the input with a step size of 4mV. In the<br />

subroutine ReadADAv 16 successive measurements are made on the selected channel and the<br />

results summed to give a total in the range 0 – 16383. This combining of 16 readings performs<br />

averaging on the input signal and serves to increase the measurement resolution. According to the<br />

maths of statistics, an improvement equal to the square root of the averaging factor can be<br />

expected; so 16 times averaging ought to give four times, or two extra bits worth of resolution.<br />

Which is very convenient, as the resulting 12 bits effective accuracy from the A/D is equal 4096,<br />

which just happens to be the reference voltage!<br />

In the routine ReadScaledAD the summed result is multiplied by a constant number stored in one of<br />

four EEProm locations – one corresponding to each channel. The default values for all four are fixed<br />

<strong>G4JNT</strong> PIC Controller <strong>Software</strong> <strong>Manual</strong>. Page 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!