PIC16C745/765
10.9.7 ASSEMBLING THE CODE
The code is designed to be used with the linker. There
is no provision for include-able files. The code comes
packaged as several different files:
• USB_CH9.ASM - handles all the Chapter 9 com-
mand processing.
• USB_INTF.ASM - Provides the interface functions
PutUSB, GetUSB
• USBMACRO.INC - Macros used by
• USB_DEFS.INC - #Defines used throughout the
code.
• USB_INT.ASM - Sample interrupt service routine.
• 16C765.LKR - Linker script (provided with
MPLAB)
10.9.7.1 Assembly Options:
There are two #defines at the top of the code that con-
trol assembly options.
10.9.7.2 #define ERRORCOUNTERS
This define includes code to count the number of
errors that occur, by type of error. This requires extra
code and RAM locations to implement the counters.
10.9.7.3 #define FUNCTIONIDS
This is useful for debug. It encodes the upper 6 bits of
USWSTAT (0x197) to indicate which function is exe-
cuting.
DS41124A-page 74
Advanced Information
1999 Microchip Technology Inc.