This demo shows how to use the ADC (Analog to Digital) converter on SBC66 Netcruzer boards. The SBC66 Netcruzer boards have 12 Analog input ports, port 0-5 and 30-35 (old port names X0-X5, and Y0-Y5). For details see modtronix.com/product/sbc66ec/ For this demo, port 1 (X1) is configured as an Analog Inputs. By default the ADC is configured for voltages between 0 - 2.5V (To configure it for 3.3V inputs, see nz_analog.h file). For this demo, when the input goes above 2.0V, output 38 (Y8) is turned on (3.3V). Else port 38 (old port name Y8) is off (0V). Additionally the System LED blinks every second.
This project can be run on any of our SBC66 Netcruzer boards. For prototyping, we recommend combining this board with a Prototyping Board, like the PT66ECI for example. This low cost prototyping board makes all the I/O ports of the SBC66 board available via marked labels on the PCB. It also provides a reset and firmware button that simplifies prototyping.
This project is located in the "src/demos/adc/adc_demo1" folder of the Netcruzer Download. To compile for Netcruzer Board, open this project in MPLAB X, and select the "Project Configuration" for desired board. For example "SBC66ECL_R2" for the SBC66ECL Revision 2 board. For details click here
After compiling (build), the board can be programmed via the USB Bootloader or a PIC Programmer. USB Programming is simplified when using the SBC board together with a Prototype Board.
2012-08-08, David H. (DH):