3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LCS-1M - A Full-Featured, Low-Cost Hobby Oscilloscope

Step 5Circuit Description - Microcontroller

Circuit Description - Microcontroller
The Microcontroller is the heart of the oscilloscope. It controls all the other parts of the circuitry. I chose the Picaxe 28X1 (from www.picaxe.com), which basically is a Microchip PIC16F886 with built-in bootloader and Basic interpreter. While this makes it a bit more expensive than the raw PIC it is based on, the advantage is that you don't need to buy or build a separate programmer to burn the scope firmware - which makes it much more beginner friendly and also saves money overall.

The firmware download circuit consists of just three resistors (R2, R3, and R4). The download cable, a simple RS-232 serial cable (also available from the Picaxe vendor) ending in a stereo phono plug, which gets re-used during normal operation as the connection between scope and PC - again reducing overall cost.

Because the microcontroller itself doesn't have enough I/O's, I added a Maxim I/O expander (MAX6956 or the pin-compatible MAX7300), which gives 20 additional I/Os. These are mostly used to transfer the sample data from the scope's SRAM memory, as well as for chip enables for the DACs and programmable gain amplifiers that the microcontroller talks to via an SPI bus. The communication between the microcontroller and the I/O-Expander is through an I2C bus (the Picaxe's program execution is relatively slow, and the I2C version of the expander results in less commands to send compared to the SPI version).

There is a jumper to switch between firmware download and regular connection. In principle we could use the download connection to transfer commands and data during normal operation as well, but this connection is a "software UART", i.e. the microcontroller has to bit-bang the data, and in addition it uses CMOS levels (0 to 5V) instead of standard RS-232 levels (-15 to +15V).

On the other hand, switching to the other jumper setting connects the microcontrollers to the hardware USART port, which can run in the background, i.e. the data byte gets transferred in the
background while the microcontroller can already perform the next operation. This speeds up the
frame rate (maximum number of scope screen refreshs per second) by more than half. In addition it uses a MAX232 level converter that converts between the CMOS levels to/from the Microcontroller and the RS-232 levels to/from the PC, and also adds a layer of protection between scope and PC (after all, you may accidentally connect your scope to a high voltage, and that shouldn't fry your PC as well!).
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
59
Followers
3
Author:womai