Defines

# board_wdba1281.h File Reference

Meshnetics Meshbean Development Board WDB-A1281-(P1,A1,E2,Amp) with ATmega1281 and AT86RF230. More...

Go to the source code of this file.

## Defines
#define | DDR_KEY DDRE
#define | HIF_TYPE (HIF_UART_1)
#define | HWTIMER_REG (TCNT1)
#define | HWTIMER_TICK ((1.0*HWTMR_PRESCALE)/F_CPU)
#define | HWTIMER_TICK_NB (0xFFFFUL+1)
#define | HWTMR_PRESCALE (1)
#define | INVERSE_KEYS (1)
#define | LED_DDR DDRB
#define | LED_MASK 0xe0
#define | LED_NUMBER (3)
#define | LED_PORT PORTB
#define | LED_SHIFT (5)
#define | LEDS_INVERSE (0)
#define | MASK_KEY (0xc0)
#define | PIN_KEY PINE
#define | PORT_KEY PORTE
#define | PULLUP_KEYS (1)
#define | SHIFT_KEY (6)
#define | SLEEP_ON_KEY()
#define | SLEEP_ON_KEY_INIT() do{}while(0)
#define | SLEEP_ON_KEY_vect INT6_vect
#define | TIMER_INIT()
#define | TIMER_IRQ_vect TIMER1_OVF_vect
#define | TIMER_POOL_SIZE (4)
#define | TIMER_TICK (HWTIMER_TICK_NB * HWTIMER_TICK)

## Detailed Description

Meshnetics Meshbean Development Board WDB-A1281-(P1,A1,E2,Amp) with ATmega1281 and AT86RF230.

See also

- http://www.meshnetics.com/dev-tools/meshbean/
- http://www.mikrocontroller.net/articles/Meshnetics_Zigbee

The wiring of the radio and the ATmega is shown below:

         AVR      RF230
         ---      -----
         PB4  -->  SLPTR
         PE5  <--  IRQ (INT5)
         PA7  -->  RSTN
         PB0  -->  SS
         PB2  -->  MOSI
         PB3  <--  MISO
         PB1  -->  SCK
         XTAL1 <--  MCLK

                Meshbit - AVR
         Key1  - IRQ6   - PE6 (INT6)
         Key2  - IRQ7   - PE7 (INT7)

         SW1   - GPIO3  - PG0
         SW2   - GPIO4  - PG1
         SW3   - GPIO5  - PG1

         LED1  - GPIO0  - PB5
         LED2  - GPIO1  - PB6
         LED3  - GPIO2  - PB7

    Fuses/Locks:
        uracoli settings:
         LF: 0xe2 - 8MHz internal RC Osc.
         HF: 0x11 - without boot loader
         HF: 0x10 - with boot loader
         EF: 0xff
         LOCK: 0xef - protection of boot section

        original settings
         LF: 0x62 - ... ? todo
         HF: 0x1d - ... ?
         EF: 0xff

    Bootloader:
        Start at byte=0x1e000, address=0xf000, size = 4096 instructions/ 8192 bytes

- Host Interface: HIF_TYPE

Build Options

- wdba1281 : 2.4GHz Meshbeand with ZigBit (ATmega1281 + AT86RF230B)
- mn900 : 900MHz Meshbeand with ZigBit (ATmega1281 + AT86RF212)

Definition in file board_wdba1281.h.

## Define Documentation

#define HIF_TYPE (HIF_UART_1)

On the Meshbean board UART1 is routed either via a FT232BM USB converter to connector CN1 or via a RS232 level shifter to header P2. The selection is done with jumper J3.

Definition at line 148 of file board_wdba1281.h.

#define HWTMR_PRESCALE (1)

- CS1[2:0] = 1 : Prescaler = 1
- WGM1[3:0] = 0 : Mode = 4 : CTC operation

Timer is clocked at F_CPU, and TIMER_IRQ_vect is called every 65535 ticks.

Definition at line 158 of file board_wdba1281.h.

#define LED_DDR DDRB

DDR register for LED

Definition at line 114 of file board_wdba1281.h.

#define LED_MASK 0xe0

MASK value for LED

Definition at line 115 of file board_wdba1281.h.

#define LED_NUMBER (3)

number of LEDs for this board

Definition at line 118 of file board_wdba1281.h.

#define LED_PORT PORTB

PORT register for LED

Definition at line 113 of file board_wdba1281.h.

#define LED_SHIFT (5)

SHIFT value for LED

Definition at line 116 of file board_wdba1281.h.

#define LEDS_INVERSE (0)

a 1 at the PORT means the LED is off

Definition at line 117 of file board_wdba1281.h.

#define SLEEP_ON_KEY | ( |  | ) |

Value:

    do{\
                EIMSK |= _BV(INT6);\
                set_sleep_mode(SLEEP_MODE_PWR_DOWN);\
                sleep_mode();\
                EIMSK &= ~_BV(INT6);\
            } while(0)

Definition at line 131 of file board_wdba1281.h.

#define TIMER_INIT | ( |  | ) |

Value:

    do{ \
            TCCR1B |= (_BV(CS10));\
            TIMSK1 |= _BV(TOIE1); \
        }while(0)

Definition at line 164 of file board_wdba1281.h.