datasheetbank_Logo
búsqueda de Hoja de datos y gratuito Fichas de descarga

M30240 Ver la hoja de datos (PDF) - Mitsumi

Número de pieza
componentes Descripción
Lista de partido
M30240 Datasheet PDF : 142 Pages
First Prev 141 142
Preliminary Specifications REV. E
Specifications in this manual are tentative and subject to change
Mitsubishi microcomputers
M30240 Group
Programming Notes
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Below is an example of how to set/reset the ISO bit of the IN CSR register (for initializing the respective
endpoint as an isochronous endpoint):
[R1L] = [EPiICS].B
OR.B #08H, R1L
AND.B #0FEH, R1L
[EPiICS].B = [R1L]
[R1L] = [EPiICS].B
OR.B #02, R1L
AND.B #0F6H, R1L
[EPiICS].B= [R1L]
;set ISO bit = 1, write “1” back to UNDER_RUN bit
;write “0” back to IN_PKT_RDY bit
;write “1” back to UNDER_RUN bit
;reset ISO bit = 0, write “0” back to IN_PKT_RDY bit
5.5.2 USB Consecutive Set Address
The USB Specification states that the host can send a SET_ADDRESS request for the following cas-
es:
1. During enumeration when the device is in default state. (The host assigns a non-zero address.)
2. When the device is in the address state. (The host can re-assign a new address.)
The device handles case #1 (when the device is in the default state) and case #2 (when the device is
in the address state) differently. The following is a segment of code to illustrate the program flow to
properly deal with these cases.
DEFAULT_STATE:
If [USBA].B ==0
[USBA.].B = wValue _ lo
R1L = [EP0CS].B
OR.B #48H, R1L
[EP0CS].B = R1L
wait for the completion of the
JMP ADDR_END
else
ADDR_STATE
R1L [EP0CS].B
OR.B #48H, R1L
[EP0CS].B = R1L
wait for the completion of the
[USBA].B= wValue_lo
ADDR_END
endif
end of the set_address routine
;If the device is in default state, update address before STATUS
completion
;USB ENDPOINT 0 CSR
;Set serviced_out_pkt_rdy & data_end
;USB ENDPOINT 0 CSR
;Set serviced_out_pkt_rdy & data_end
;If the device is in address state, update address before STATUS
completion
Note: wValue_lo = assigned address from the host in SET-ADDRESS request.
1-142

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]