USB low frequency oscilloscope, bandwidth is DC to 1KHz. Max sampling rate is 12680 samples per second. The trigger circuit uses the integrated comparator and CCP. An oscilloscope with these specifications has limited use, but it has an advantage on analogue oscilloscope for low frequencies.
Visual Basic 6 software
and a circuit diagram. The circuit is powered by the USB. The interface
to the PC is HID class.
The screen is constructed from 64 sampling. The ADC reads the input at resolution of 8 bits and in intervals determent by the Time Base. The 64 bytes are transmitted in one stream every 100ms or longer for lower frequencies.
HID class (human interface
device) is a USB class of devices like the mouse and the keyboard, the
data transfer rate is limited to 64KB/S.
PIC18F2550 code is
assembler code and C code (under GNU General Public License) for Microchip C18 compiler.
VB6 code includes guidance to setting up the PC.
The PC register the PID (Product ID) and VID (Vendor ID) of the USB device when
it's plugged, the VB code uses these ID's to communicate with the
device. For commercial VID it is needed to buy it from USB-IF, but in your lab you can use any number.
The source code is derived from freeware from these sources: http://janaxelson.com/usb.htm , http://openprog.altervista.org/USB_firm_eng.html
Code was written on MPLAB 8x and compiled with C18 ver 3.30. PIC18F2550 was programmed using Velleman K8076.
Software includes PIC code and VB6 code. You are free to use the circuit diagram and the VB software with no
The VB6 application.
See also Technical Tips
Pin 3 is the analogue input. Input voltage range is 0 to 5V absolute max, voltage outside this range can latch the input or even permanently damage the IC.
Pin 4 is the comparator input used to generate the trigger.
Pin 14 is 3.3V internal supply for the USB transceiver.
Pins 15,16 are the data lines to the USB connector on the PC.
Pin 20 is the PC 5V powering the PIC. It is limited to 100mA by
the PC. 0.47uF is for decoupling.
For USB wiring info: http://www.interfacebus.com/Design_Connector_USB.html