English
Language : 

PIC24K Datasheet, PDF (2/4 Pages) Microchip Technology – Microstick for 3V PIC24 K Series Devices
Developing Applications
Microstick for 3V PIC24 K Series Devices only implements circuitry for low-voltage
ICSP™ programming. To enable low-voltage ICSP programming, it is important to
always configure the microcontroller to enable MCLR pin function, rather than RA5
general purpose input pin function.
The following assembly language directive enables the MCLR pin function in the
device Configuration bits:
; MCLR Pin Enable bit (RA5 input disabled; MCLR enabled)
config __FPOR, MCLRE_ON
In C30, the same thing is accomplished with this code:
// MCLR Pin Enable bit (RA5 input disabled; MCLR enabled)
FPOR(MCLRE_ON)
Warning: Always program the microcontroller with MCLR pin functionality
enabled so that the Microstick for 3V PIC24 K Series Devices can
be used to program/debug the chip in the future.
If the microcontroller is programmed with MCLR pin function dis-
abled (RA5 input enabled), the Microstick will no longer program or
debug firmware on the microcontroller, because Microstick does
not have circuitry to use high-voltage ICSP entry. REAL ICE™,
MPLAB ICD 3 and PICkit™ 3 are an example of high-voltage ICSP
tools that can be used to recover the part.
The slide switch, labeled S3 on the PCB, is used to select which pair of PGECx/
PGEDx pins to use for In-Circuit Serial Programming™ (ICSP™). When moved
towards the DIP socket, the Microstick is set for using PGEC3/PGED3. When
moved towards the USB connector, the Microstick is configured for PGEC1/
PGED1.
To allow for debugging to work in MPLAB, the device’s Configuration bits must be
set up to indicate which PGECx/PGEDx pins are actually being used in the circuit.
For example, in assembly language, you may need directives such as this:
.include "p24Fxxxx.inc"
; ICD Pin Placement Select (EMUC/EMUD share PGC3/PGD3)
config __FICD, ICS_PGx3
In C30, the same thing can be accomplished with this code:
#include <p24Fxxxx.h>
// ICD Pin Placement Select (EMUC/EMUD share PGC3/PGD3)
_FICD(ICS_PGx3)
A C30 firmware source code example for blinking the Microstick’s LED is provided
on the Microchip web site (see http://www.microchip.com/microstick3V).
Hardware Design
The Microstick for 3V PIC24 K Series Devices is USB bus-powered. An on-board
MCP1727 LDO regulator provides +3.3 VDC output from the USB bus power.
Turning power on/off to the target application is controlled by the MPLAB IDE via
the FPF2102 load switch. The FPF2102 load switch automatically shuts down
power to the target if the current exceeds a trip point of 200 mA to 400 mA. This
may help protect the host PC USB port from accidental shorting of power supply
pins in the target application circuit.
The Microstick may be plugged into a prototyping board to develop external appli-
cation circuitry with the PIC® MCU. On the bottom side of the board, three rows of
pins are provided, labeled P1, P2 and P3. Normally, the skinny DIP layout
(300 mils) should be used by populating rows, P1 and P2. Optionally, rows, P1
and P3, may be populated instead to provide a wide DIP layout (600 mils). The
unpopulated, single in-line pin header for soldering into P3 is available separately
as Digi-Key Part Number ED7464-ND.
Using the 16-Bit XLP Development Board
In the skinny DIP layout configuration (rows, P1 and P2, are populated), the Micro-
stick may be plugged into Microchip’s “16-Bit XLP Development Board”. The 16-Bit
XLP Development Board provides several external buttons, LEDs, peripherals and
sensors that can be used to quickly evaluate the device without spending time
wiring a breadboard.
Warning: Always remove batteries and/or the “POWER SOURCE SELECT”
jumper from the 16-Bit XLP Development Board, prior to inserting
the Microstick board. The Microstick for 3V PIC24 K Series Devices
is intended to supply power to the target application, which could
cause an unintended charging of batteries connected to the 16-Bit
XLP Development Board.
The 16-Bit XLP Development Board may come with a USB-to-Serial or RS-232
serial port wired to the PIC microcontroller’s U2TX/U2RX pins. To avoid conflict
with the on-board serial port circuitry, slide S3 of the Microstick to the PGEC3/
PGED3 setting (move the switch lever towards the DIP socket).