Microchip Technology MA180021 Manuale Utente
PIC18F87J50 FS USB Plug-In Module User’s Guide
DS51678A-page 8
© 2007 Microchip Technology Inc.
2.3
PROGRAMMING THE MICROCONTROLLER
The PIC18F87J50 microcontroller located on the PIM may be reprogrammed in excess
of 10,000 cycles. The PIM is too small to feature a full size RJ11 jack used on most
Microchip demonstration boards. Instead, the PIM uses a 6-pin right angle male header
(J5) which is electrically compatible with common Microchip programmers, such as the
MPLAB
of 10,000 cycles. The PIM is too small to feature a full size RJ11 jack used on most
Microchip demonstration boards. Instead, the PIM uses a 6-pin right angle male header
(J5) which is electrically compatible with common Microchip programmers, such as the
MPLAB
®
ICD 2 and the MPLAB REAL ICE™ in-circuit emulator.
When the PIM is mated to the HPC Explorer board, it may be reprogrammed and
debugged directly through the modular RJ11 jack found on the HPC Explorer board.
When operated stand-alone, the PIM can be reprogrammed/debugged with program-
mers like the ICD 2 or REAL ICE in-circuit emulator via a modular RJ11 to ICSP™
(6-pin female header) adapter board. This adapter board can be ordered online from
www.microchipDIRECT.com, part number AC164110. This adapter board also comes
as part of the REAL ICE In-Circuit Emulator Performance Pak, microchipDIRECT part
number AC244002. When plugging the adapter board into the PIM, the silk screen
layer on both boards should face up. On the silk screens of each board, a small square
surrounds pin 1 (MCLR pin) on both the adapter board and PIM; these should line up.
debugged directly through the modular RJ11 jack found on the HPC Explorer board.
When operated stand-alone, the PIM can be reprogrammed/debugged with program-
mers like the ICD 2 or REAL ICE in-circuit emulator via a modular RJ11 to ICSP™
(6-pin female header) adapter board. This adapter board can be ordered online from
www.microchipDIRECT.com, part number AC164110. This adapter board also comes
as part of the REAL ICE In-Circuit Emulator Performance Pak, microchipDIRECT part
number AC244002. When plugging the adapter board into the PIM, the silk screen
layer on both boards should face up. On the silk screens of each board, a small square
surrounds pin 1 (MCLR pin) on both the adapter board and PIM; these should line up.
2.4
MIGRATING TO THE PIC18F87J50 FAMILY
The PIC18F87J50 family of microcontrollers offers a number of enhancements and
new features compared to previous PIC18 devices. Most changes require no modifica-
tions to user firmware, however, this section highlights key items that deserve special
attention.
new features compared to previous PIC18 devices. Most changes require no modifica-
tions to user firmware, however, this section highlights key items that deserve special
attention.
2.4.1
Special Function Register Addressing
The PIC18F87J50 family devices are very peripheral rich and consequently have more
Special Function Registers (SFRs) than will fit in the access portion of Bank 15. Some
of the new SFRs have been placed in the non-access portion of Bank 15 (addresses:
F40h to F5Fh inclusive). Some of the USB Control registers are located in the
non-access portion of Bank 15. See Section 5.3 “Data Memory Organization” in the
“PIC18F87J50 Family Data Sheet” (DS39775) for more details regarding these
changes.
In addition to the new Bank 15 SFRs, some of the new SFRs have been located in a
shadow space sharing the same addresses as other access bank SFRs. These
shadow space registers are only accessible when the WDTCON<ADSHR> bit has
been configured correctly.
When attempting to access the shadow space registers in either assembly or C18,
user firmware should be careful to keep track of, and manually control, the
WDTCON<ADSHR> bit.
When using Microchip’s C18 compiler, no source code changes will be needed to
address the non-access Bank 15 SFRs. The C18 compiler has awareness of these
new SFR locations and will automatically use the proper addressing modes to access
these registers.
The USB module on the PIC18F87J50 family of microcontrollers is compatible with
previous full-speed USB products, such as the PIC18F4550 family and PIC18F4450
family. The USB registers and bits within those registers retain the same names across
these families, so USB firmware can be ported between the devices with little or no
changes.
Special Function Registers (SFRs) than will fit in the access portion of Bank 15. Some
of the new SFRs have been placed in the non-access portion of Bank 15 (addresses:
F40h to F5Fh inclusive). Some of the USB Control registers are located in the
non-access portion of Bank 15. See Section 5.3 “Data Memory Organization” in the
“PIC18F87J50 Family Data Sheet” (DS39775) for more details regarding these
changes.
In addition to the new Bank 15 SFRs, some of the new SFRs have been located in a
shadow space sharing the same addresses as other access bank SFRs. These
shadow space registers are only accessible when the WDTCON<ADSHR> bit has
been configured correctly.
When attempting to access the shadow space registers in either assembly or C18,
user firmware should be careful to keep track of, and manually control, the
WDTCON<ADSHR> bit.
When using Microchip’s C18 compiler, no source code changes will be needed to
address the non-access Bank 15 SFRs. The C18 compiler has awareness of these
new SFR locations and will automatically use the proper addressing modes to access
these registers.
The USB module on the PIC18F87J50 family of microcontrollers is compatible with
previous full-speed USB products, such as the PIC18F4550 family and PIC18F4450
family. The USB registers and bits within those registers retain the same names across
these families, so USB firmware can be ported between the devices with little or no
changes.