Displaying Samples using Stamp Plot

Even though we took 10 samples of Phase 3, followed by 10 samples of Phase 2, and so on, we want to display the samples as if we captured all four A/D channels at once. So we'll read one sample from each sample group (Phase 3, Phase 2, Phase 1, and Rectified Output) out of EEPROM. Then we'll plot those four samples. The resultant plot will look like a four-channel oscilloscope, displaying four traces at once. Here's the plan:

• Loop through each of the 10 samples, from 0 to 9

• Extract 4 pieces of data from EEPROM using 4 separate reads o Read one sample from Phase 3, one from Phase 2, one from Phase 1, and one from Rectified Output

• Store the values into the variables ch3, ch2, chi, ch0

• Call the Piot_it subroutine, which will plot the values of ch0 through ch4

• Repeat for the next sample

Now that we have an idea of how the program will work, let's see how it looks in PBASIC.

Solar Power

Solar Power

Start Saving On Your Electricity Bills Using The Power of the Sun And Other Natural Resources!

Get My Free Ebook

Post a comment