Chameleon-PIC Nurve Networks, Chameleon-PIC Datasheet - Page 220

MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)

Chameleon-PIC

Manufacturer Part Number
Chameleon-PIC
Description
MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet

Specifications of Chameleon-PIC

Processor To Be Evaluated
PIC24
Data Bus Width
16 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
The comments should explain everything that is going on, but make sure to pay attention to the highlighted lines of code
that compute frequencies using the pow(…) function. Basically, to compute the nth adjacent note on a standard diatonic
scale you multiply the key/note frequency by 2
are issued to the sound driver to play on 3 different channels (leaving one left).
Summary
This demo shows how to play
music using the sound API.
However, be aware the sound
driver running on the
Chameleon’s Propeller chip can
do a lot more than we expose
with the API, so if you want more
features you can add them by
modifying the Propeller’s master
driver.
30.1 Input Device Demos
The following demos illustrate the input devices supported on the Chameleon; the keyboard and mouse. The demos drive
either the NTSC, VGA or both. But, if you want to add support for the other, it’s simply a matter of adding a couple lines of
code.
The examples typically consist of the primary source file for the demo as well as:
And any other ancillary drivers keyboard, mouse, etc.
All the required files can of course be found in the \Source directory on the DVD (which you should have already copied
onto your hard drive) located here:
30.1.1 Keyboard Demo
This demo uses the keyboard API to communicate with a local PS/2 keyboard plugged into the PS/2 port via the
Propeller’s keyboard driver. Make sure to plug your keyboard into the Chameleon and get a good connection and make
sure the <NUM-LOCK> etc. keys are released and not in the down position. The demo prints keys on the screen as you
hit them along with their codes.
Also, the demo has a little bit of fun code, it has a little password finder. The program has a state machine that is hunting
for the token “morpheous” from the movie “The Matrix”, if you type this in (lower case) the program will print something
out. Figure 30.1 shows the demo in action.
The System API library module CHAM_PIC_SYSTEM_V010.c|h.
The main SPI API library module CHAM_PIC_I2C_SPI_DRV_V010.c|h.
The keyboard API library module CHAM_PIC_KEYBOARD_DRV_V010.c|h.
The mouse API library module CHAM_PIC_MOUSE_DRV_V010.c|h.
The NTSC, VGA, GFX driver or all of them.
DVD-ROM:\ CHAM_PIC \ SOURCE \
MPLAB
TIP
In general, you will include all the sources in your project (.C files) and make sure all the
.H header files are in the same working directory, so the compiler can find them. You do
NOT include the .H header files in the compilation list of source files, the compiler will do
this for you. Only include .C and .S files in your source file link list in your project file list
to the left of the tool.
(1/12)
taken to the nth power. Once the chord frequencies are computed they
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
220

Related parts for Chameleon-PIC