This demo contains some test code for the DB66DEV1 development daughter board. It does NOT use the DB66DEV1 driver located in nz_db66dev1.h, because we want to show how to control the hardware without the driver doing it all! The 4 buttons on the DB66DEV1 will simply control LEDs 4 to 8 (on/off when button pressed/depressed). We will check the voltage on the Analog input (connected to potentiomer on DB66DEV1) and if above 2.0V turn on LED1 and sound the buzzer.
The DB66DEV1 has a potentiometer on port 3 (old port name X3). This port has an ADC (Analog to Digital) converter on all 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/ Port 3 is configured as an Analog Inputs. By default the ADC is configured for voltages between 0-2.5V, include "#define ADC_3V3_VREF" in projdefs.h for 0-3.3V range.
The DB66DEV1 has 4 button on ports 30, 31, 32 and 33 (old port names Y0, Y1, Y2 and Y3). They are all configured as inputs.
The DB66DEV1 has 8 LEDs on ports 6, 7, 8, 9, 26, 27, 28, 29 (Old port names X6, X7, X8, X9, T4, T5, T6 and T7). These ports are all configured as outputs.
Port 3 (old port name X3) 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).
Additionally the System LED blinks every second.
The project requires a SBC66 Netcruzer board with an USB Port (not USB Host), AND a DB66DEV1 development board. The DB66DEV1 is plugged into the daughter board connector of the SBC66 board.
This project is located in the "src/demos/db66dev1/db66dev1_nodriver_demo" 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 A common error is "The system cannot find the path specified". This generally means you don't have the required XC16 compiler version installed. Go to "Project Properties", and select your installed XC16 compiler in the "Project Configuration" section.
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.
2013-05-03, David H. (DH):