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

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
resources. So any function that you use from the standard C library Libc emulates what you might expect on a PC
platform, but in many cases the behavior might not be as expected. Thus, you need to take care when using standard
library functions and realize that they may have side effects or limitations that VC++ or GNU C on your PC do not. Please
refer to the PIC24 C Libc manual located here on the DVD-ROM for a complete overview of the library:
There are lots of tricks and tips to using the PIC24 Libc functionality, however, for the most part as long as you don’t push
it, you can use standard C functions and everything will work out. Of course, you have to have common sense when using
functions. For example, on a PC the function printf(…) makes sense since there is some kind of terminal device. On the
Chameleon PIC, this won’t work since the developer of PIC Libc has no idea about the Chameleon PIC, thus anything that
is hardware specific won’t work since Libc has no idea about the hardware. On the other hand, you might ask “is it
possible to get printf(…) to work?”. The answer is yes. However, you would have to go into the source files where
printf(…) is located and modify it to do “something” intelligent on the Chameleon PIC such as print to the UART, or to the
NTSC/VGA screen. But, you get the idea. Don’t use standard C functions that make no sense on an embedded system.
Next, embedded systems have multiple memory types; RAM, FLASH, EEPROM. And the PIC Libc library knows this.
Thus, many functions only work in RAM or FLASH specifically. Therefore, you always have to keep in mind that you are
working with a Harvard memory architecture and a separate RAM/FLASH memory model. The PIC24 Libc documentation
has a lot to say about this subject, so make sure to read it.
Alright, so that’s the story with PIC24 libc, it’s part of the GNU GCC PIC24 C compiler installation and when you build a C
application functions are pulled in from this library. To give you an idea of what Libc supports, Table 17.2 lists the header
files you can include in your Chameleon PIC applications and what functionality they support.
Libc Header File
General C/C++ Library Functions
<assert.h>
<ctype.h>
<errno.h>
<float.h>
<limits.h>
<math.h>
<setjmp.h>
<signal.h>
<stdarg.h>
<stddef.h>
<stdio.h>
<stdlib.h>
<string.h>
<time.h>
<yvals.h>
As you can see these set of headers looks pretty familiar, as you will find most of them on standard C compilers. Now,
the hardware specific functionality for the Chameleon PIC, we had to develop. Referring to Figure 17.1, there are a
number of library classes you can glean from the figure, they are:
DVD-ROM:\ CHAM_PIC \ DOCS \ DATASHEETS \ hlpLib30.chm
System
TIP
The MPLAB toolchain uses the same GNU GCC compiler as the serial bootloader
method, thus software written in one development environment will work exactly the
same as in the other.
Description
Diagnostics.
Character Operations.
System Errors.
Floating point defines.
Size limits of common values.
Mathematics.
Non-local goto.
BSD signal codes and functions.
Allows for variable argument functions.
Standard defines.
Standard I/O facilities.
General utilities.
Strings.
Time conversion functions.
Header for VC++ work.
The system library module is a “glue” module that ties the other modules together and is used as
Table 17.2 – PIC24 Libc library functionality listed by header file.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
139

Related parts for Chameleon-PIC