A/D Converter Hardware
This hardware connects directly to your PC's serial port. Two analog input channels are available. The sampling rate for both channels is exactly 2500 samples/second, if the clock is exactly 10 MHz. The baudrate for the serial interface is also derived from the clock frequency; for fclk=10MHz it is 115200 bits / second. See notes below.
Interface between PIC and Computer ("COM1" or "COM2"):
The RS232 specification requires a line voltage of at least +/- 3 Volts, but most PC accept 0 and 5 Volts as valid input levels. If not, you may add a MAX232 (or similar) level shifter.
Connections between ADC(PIC) and PC:
Analog inputs and anti-aliasing filters
The PIC's analog inputs (here: GP0 and GP1) accept voltages from 0...Vdd (here: +5 V). Vdd is also used as reference voltage, so you must use a stabilized voltage source. THE PIC CANNOT HANDLE NEGATIVE INPUT VOLTAGES, so you may have to add an OPAMP to amplify the input signal and add some DC bias. In contrast to a PC soundcard, the PIC's analog input is DC-coupled so there is no lower frequency limit.
The source impedance at the PIC's analog input ports should not exceed 2.5 kOhms. More about this can be found in the PIC's datasheet, search for "PIC12F629/675 Datasheet" or "DS41190" at http://www.microchip.com.
To avoid aliasing effects, you may have to add some filters before the PIC's analog input. Cut off all frequencies above half the sampling rate (here: 2500 Hz / 2 = 1250 Hz). If the source of the analog signals (which may be an "analog front-end") does not contain such frequencies, you can leave the filters away.
Short description of the PIC firmware
The PIC digitizes two channels with a sampling rate of 2500 sample pairs / second. The resolution is a little over 10 bit, because 4 ten-bit-values are added before the PIC sends them to the PC (the presence of weak noise helps a bit here to keep the the least significant bit moving).
COM port settings
This is only important if you want to write your own "driver" software on the PC side. The Serial Input Tool which will be described later makes all required COM port settings automatically.
Format of serial data frame
The analog values are sent from PIC to the PC in a 4-byte frame. There are 2500 frames per second, which is close to the maximum a standard COM port can handle. The first byte (=byte) is mainly used for synchronisation, the receiver can easily detect the begin of a 4-byte frame.
Note: The PC's async serial interface transmits the LSB in a BYTE ("bit 0") first, the MSB ("bit 7") last.
More info can be found in the documentation of the PIC firmware, which is part of the PIC firmware archive (see links at the end of this document).
Serial Input Utility
To use the A/D converter for some windows programs (including Spectrum Lab),
the "Serial Input Utility" program (
One of the parameters when starting
More info: See soundcard/audio utility programs on DL4YHF's ham radio and electronics homepage.
You can automatically launch the Serial Input Utility from SpectrumLab by entering this on the configuration tab "AD / DA Server":
Related Links... (some only work if you are on my website