Chameleon-AVR Nurve Networks, Chameleon-AVR Datasheet - Page 135

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

Chameleon-AVR

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

Specifications of Chameleon-AVR

Processor To Be Evaluated
AVR 328P
Data Bus Width
8 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
Where byte 0 and 1 would represent the NTSC and Print sub-functions. In this case, the entire RPC call costs 7 bytes, but
isn’t human readable anymore since byte 0,1 are in binary and could be anything depending on what we picked them to
be. The point is that, if you were using another processor or process to make the RPC calls and not a human at a serial
terminal then there is no reason to use ASCII coding. However, that said, I still prefer ASCII formats when they are
feasible since they are much easier to read and debug. At least sending things in ASCII format during the de-bugging
phase, so you can at least look at your data strings on the other end and see what’s going on.
16.3.2 Compressing RPC for More Bandwidth
The whole idea of RPC technology is to use it, thus, you might have a program running that makes 100 local calls with
100 RPC calls every time thru the main loop. Thus, you want the RPC transport process to be very quick, hence,
compression of the RPC data and or caching is in order. For example, if you are sending large chunks of text or data that
has repeating symbols, then its better to compress it locally, transport it, then de-compress and execute since computers
are typically 1000’s of times if not millions of times faster than the communications links.
Additionally, advanced RPC systems might use the same data over and over. Thus, there is no need to keep sending the
data to the server and a caching system should be employed where on the first RPC call, the caller indicates that a data
structure being passed is static and cacheable. Thus, the server caches it after its first use, then on subsequent calls, the
client need not send the structure until it needs refreshing. For example, say you have a 3D data base that you want a
RPC to perform calculations on. The database never changes, so no need to keep sending it over and over, once its in
the servers memory space, you can save the bandwidth.
16.3.3 Our Simplified RPC Strategy
Considering all these interesting methods, the method used for the Chameleon is a 3-byte binary encoded SPI packets
with the following format:
Where command8 is an 8-bit command code, data_low8 and data_high8 are the operands for the command. Thus, each
SPI packet is rather small and can’t do much. However, with proper design you can use these small SPI command
packets to create larger commands. For example, say you want a command to print a character to the VGA screen? Well,
that’s easy enough – you can use a specific command code for “print to VGA” then a single one of the 8-bit data words
can hold the 8-bit character.
But, what if you wrote a sound driver that plays .wav files and you want to send down 1000 bytes? Well, that’s easy, you
just have to break the process into to “states” or steps and then create a command for each state. For example, you could
create a “memory write” command that consists of 3 sub-commands:
So Command 1 needs a 16-bit address, you can fit that in the two operand bytes, and command 2 needs only a single 8
of data! Thus, you can write 1000 bytes from addresses 2000 to 2999 with this simple algorithm:
for (mem_addr = 2000; mem_addr < 2999; mem_addr++)
As you can see, the 3-byte SPI command packet isn’t a limitation. In fact, most SPI (and I
command rather than 3, thus even more steps have to be performed for larger more complex operations.
send_spi_command(COMMAND1, mem_addr & 0xFF, mem_addr >> 8)
send_spi_command(COMMAND2, data, 0);
} // end for
{
Byte 0, Byte 1, ‘H’, ‘e’, ‘l’, ‘l’,’o’
[command8, data_low8, data_high8]
Command 1: Set memory pointer addr.
Command 2: Write memory mem[ addr ] with x.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon AVR 8-Bit”
2
C) devices use 2 byte
135

Related parts for Chameleon-AVR