Universal Serial Bus (USB)
18-10
Am186™CC/CH/CU Microcontrollers User’s Manual
18.5
OPERATION
The Am186CC and Am186CU microcontrollers act as USB peripheral devices. The USB
is a half-duplex, master/slave, polled bus. In other words, the microcontroller only transmits
on the USB in response to a request from the USB host, usually a personal computer. There
can be only one transmitter on the USB at a time.
When the USB host addresses a peripheral, it also addresses a particular endpoint on that
device. Each endpoint is configured with a logical number that the USB host uses to address
that endpoint. No two endpoints can be configured with the same logical number.
The endpoint responds to the host’s requests, sending or receiving device data. In USB
nomenclature, data flowing
from the host travels in the OUT direction, and data flowing to
the host travels in the IN direction. Because the Am186CC or Am186CU microcontroller
resides in a USB peripheral, its OUT endpoints receive data, and its IN endpoints transmit
data.
Each endpoint is supported by a first-in-first-out buffer (FIFO). The FIFO is a temporary
storage location for the data that is passed between the microcontroller’s CPU or memory
bus and the integrated USB peripheral controller.
The microcontroller supports six endpoints:
■
One dedicated control endpoint (Endpoint 0)
■
One dedicated interrupt endpoint
■
Four fully programmable data endpoints (named A–D)
The following sections describe the USB endpoints and explain how to use them.
18.5.1
Usage
This section briefly lists the tasks that software must perform to program the USB peripheral
controller for various applications. The following programming tasks do not cover all
possibilities. They are intended to provide a basic understanding of USB register usage.
The user should program the registers appropriately for each specific application.
Many of the subjects mentioned in the following lists are discussed more thoroughly
elsewhere in this chapter.
18.5.1.1
General USB Peripheral Controller Programming Issues
■
Always power up the transceiver (internal or external) by setting the PUP_XCVR bit in
the USB Device Miscellaneous Functions (USBMFR) register.
■
Always configure an endpoint’s definition registers before enabling the endpoint.
Changing the endpoint register values while the endpoint is enabled could result in
unpredictable behavior.
■
When using USB status bits as interrupt sources, be sure to program the interrupt
Channel 2 Control (CH2CON) register to enable the channel and select its internal
source (USB).
■
Refer to the
Am186™CC/CH/CU Microcontrollers Register Set Manual, order #21916
for register default values and details about using each register field.
Summary of Contents for Am186 CC
Page 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Page 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Page 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Page 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Page 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Page 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Page 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Page 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Page 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...