DM180021 Microchip Technology Inc., DM180021 Datasheet - Page 15

no-image

DM180021

Manufacturer Part Number
DM180021
Description
MPLAB Starter Kit for PIC18F MCU
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of DM180021

Contents
MicroSD™ memory cardAcceleration sensorOLED display
Lead Free Status / Rohs Status
RoHS Compliant part

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DM180021
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
DM180021
Manufacturer:
MICROCHIP
Quantity:
12 000
2.2
© 2009 Microchip Technology Inc.
USB HID MOUSE DEMO
FIGURE 2-3:
2.1.3
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
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.
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.
Note:
Writing Application Code
Memory areas are not shown to scale.
PROGRAM MEMORY MAP OF THE PIC18F46J50 DEMO
®
C18 C compiler to develop PIC18F firmware for an application,
The Demonstration Application
High-Priority Interrupt
Low-Priority Interrupt
Program Memory
Reset Vector
Bootloader
Application
Firmware
Vector
Vector
0000h
A000h
A008h
A018h
FFFFh
DS51852A-page 11

Related parts for DM180021