Microchip Technology DM183037 Data Sheet

Page of 696
 2012 Microchip Technology Inc.
DS30575A-page 533
PIC18F97J94 FAMILY
27.2.5
USB ADDRESS REGISTER 
(UADDR)
The USB Address register contains the unique USB
address that the peripheral will decode when active.
UADDR is reset to 00h when a USB Reset is received,
indicated by URSTIF, or when a Reset is received from
the microcontroller. The USB address must be written
by the microcontroller during the USB setup phase
(enumeration) as part of the Microchip USB firmware
support.
27.2.6
USB FRAME NUMBER REGISTERS 
(UFRMH:UFRML)
The Frame Number registers contain the 11-bit frame
number. The low-order byte is contained in UFRML,
while the three high-order bits are contained in
UFRMH. The register pair is updated with the current
frame number whenever a SOF token is received. For
the microcontroller, these registers are read-only. The
Frame Number registers are primarily used for
isochronous transfers. The contents of the UFRMH and
UFRML registers are only valid when the 48 MHz SIE
clock is active (i.e., contents are inaccurate when
SUSPND (UCON<1>) bit = 1).
27.3
USB RAM
USB data moves between the microcontroller core and
the SIE through a memory space, known as the USB
RAM. This is a special dual access memory that is
mapped into the normal data memory space in Banks 0
through 14 (00h to EBFh), for a total of 3.8 Kbytes
(
). 
Bank 13 (D00h through DFFh) is used specifically for
endpoint buffer control, while Banks 0 through 12 and
Bank 14 are available for USB data. Depending on the
type of buffering being used, all but 8 bytes of Bank 13
may also be available for use as USB buffer space.
Although USB RAM is available to the microcontroller
as data memory, the sections that are being accessed
by the SIE should not be accessed by the micro-
controller. A semaphore mechanism is used to
determine the access to a particular buffer at any given
time. This is discussed in 
.
FIGURE 27-4:
IMPLEMENTATION OF 
USB RAM IN DATA 
MEMORY SPACE
D00h
DFFh
E00h
USB Data or
Buffer Descriptors,
USB Data or User Data
User Data
CFFh
000h
FFFh
Banks 0
(USB RAM)
to 14
Access Ram
060h
05Fh
EC0h
EBFh
SFRs