Microchip Technology DV164139 Datenbogen
© 2009 Microchip Technology Inc.
DS41356B-page 31
FIGURE 2-7:
CDCTXSERVICE( ) STATE DIAGRAM
2.7.2
Procedure
This application requires significant changes to the usb_descriptor.c file to configure
the PIC18F14K50 as a CDC device. Note the absence of the report descriptor. The
user is encouraged to spend some time reviewing the usb_descriptor.c file and com-
pare it against the information found in the Universal Serial Bus Class Definitions for
Communications Devices document referenced at the beginning of this chapter. Note
that this lab applies the same firmware found in the CDC – Serial Emulator application
example in Microchip’s Full-Speed USB Firmware Framework application examples
and can be used as a reference for this lab.
the PIC18F14K50 as a CDC device. Note the absence of the report descriptor. The
user is encouraged to spend some time reviewing the usb_descriptor.c file and com-
pare it against the information found in the Universal Serial Bus Class Definitions for
Communications Devices document referenced at the beginning of this chapter. Note
that this lab applies the same firmware found in the CDC – Serial Emulator application
example in Microchip’s Full-Speed USB Firmware Framework application examples
and can be used as a reference for this lab.
1.
Create a new project for lab 4, using the Project Wizard, called “Project Lab 4”
as was done in the previous labs. The only files added, at this point, will be the
usb_descriptor.c
as was done in the previous labs. The only files added, at this point, will be the
usb_descriptor.c
and main.c source files, as well as a new unique descrip-
tor for Lab 4 rm18f14k50.lkr can be found in:
C:\LPCUSBDK_Labs\Lab4_files
C:\LPCUSBDK_Labs\Lab4_files
Step through to close the Project Wizard. This time, the project will be set up to
resemble the application examples in the Framework using sub-folders to distin-
guish and organize the different source files in the Project window. All remaining
source/header files will be added from the Project window.
resemble the application examples in the Framework using sub-folders to distin-
guish and organize the different source files in the Project window. All remaining
source/header files will be added from the Project window.
2.
Right click on the Source Files folder in the Project window and select Create
Subfolder...
Subfolder...
CDC_TX_READY
CDC_TX_BUSY
CDC_TX_COMPLETING
CDC_TX_BUSY_ZLP
cdc_tx_lenl=0
cdc_tx_len==0
CDC_BULK_BD_IN.Cnt <Max EP Size
cdc_tx_len==0
CDC_BULK_BD_IN.Cnt <Max EP Size
mCDCUsartTxlsBusy()==0
CDC_BULK_BD_IN.Cnt==0