The wiring of the radio and the ATmega is shown below:
ATmega1281 AT86RF230 ---------- --------- PB1 --> SCK PB2 <-- MOSI PB3 --> MISO PB0/PB4 --> SEL (you need to drive both pins) PB5 --> SLP_TR PB6 --> TRX_RESET INT4/PE4 --> IRQ XTAL2 <-- CLKM
PD0 --> KEY Interface PD6:7 --> LED Interface
Fuses: LF: 0xe2 - 8MHz internal RC Osc. HF: 0x11 - without boot loader HF: 0x10 - with boot loader EF: 0xff LOCK: 0xef - protection of boot section
Bootloader: Start at byte=0x1e000, address=0xf000, size = 4096 instructions/ 8192 bytes
Definition in file board_ict230.h.
Go to the source code of this file.
Defines | |
#define | BOARD_NAME BOARD_NAME_ICT230 |
#define | BOARD_NAME_ICT230 "ict230" |
#define | BOARD_TYPE (ICT_RF230) |
#define | CPU_TYPE (CPU_M1281) |
#define | CUSTOM_RESET_TIME_MS (10) |
#define | DDR_KEY DDRD |
#define | DDR_SPI (DDRB) |
#define | DDR_TRX_RESET DDRB |
#define | DDR_TRX_SLPTR DDRB |
#define | DEFAULT_SPI_RATE (SPI_RATE_1_2) |
#define | DI_TRX_IRQ() {EIMSK &= (~(TRX_IRQ));} |
#define | EI_TRX_IRQ() {EIMSK |= (TRX_IRQ);} |
#define | HIF_TYPE HIF_UART_1 |
#define | HWTIMER_REG (TCNT1) |
#define | HWTIMER_TICK ((1.0*HWTMR_PRESCALE)/F_CPU) |
#define | HWTIMER_TICK_NB (1000UL) |
#define | HWTMR_PRESCALE (8) |
#define | INVERSE_KEYS (1) |
#define | LED_DDR DDRD |
#define | LED_MASK (0xc0) |
#define | LED_NUMBER (2) |
#define | LED_PORT PORTD |
#define | LED_SHIFT (6) |
#define | LEDS_INVERSE (1) |
#define | MASK_KEY (0x01) |
#define | MASK_TRX_RESET (_BV(PB6)) |
#define | MASK_TRX_SLPTR (_BV(PB5)) |
#define | MAX_FRAME_SIZE (127) |
#define | PB0 (0) |
#define | PB1 (1) |
#define | PB2 (2) |
#define | PB3 (3) |
#define | PB4 (4) |
#define | PB5 (5) |
#define | PB6 (6) |
#define | PB7 (7) |
#define | PIN_KEY PIND |
#define | PORT_KEY PORTD |
#define | PORT_SPI (PORTB) |
#define | PORT_TRX_RESET PORTB |
#define | PORT_TRX_SLPTR PORTB |
#define | PULLUP_KEYS (1) |
#define | RADIO_TYPE (RADIO_AT86RF230) |
#define | SHIFT_KEY (0) |
#define | SPI_DATA_REG SPDR |
#define | SPI_MISO _BV(PB3) |
#define | SPI_MOSI _BV(PB2) |
#define | SPI_SCK _BV(PB1) |
#define | SPI_SELN_HIGH() PORT_SPI |= SPI_SS; SREG = sreg |
#define | SPI_SELN_LOW() uint8_t sreg = SREG; cli(); PORT_SPI &=~SPI_SS |
#define | SPI_SS _BV(PB4) |
#define | SPI_WAITFOR() do { while((SPSR & _BV(SPIF)) == 0);} while(0) |
#define | TIMER_INIT() |
Initialisation of TIMER1 (16bit timer). | |
#define | TIMER_IRQ_vect TIMER1_COMPA_vect |
#define | TIMER_POOL_SIZE (4) |
#define | TIMER_TICK (HWTIMER_TICK_NB * HWTIMER_TICK) |
#define | TRX_IRQ _BV(INT4) |
#define | TRX_IRQ_INIT() |
#define | TRX_IRQ_vect INT4_vect |
#define | TRX_TSTAMP_REG TCNT1 |
#define | TUNED_OSCCAL (0xbf) |
Functions | |
static void | SPI_INIT (uint8_t spirate) |
inline function for SPI initialization |
#define BOARD_NAME_ICT230 "ict230" |
ID String for this hardware
Definition at line 72 of file board_ict230.h.
#define CPU_TYPE (CPU_M1281) |
used CPU (see const.h)
Definition at line 102 of file board_ict230.h.
#define CUSTOM_RESET_TIME_MS (10) |
additional delay needed by hardware
Definition at line 110 of file board_ict230.h.
#define DDR_SPI (DDRB) |
DDR register for SPI port
Definition at line 134 of file board_ict230.h.
#define DDR_TRX_RESET DDRB |
DDR register for RESET pin
Definition at line 107 of file board_ict230.h.
#define DDR_TRX_SLPTR DDRB |
PORT register for SLEEP_TR pin
Definition at line 113 of file board_ict230.h.
#define DI_TRX_IRQ | ( | ) | {EIMSK &= (~(TRX_IRQ));} |
rising edge triggers INT4 disable TRX interrupt
Definition at line 126 of file board_ict230.h.
#define EI_TRX_IRQ | ( | ) | {EIMSK |= (TRX_IRQ);} |
enable TRX interrupt
Definition at line 128 of file board_ict230.h.
#define MASK_TRX_RESET (_BV(PB6)) |
PIN mask for RESET pin
Definition at line 109 of file board_ict230.h.
#define MASK_TRX_SLPTR (_BV(PB5)) |
PIN mask for SLEEP_TR pin
Definition at line 114 of file board_ict230.h.
#define MAX_FRAME_SIZE (127) |
maximum allowed frame size
Definition at line 83 of file board_ict230.h.
#define PORT_SPI (PORTB) |
PORT register for SPI port
Definition at line 135 of file board_ict230.h.
#define PORT_TRX_RESET PORTB |
PORT register for RESET pin
Definition at line 108 of file board_ict230.h.
#define PORT_TRX_SLPTR PORTB |
DDR register for SLEEP_TR pin
Definition at line 112 of file board_ict230.h.
#define RADIO_TYPE (RADIO_AT86RF230) |
used radiio (see const.h)
Definition at line 103 of file board_ict230.h.
#define SPI_DATA_REG SPDR |
abstraction for SPI data register
Definition at line 142 of file board_ict230.h.
#define SPI_MISO _BV(PB3) |
PIN mask for MISO pin
Definition at line 138 of file board_ict230.h.
#define SPI_MOSI _BV(PB2) |
PIN mask for MOSI pin
Definition at line 137 of file board_ict230.h.
#define SPI_SCK _BV(PB1) |
PIN mask for SCK pin
Definition at line 139 of file board_ict230.h.
#define SPI_SELN_HIGH | ( | ) | PORT_SPI |= SPI_SS; SREG = sreg |
set SS line to high level
Definition at line 172 of file board_ict230.h.
#define SPI_SELN_LOW | ( | ) | uint8_t sreg = SREG; cli(); PORT_SPI &=~SPI_SS |
set SS line to low level
Definition at line 170 of file board_ict230.h.
#define SPI_SS _BV(PB4) |
PIN mask for SS pin
Definition at line 140 of file board_ict230.h.
#define SPI_WAITFOR | ( | ) | do { while((SPSR & _BV(SPIF)) == 0);} while(0) |
wait until SPI transfer is ready
Definition at line 174 of file board_ict230.h.
#define TIMER_INIT | ( | ) |
Value:
do{ \ TCCR1B |= (_BV(CS11) | _BV(WGM12)); \ TIMSK1 |= _BV(OCIE1A); \ OCR1A = 1000; \ }while(0)
Definition at line 215 of file board_ict230.h.
#define TRX_IRQ _BV(INT4) |
interrupt mask for GICR
Definition at line 117 of file board_ict230.h.
#define TRX_IRQ_INIT | ( | ) |
Value:
do{\ EICRB |= (_BV(ISC41)|_BV(ISC40));\ } while(0)
Definition at line 121 of file board_ict230.h.
#define TRX_IRQ_vect INT4_vect |
interrupt vector name
Definition at line 118 of file board_ict230.h.
#define TRX_TSTAMP_REG TCNT1 |
timestamp register for RX_START event
Definition at line 131 of file board_ict230.h.
static void SPI_INIT | ( | uint8_t | spirate | ) | [static] |