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

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
These compose the main library modules that make up the Chameleon PIC specific API functions (mostly wrapper
functions). Now, before we continue, I want to make a point about language here. I have been using the word “library” in
a cavalier way. Library as is relates to C/C++ programming is a pre-compiled container with many binary objects. For
example, PIC24 Libc is a “library”, hundreds of functions have been compiled into a single library file and that single file
is linked against during builds with GNC GCC. In our case, we could have built an official “library” and put all the source
modules into it, but this would be tedious since it would hide what you are including in each project. Thus, I have decided
to keep the “library” in a source format as a collection of .C and .H files, so we can see what’s going on, include what we
need, and when we update one of the source files we don’t have to rebuild the library, we simply include the source file in
the source tree with our main project file.
With that in mind, there are a number of .C and .H files that make each up class of library functionality for the Chameleon
API. At this point, we are going to drill down and list each of the files with a short description. Then we are going to
discuss the key data structures and header files for each library module, list the functions one by one with examples.
Graphics
Sound
Keyboard/Mouse
UART
SPI
I
FLASH
Mechatronics N/A
2
C
NOTE
Some modules like the SPI and I
so similar.
a common place to put functions and constants that don’t fit into any other category. Currently,
the system library module is very small, but it will grow in the future.
This library simply makes calls to the graphics drivers running on the Propeller chip. So whatever
they do, this library tries to expose to the user. The current drivers are “tile” graphics only and
support text, printing, scrolling, and crude control of color. The default2 driver series adds some
functionality with a “gaming” tile engine that supports fine vertical scrolling, control of overscan
colors, large playfield tilemaps, re-definable character bitmaps (4 colors per tile), and many other
cool features.
This library interfaces to the Propeller sound driver object and exposes limited capabilities of the
driver itself (which can do a lot more). The API gives you a few functions to play sounds, control
volume, etc. But, you will probably want to enhance this API.
The PIC24 processor comes with two hardware UART’s, but we have developed a library of
functions that abstracts the functionality, so you can perform buffered I/O very easily with interrupt
driven drivers.
The PIC24 has a built in Serial Peripheral Interface hardware as well, but there is quite a bit to set
it up and communicate with it, thus we have created a nice abstraction layer to initialize it, read
and write bytes.
The PIC24 again has built in hardware for Inter-Integrated Circuit communications, but the
hardware is tricky to setup and the I2C protocol is a bit difficult to work with, so once again, we
have developed a software layer on top of it for your convenience.
The Chameleon PIC has a 1MB SPI FLASH memory on-board which can be used for storage of
assets, data, code, whatever you wish. This driver API runs 100% on the client PIC chip and
gives you the ability to read and write sectors/pages in the FLASH memory, erase, etc.
Considering that, you might want to write some software to abstract the FLASH memory into a
FAT16 like device? All you need are functions to read/write sectors/pages (which we provide)
then you can use a 3
drive. There are numerous open source drivers for SD cards and FAT16, so you are free to use
them in your development. For example the DOSFS Library that has FAT16 support. Simply
Google a bit and you can find other libraries or write one yourself.
There is a PS/2 port on the Chameleon which is connected to the Propeller. The default
driver on the Propeller has drivers for both keyboard and mouse support. Thus, we have
developed a simple API to communicate to both the keyboard and mouse driver running
on the Propeller (one at a time of course).
rd
party library to add support so the FLASH memory “feels” like a FAT16
2
C are actually in the same source file since they are
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
140

Related parts for Chameleon-PIC