Microchip Technology DV164139 Scheda Tecnica

Pagina di 54
© 2009 Microchip Technology Inc.
DS41356B-page 37
EXAMPLE 2-13: 
CHECK CDC CLASS DEVICE CODE
13. At this point, all the necessary code to run the CDC – Serial Emulator application 
is complete. Compile the project. There should be no errors.
Installing Application Drivers
14. Connect the PICkit 2 Programmer and open the PICkit 2 programming software.
15. Navigate to the .hex file for this lab and download to the PIC18F14K50.
16. Disconnect the PICkit 2. 
17. Connect the Low Pin Count USB Demo Board to the Host PC port. Windows 
should recognize the PIC18F14K50 as “CDC RS-232 Emulation Demo”.
Windows will now prompt the user for driver information.
18. In the “Welcome to the Found New Hardware Wizard” window, select “No, not 
this time” and then Next (see Figure 2-11).
FIGURE 2-11:
FOUND NEW HARDWARE WIZARD WINDOW
if((mUSBUSARTIsTxTrfReady()) && (NextUSBOut > 0))
{
putUSBUSART(&USB_Out_Buffer[0], NextUSBOut);
NextUSBOut = 0;
}