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

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
However, the PIC24 provides two separate SPI ports that can be remapped to any pins. I suggest leaving one mapped to
the Propeller so you can still control it but the other one is free to be moved to any other pins. This is very good news.
Moreover, the Chameleon’s expansion headers port exports out the master SPI device itself as well as the ancillary SPI-
mux selects.
Using the PIC SPI interface is straightforward, the steps are:
That’s all there is to it. Of course, there’s a lot of detail to getting things to work and believe me, I had my share of
frustration figuring out the little quirks, but the library functions provided shortly will get you up and running very quickly
with SPI interfacing. Also, you can always write you own, or use external libraries. The PIC Libc system does not have
any SPI library of note, but there are others out there such as the PIC24 peripheral library included in the install of the
PIC24 C compiler.
19.2 I
The I
signal lines (SDA – data, SCL – clock), thus more protocol and conventions must be adhered to to deal with bus
contention etc., secondly I
superior for “daisy chaining” devices together with as well as cheaper. Of course, you never get something for nothing
and the I
even up to 50 MHz. I
supporting 1Mhz. Thus, SPI is at least 25 times faster. But, that’s not the whole story. The added overhead that I
protocol attaches to communication (addressing, commands, etc.) slow the protocol even more. Thus, I
find their way into “slow” peripherals where speed isn’t an issue, but addressing many of them may be. For example,
serial memories, sensors, etc. where the device itself is slow the 100-400 KHz average speed of I
However, SPI devices you will see in very high speed applications even video and audio.
Figure 19.4 shows an architectural diagram of how the I
on the line.
Electrically, the I
while slaves listen and respond. Masters can transmit and receive from a slave, but a slave cannot initiate
communications. Additionally, to enforce that masters are in charge, the clock line SCL can only be controlled by a
master furthermore placing the slave(s) into a passive role. Moreover, so that multiple devices can be connected to the
same 2-signal bus from an electrical point of view, both SDA and SCL are open drain, thus “pull-up” resistors must be
connected from SDA and SCL to Vcc via a 5-10K resistor on both lines. Note that with the SPI bus, all SPI devices share
the MISO (master input), MOSI (master output), and SCLK (serial clock) lines; however, the CS or chip select lines for
each device controls the selection of the target device (not an address), and when a device is selected its bus is active
while any other de-selected devices go tristate. Thus, the I2C bus is always active and arbitration is achieved thru an
2
C bus is a little more complex that the SPI bus interface and protocol. The reason is that the I
2
Initialize the hardware (set speed, clock phase and polarity, etc.).
Configure the PIN multiplexing.
Send and receive bytes via a pair of registers (and possibly interrupts).
2
C Bus Basics
C bus is not without its shortcomings. First, it is nowhere near as fast as SPI. SPI can operate at 25 MHz and
2
C bus consists of any number of “masters” and “slaves” on the bus. Masters initiate communication
2
C on the other hand averages around 100 KHz+, with 400 KHz being fast with many new devices
2
C supports up to 128 devices simultaneously connected to the bus! This feature makes I
Figure 19.4 – I2C bus layout.
2
C bus is laid out in relation to the master device, and the slaves
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
2
C is more than enough.
2
C bus uses only 2
2
C devices tend to
2
C
2
159
C

Related parts for Chameleon-PIC