|
Building a MPC555-Based Oscilloscope
by Daniel Mihalik
Start ý Software
Description ý Oscilloscope Operation ý
Enhancement Opportunities ý Sources
and PDF
OSCILLOSCOPE OPERATION
In order to use the oscilloscope, two
programs are necessary, the C program on the MPC555 and a program
on the PC. If possible, download the compiled executable files. First,
compile the included file scopelab.c and load it into the internal
RAM or flash memory on the MPC555 using your preferred software. Second,
execute the file scopelab.exe in Windows on your PC. Photo
1 shows you what will appear.
|

(click
here to enlarge)
|
Photo 1ýWhen
the Visual Basic program starts, youýll see an empty graph with
four buttons at the bottom. |
Use the buttons as described in Table
1. The graph of a sample triangle wave input is shown in Photo 2.
|
Button
|
Description
|
|
Receive
|
Tells the MPC555 to start sampling
the pin AN0 and the PC to receive the points over the serial
port
|
|
Graph
|
Graphs the sampled voltage at
AN0 over time. (If no graph appears, the receive transmission
has not finished. Wait a few seconds and click Graph again.)
To overlay new points, press Receive and then Graph again.
|
|
Clear
|
Clears the graph window
|
|
Save
|
Saves the most recent set of
points as a *.csv file. This file can be opened in
most spreadsheet programs.
|
|
Table 1ýThe
buttons in the program are used to obtain and manipulate the
data points from the MPC555.
|
|

(click
here to enlarge)
|
Photo 2ýThe
oscilloscope can capture signals with a maximum voltage of 5
V. Shown is a 5-V peak-to-peak triangle wave with a frequency
of 2 KHz and an offset of 2.5 V. |
As mentioned earlier, the oscilloscope
can be run without the Visual Basic front end. Youýll need a terminal
emulator program with the capability to capture text to a file. First,
open the terminal program with the settings 9600 bps, no parity checking,
start bit 8, and stop bit 1. Run the program on the MPC555 and start
the connection in the terminal. Start the text capture, then press
"s". Stop the text capture when the data stops. Save the
file as *.csv.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |