This demo show how to use "Circular Buffers" as specified in the "nz_circularBuffer.h" interface.
USB debugging is enabled (see "Debug Configuration" in projdefs.h), meaning all debug and system output is directed via USB to the "Netcruzer USB Terminal" app. It will be displayed in the "Debug" tab of this app, which can be downloaded here:
https://netcruzer.com/usbterminal/
Additionally debug message can also be processed in the debugService() function. This example simply checks if "hi" is received, and if so, replies with "Hello". Sending and receiving debug message is done in the "Debug" tab of the "Netcruzer USB Terminal" app.
Details:
The "Netcruzer Library" contains two circular buffer implementations. Any one can be used for this project. The standard one (nz_circularBufferStd.c) is used for this demo, requiring the following to be done(is already done!):
The project requires a SBC66 Netcruzer board with an USB Port (not USB Host).
This project is located in the "src/demos/usb/cirbuf_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 "SBC66ZL_R1" for the SBC66ZL Revision 1 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-07-22, David H. (DH):