circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

December 2006, Issue 197

ARM Scope
Build an Analog Oscilloscope Companion


by Greg Cloutier


Start Hardware Overview Embedded Code User Interface Functional Code System Development Sources and PDF

FUNCTIONAL CODE

I developed two separate pieces of functional code for the AVR Scope. Both attach to the same serial port for talking to the ARM processor.

The first piece of code continually collects the analog data and displays it on the graph. The second piece of code is linked to everything you can click on the front panel. When you click a button or list, the event handler sends an appropriate command along with its data or parameters to the ARM processor. Each of these functions runs in its own thread. The event handler thread remains asleep most of the time until a button is pressed. The analog receive and display loop is paced by the incoming data. It will sit and wait for data to be received at the serial port.