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

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
Function Name
TWI / I2C related functions
int TWI_Init(long twi_clock);
void TWI_Error();
void TWI_Status();
void TWI_Success(int code);
char TWI_Action(unsigned char command);
SPI related functions
int SPI_Init(unsigned char spi_rate);
int SPI_Set_Speed(unsigned char spi_rate);
unsigned char SPI_Write(unsigned char data8);
unsigned char SPI_Read(unsigned char data8);
unsigned char SPI_WriteRead(unsigned char data8);
unsigned char SPI_Send_Recv_Byte(unsigned char data8);
SPI command function to communicate with Propeller
long SPI_Prop_Send_Cmd(int cmd, int data, int status);
int SPI_Prop_Print_String(int device, char *string);
Note 1: Not implemented yet, just a place holder.
19.5 API Functional Declarations
The following lists each function, a description, comments, and example usage of the function.
_________________________________________________________________________________________________
Function Prototype:
Description:
Example(s):
_________________________________________________________________________________________________
Function Prototype:
Description:
int TWI_Init(long twi_clock);
char TWI_Action(unsigned char command);
Initialize the TWI / I
TWI_Init(…) takes a single parameter which is the speed in Hz that you wish the TWI hardware interface
to be initialized to. 100KHz is usually used, although some devices can support 400KHz as well as 1MHz,
read your target I
purposes since we are setting it up to conform to I
The TWI_Action(…) function is very powerful since it really doesn’t do much other than pass the
Table 19.3 – “SPI and I
2
C device for details. Recall, that the TWI (two wire interface) is the I
2
C interface to 400KHz.
2
C” module API functions listing.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon AVR 8-Bit”
Description
Initializes the TWI / I2C hardware.
Place holder for error handling
Place holder for status codes
Place holder for success codes
Sends an “action” to the TWI hardware.
Initializes the primary SPI unit (connected to SD).
Sets/resets the SPI speed.
Writes a byte to the SPI interface.
Reads a byte from the SPI interface.
Writes and reads a byte to/from the SPI interface.
Writes and reads a byte to/from the SPI interface.
Sends a 3-byte command packet to Propeller.
Legacy function, uses terminal NTSC/VGA driver to print
strings on the display.
2
C. Returns 1 always.
1
.
1
.
1
.
2
C interface for our
161

Related parts for Chameleon-AVR