Chapter 4 Software Development
USB D+
D-
Transceiver /receiver
Protocol engine
DPLL
Oscillator
Status and |
control registers |
Setup |
registers |
(8 bytes) |
EP0receive |
buffer ( 8 bytes) |
EP0 trasmit |
buffer (8bytes) |
EP1 receive/ |
trasmit double |
buffer |
(64 bytesx 2) |
EP2 receive/ |
transmit buffer |
(64 bytes) |
EP3 transmit |
buffer (8 bytes) |
FIFO |
|
|
|
|
|
| ||
|
|
|
|
|
| ||
|
|
|
|
|
| ||
|
|
|
|
|
| ||
|
|
|
|
|
| ||
| Microcontroller | interface |
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
| ||
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INTR/
RD/
WR/
CS/
ALE ADSEL
DREQ
DACK
Figure 4.3.1. ML60851C Block Diagram
Protocol engine operation for a control transfer setup transaction differs from that for all other transactions.
Setup transactions always write the eight bytes in the associated data packet to the setup registers. If this data is received successfully, the protocol engine sends an ACK back to the host. It also sends a setup interrupt to the control microcontroller to request register readout.
Data receive transactions write the data from the USB bus to the specified endpoint's receive buffer if there is room. If this data is received successfully, the protocol engine sends an ACK back to the host. It also sends a data received interrupt for the command to the control microcontroller. If there is no room in the receive buffer or there is an error, the protocol engine sends an NAK back to the host.
Data transmit transactions send a data packet from the specified endpoint's transmit buffer to the USB bus if there one ready. If the host then sends an ACK completing the transaction, the Data transmit transactions send a data packet from the specified endpoint's transmit buffer to the USB bus if there one ready. If the host then sends an ACK completing the transaction, the protocol engine empties the buffer. It also sends a transmit buffer empty interrupt to the control microcontroller to request more data.
4-3-3. Connecting Microcontroller to USB Controller
The ML60851C offers the following configuration options for the microcontroller interface.
(1)Choice, with ADSEL pin, of separate or multiplexed address and data buses
(2)Choice, with register setting under program control, of 8- or
The
The JOB60851 board uses separate address and data buses, an
page