DV164126 Microchip Technology, DV164126 Datasheet - Page 40
![KIT DEVELOPMENT USB W/PICKIT 2](/photos/9/4/90430/dv164126_sml.jpg)
DV164126
Manufacturer Part Number
DV164126
Description
KIT DEVELOPMENT USB W/PICKIT 2
Manufacturer
Microchip Technology
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
Company:
Part Number:
DV164126
Manufacturer:
Microchip Technology
Quantity:
135
Low Pin Count USB Development Kit User’s Guide
DS41356A-page 36
EXAMPLE 2-11:
11. Next the code that will check and then load the EUSART Transmit shift register
/*******************************************************
*******************************************************/
EXAMPLE 2-12:
12. Finally, the code to check if the CDC class device is ready to send data into the
/**********************************************************
*********************************************************/
// only check for new USB buffer if the old RS232 buffer is
// empty.
// Additional USB packets will be NAK'd
// until the buffer is free.
if (RS232_Out_Data_Rdy == 0)
(TXREG) with the contents of the RS-232 buffer will be entered. Copy and paste
the contents of Example 2-12 into the section labeled:
ADD THE CODE THAT WILL CHECK
IF THE EUSART TXREG IS EMPTY.
IF SO, BEGIN SENDING DATA
FROM RS232 TRANSMISSION INTO
THE TXREG ONE BYTE AT A TIME
USB transmit buffer will be entered. Copy and paste the contents of code in
Example 2-13 into the section labeled:
ADD THE CODE THAT WILL CHECK
IF THE CDC CLASS DEVICE IS
READY TO LOAD THE USB BUFFER
if(RS232_Out_Data_Rdy && mTxRdyUSART())
{
{
}
putcUSART(RS232_Out_Data[RS232cp]);
++RS232cp;
if (RS232cp == LastRS232Out)
LastRS232Out = getsUSBUSART(RS232_Out_Data,64);
if(LastRS232Out > 0)
{
}
TXREG CHECK AND LOAD CODE
RS-232 BUFFER CHECK
RS232_Out_Data_Rdy = 0;
RS232_Out_Data_Rdy = 1;
RS232cp = 0;// Reset the current position
//buffer full
// signal
© 2008 Microchip Technology Inc.