at83c5122 ATMEL Corporation, at83c5122 Datasheet - Page 102

no-image

at83c5122

Manufacturer Part Number
at83c5122
Description
At83c5123 C51 Microcontroller With Usb And Smart Card Reader Interfaces
Manufacturer
ATMEL Corporation
Datasheet
Read/Write Data FIFO
Read Data FIFO
Write Data FIFO
102
AT8xC5122/23
The read access for each OUT endpoint is performed using the UEPDATX register.
After a new valid packet has been received on an Endpoint, the data are stored into the
FIFO and the byte counter of the endpoint is updated (UBYCTX register). The firmware
has to store the endpoint byte counter before any access to the endpoint FIFO. The byte
counter is not updated when reading the FIFO.
To read data from an endpoint, select the correct endpoint number in UEPNUM and
read the UEPDATX register. This action automatically decreases the corresponding
address vector, and the next data is then available in the UEPDATX register.
The write access for each IN endpoint is performed using the UEPDATX register.
To write a byte into an IN endpoint FIFO, select the correct endpoint number in UEP-
NUM and write into the UEPDATX register. The corresponding address vector is
automatically increased, and another write can be carried out.
Warning 1: The byte counter is not updated.
Warning 2: Do not write more bytes than supported by the corresponding endpoint.
Figure 54. Endpoint FIFO Configuration
138H
F8H
B8H
78H
38H
30H
28H
20H
00H
Endpoint 6 - bank 1
Endpoint 6 - bank 0
Endpoint 5 - bank 0
Endpoint 4 - bank 0
Endpoint 3 - bank 0
Endpoint 2 - bank 0
Endpoint 1 - bank 0
Endpoint 0 - bank 0
2 x 64 Bytes
8 Bytes
8 Bytes
8 Bytes
32 Bytes
64 Bytes
64 Bytes
4202E–SCR–06/06

Related parts for at83c5122