DV164126 Microchip Technology, DV164126 Datasheet - Page 25

KIT DEVELOPMENT USB W/PICKIT 2

DV164126

Manufacturer Part Number
DV164126
Description
KIT DEVELOPMENT USB W/PICKIT 2
Manufacturer
Microchip Technology
Datasheets

Specifications of DV164126

Main Purpose
Interface, USB 2.0 Slave
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
PIC18F13K50, PIC18F14K50
Primary Attributes
Full Speed (12Mbps), MCU Based
Secondary Attributes
4 Labs: Enumeration, HID Mouse, HID Keyboard, CDC Serial Emulator
Silicon Manufacturer
Microchip
Silicon Core Number
PIC18F14K50, PIC18F13K50
Core Architecture
PIC
Core Sub-architecture
PIC18
Silicon Family Name
Piccolo
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DV164126
Manufacturer:
Microchip Technology
Quantity:
135
© 2009 Microchip Technology Inc.
EXAMPLE 2-7:
Note that the HID mouse transmits in 3-byte packets. The format of this packet is as
follows:
• This byte is typically used to identify mouse buttons. Since this application does
• The second and third bytes represent horizontal (X) and Vertical (Y)
Compile the project. There should be no errors.
Testing the Application
9. Ensure that the Low Pin Count USB Development Board is configured as in Lab 1.
10. Connect the PICkit 2 Programmer and open the PICkit 2 programming software.
11. Navigate to the .hex file located in the C:\LPCUSBDK_Labs\Lab2_files for
not require any mouse clicks, this byte is always zero.
displacements.
if (emulate_mode == TRUE)
else
Note:
this lab and download to the PIC18F14K50.
{
}
{
}
if(HIDTxHandleBusy(lastTransmission) == 0)
{
}
//go 14 times in the same direction before changing
if (movement_length > 14)
{
}//end if (movement_length > 14)
vector++;
//Send the 3 byte packet over USB to the host.
lastTransmission = HIDTxPacket(HID_EP, (BYTE*)hid_report_in,
The device created in the Device Manager from the previous lab will need
to be removed so that the new device, created in this lab, can enumerate
properly. In the Device Manager window, right-click on the device and
select Uninstall.
0x03);
movement_length = 0;
buffer[0] = 0;
buffer[1] = dir_table[vector & 0x07];
//X-Vector
buffer[2] = dir_table [(vector+2) & 0x07];
//Y-Vector
// go to the next direction in the table
//reset the counter for when to change again
//don't move the mouse
buffer[0] = buffer[1] = buffer[2] = 0;
//copy over the data to the HID buffer
hid_report_in[0] = buffer[0];
hid_report_in[1] = buffer[1];
hid_report_in[2] = buffer[2];
//increment the counter to change the data sent
movement_length++;
USER DEFINED FUNCTIONAL CODE FOR
EMULATE_MOUSE()
DS41356B-page 21

Related parts for DV164126