Hardware Reference
In-Depth Information
In der Summe ergibt sich folgendes Programmsegment für die Konfiguration der
Hardware über die FLASH-Konfigurationsregister der CPU:
; Configuration bits settings according to the usage of the PCDEM FS USB Demo
Board
CONFIG PLLDIV = 5
CONFIG CPUDIV = OSC1_PLL2
CONFIG USBDIV = 2
CONFIG FOSC = HSPLL_HS
CONFIG VREGEN = ON
Der nächste Schritt bei der Konfiguration der USB-Hardware besteht in der Festle-
gung der Inhalte einiger RAM-Konfigurationsregister. Bei Initialisieren in der Start-
phase des Mikrocontrollers wird dazu zunächst das Unterprogramm USB_init auf-
gerufen.
; initialize USB interface
call
USB_init
call
USB_reset
Am Beginn von USB_init wird als Erstes das USB Control Register UCON auf 0x00
gestellt.
clrf
UCON
;clear USB Control Register
Search WWH ::




Custom Search