Hardware Reference
In-Depth Information
call
transmitNONE ;send an empty packet trough control IN
bra
transtest_over_ctl_out
SET_CO
call
USB_config1
call
transmitNONE ;send an empty packet trough control IN
bra
transtest_over_ctl_out
Wenn das Gerät konfiguriert wird, müssen die Endpoints der gewählten Konfigura-
tion initialisiert werden.
;******************************************************************************
; configuration 1 (the one and only) is USBTMC-USB488 compatible
;******************************************************************************
USB_config1
movlw 0x01
movff WREG,bConfigurationValue
;this will be read back with „GET_CON-
; FIGURATION
; USB Endpoint Control (reference: DS39632C Section 17.2.4)
; Physical Endpoint 1 is used as transfer OUT endpoint
; Endpoint handshake enabled, disable for control transfers, output disable
; input enable, not stalled
movlw B'00011100'
movwf UEP1
; Physical Endpoint 2 is used as transfer IN endpoint
; Endpoint handshake enabled, disable for control transfers, output enable
; input disable, not stalled
movlw B'00011010'
movwf UEP2
; Physical Endpoint 3 is used as transfer IN endpoint
; Endpoint handshake enabled, disable for control transfers, output enable
; input disable, not stalled
movlw B'00011010'
movwf UEP3
; ************* BULK-OUT ENDPOINT ****************************************
; USB Buffer Description (reference: DS39632C Section 17.4):
; buffer descriptor base address 0x408
; Buffer Mode 00
movlw 0x0B
movwf
FSR0L
movlw 0x04
movwf FSR0H
; Bulk OUT Buffer Descriptor
; can receive 255 bytes
; buffer starts at adress 0x0600
movlw 0x06
movff WREG,POSTDEC0 ;BD2 ADRH
movlw 0x00
movff WREG,POSTDEC0 ;BD2 ADRL
movlw 0xFF
movff WREG,POSTDEC0 ;BD2CNT
Search WWH ::




Custom Search