<< Chapter < Page | Chapter >> Page > |
P1IFG&= ~0x04;
by
P1IFG |= 0x04;
. This means that once you push the button, the board will start sending an infinite number of messages. This is because you force the interrupt flag to remain active, i.e. when your code leave the Interrupt Service Routine, it immediately re-enters because, according to the interrupt flag, there is still and interrupt pending.P1OUT ^= 0x02;
and
P1OUT ^= 0x01;
so that your LEDs remain off not to measure their energy consumption;
We want to measure the impact of the transmission power on the current consumption of the board. Therefore:
#include "radios/family1/mrfi_spi.h"
MRFI_Init();
, add
mrfiSpiWriteReg(PATABLE,0xFF);
. This programs the
PATABLE
register of the CC2500, which is responsible for the transmission power of the radio. You can
put any value between
0x00
and
0xFF;
, which is then mapped to a transmission power as shown in the next table.PATABLE
. Check that you have results close to the ones presented in the next figure.register | power | current |
0x84 | -24dBm | 16.1mA |
0x55 | -16dBm | 16.5mA |
0x97 | -10dBm | 18.3mA |
0xA9 | -4dBm | 22.6mA |
0xFE | 0dBm | 27.6mA |
0xFF | 1dBm | 27.9mA |
Notification Switch
Would you like to follow the 'Ezwsn: experimenting with wireless sensor networks using the ez430-rf2500' conversation and receive update notifications?