Atmel AVR2070 Manuel D’Utilisation

Page de 93
 
AVR2070
 
 
55
8240B-AVR-06/09 
and the RF231 and RF212 radios can be configured for rising or falling edge via the 
IRQ_POLARITY register value. 
In addition, there are some GPIO signals that must be connected to the 
microcontroller: 
•  RST – Reset signal, active low 
•  SLP_TR – Sleep/Transmit signal.  See radio datasheet for details. 
•  CLKM – Optional clock output from the radio. 
•  SCLK – SPI clock 
•  MOSI – SPI Master Out/Slave In signal 
•  MISO – SPI Master In/Slave Out signal 
•  SEL – Radio select line, active low. 
Note that the transceiver can operate on a supply of 1.8V to 3.6V, while the 
microcontroller may have a different operating range.  Be sure both devices operate 
from the same supply voltage, or that the appropriate level-shifting circuitry has been 
added. 
On some AVR microcontrollers, the SPI interface pins used to connect to the radio 
are shared with the ISP programming port.  This can cause difficulty connecting to the 
target processor, as the transceiver's select line can float high, causing the radio to 
drive the MISO line, which interferes with ISP function.  The solution to this problem is 
to put a pull-up resistor on the radio SEL (select) line.  If this resistor causes 
excessive sleep current, it may be removed after programming the AVR. 
Affected AVR microcontrollers include the ATmega88/168/328 family. 
RUM currently operates with an Internal RC oscillator set for 8MHz. 
B.4.2 Step 2: Define a new PLATFORM for the hardware 
A platform describes several aspects of a board: 
•  Which microcontroller is connected to the radio. 
•  How the radio pins are connected to the microcontroller. 
•  Which interrupt vector the radio uses. 
•  How to enable and disable the radio's interrupt handler. 
•  Which serial port the board uses for debugging I/O (optional). 
•  How to enable/disable/read the ADC for sensor data (optional). 
•  How to read and set buttons and LED's on the board (optional). 
•  Which band the radio operates in. 
Define the new platform in hal_avr.h by adding a new entry to the list of platform 
types.  Then define a block of parameter definitions similar to the existing platform 
definitions.  For example: 
(In the list of platform definitions) 
#define MY_NEW_BOARD 9 
(further down in file) 
#elif PLATFORM==MY_NEW_BOARD 
 
// Set this to the Microcontroller the new design uses