The Demonstration Application
FIGURE 2-3:
PROGRAM MEMORY MAP OF THE PIC18F46J50 DEMO
0000h
Bootloader
Firmware
Reset Vector
High-Priority Interrupt
Vector
Low-Priority Interrupt
A000h
A008h
A018h
Vector
Application
Program Memory
FFFFh
Note:
2.1.3
Memory areas are not shown to scale.
Writing Application Code
The bootloader operates as a separate entity, which means that an application can be
developed with very little concern about what the bootloader is doing.
When using the MPLAB ? C18 C compiler to develop PIC18F firmware for an application,
the linker file must be changed to protect the program memory used by the bootloader
and the interrupt handler must be updated with the new vectors. An example linker file
( 18f46j50_g.lkr ) is provided on the starter kit CD-ROM.
If the need exists to re-enter the bootloader from the application (and it usually does), it
will be necessary to monitor the state of the S1 switch periodically. Since the bootloader
assumes Reset conditions, a RESET instruction should be initiated if the S1 is pressed.
An example stub application ( USB Device-HID-Mouse\Firmware\mouse.c ) on the
starter kit CD demonstrates how to re-enter the bootloader from the main application.
2.2
USB HID MOUSE DEMO
This demo uses the starter kit as a USB mouse. When the application is run, the starter
kit functions like any other mouse under the Windows operating system.
The movement of the mouse cursor on the X and Y axes is controlled using the
on-board accelerometer. The acceleration on all three axes is used to compute the
board tilt, which is then converted to movement of the mouse cursor on the X and Y
axis. This conversion is not linear, allowing for slow movement of the cursor when the
board is tilted a small amount, and fast movement for a steeper tilt. Keeping the board
level (with respect to the ground) stops all cursor motion.
The touch pads are used for the Left and Right mouse buttons, while the scroll bar is
used for the mouse scroll wheel.
? 2009 Microchip Technology Inc.
DS51852A-page 11
相关PDF资料
DM183022 BOARD DEMO PIC18FXX22 64/80TQFP
DM183032 BOARD EXPLORER PICDEM PIC18
DM240001 BOARD DEMO PIC24/DSPIC33/PIC32
DM240002 BOARD DEV EXPLORER 16 44-PIN
DM240011 KIT STARTER MPLAB FOR PIC24F MCU
DM240021 KIT STARTER MPLAB FOR PIC24H
DM240311 BOARD DEV PIC24F16KA102 XLP
DM300018 BOARD DEMO DSPICDEM 2
相关代理商/技术参数
DM1800-434MB 功能描述:射频模块 DM1800 Base Station 433.92 MHz RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
DM1800-434MN 功能描述:射频模块 DM1800 Field Node 433.92 MHz RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
DM1800-434MN-V 功能描述:射频模块 Field Node w/ Host Ser Intr 433.92 MHz RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
DM1800-434MR 功能描述:射频模块 DM1800 Network Router 433.92 MHz RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
DM1800-434MR-PAH 功能描述:射频模块 DM1800 Pkg Router 433.92 MHz Horzt Mnt RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
DM1800-434MR-PAV 功能描述:射频模块 DM1800 Pkg Router 433.92 MHz Vert Mnt RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
DM1800-434MR-PBH 功能描述:射频模块 DM1800 Pkg Router 433.92 MHz Horzt Mnt RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm
DM1800-434MR-PBV 功能描述:射频模块 DM1800 Pkg Router 433.92 MHz Vert Mnt RoHS:否 制造商:Linx Technologies 产品:Transceiver Modules 频带:902 MHz to 928 MHz 输出功率:- 15.5 dBm to + 12.5 dBm 接口类型:UART 工作电源电压:- 0.3 VDC to + 5.5 VDC 传输供电电流:38.1 mA 接收供电电流:22.7 mA 天线连接器类型:U.FL 最大工作温度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm