User manual
PIC18 Wireless Development Board
© 2011-2012 Microchip Technology Inc. Preliminary DS70654B-page 13
2.1.3 PICtail Port
PICtail Port is a 28-pin interface port that supports Microchip’s RF based daughter
cards. PICtail Port provides the following interfaces to the daughter cards:
• Power supply
• SPI interface
• Interrupt request lines
2.1.4 Push Buttons
PIC18 Wireless Development board contains two push buttons, RB0 and RB2. These
buttons are assigned to the individual interrupt lines of the microcontroller and are not
driven by external pull-up circuitry to save power consumption. The user software must
enable the Port B pull-ups of the microcontroller before evaluating the button state.
Example 2-1 illustrates a possible solution to evaluate the state of RB2.
EXAMPLE 2-1: CODE EXAMPLE FOR EVALUATING THE STATE OF RB2
2.1.5 Onboard Temperature Sensor
The temperature sensor used is the Microchip’s MC9700A, which is a low-power Linear
Active Thermistor™ IC. To minimize power consumption, the sensor is powered from
a port pin. After powering up, the sensor output can be measured after a minute. The
internal AD converter of the microcontroller is used to measure the temperature value.
2.1.6 Onboard Serial EEPROM
The Onboard Serial EEPROM is a low-power, Microchip’s 25LC256 256K SPI Bus
Serial EEPROM, which shares the SPI interface with the PICtail port. But Onboard
Serial EEPROM has its own active low chip select line connected to the RD5 port pin.
2.1.7 Debug LEDs
The PIC18 Wireless Development Board contains three LEDs for debug purposes. To
conserve battery power, LEDs power can be disconnected by removing the JP201 and
LED power jumper.
Note: User must be careful about the PICtail port pins that share different
functions of the board. The user needs to check the schematics before
assigning functions for any port pins.
//Initialize RB2
TRISBbits.TRISB2 = 1; // RB2 is an input
ANCON1 |= 0x01; // RB2 is a digital pin
/*
User code
*/
//Evaluating RB2
INTCON2bits.RBPU = 0; // PortB pull ups are enabled
if (PORBbits.RB2 == 0) // RB2 is pushed
{
/*
RB2 PB code...
*/
}
INTCON2bits.RBPU = 1; // PortB pull ups are disabled