This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ---------[ CWG Setup ]------------------------------------------ | |
; The sequence below follows "20.12 Configuring the CWG" in the PIC16(L)F18854 datasheet: | |
; http://ww1.microchip.com/downloads/en/DeviceDoc/40001826B.pdf | |
; Configuring the CWG, Step-1 | |
banksel TRISB ; [Bank 0] | |
movlw b'11111111' ; RB0 & RB1 are CWG Outputs but must be Inputs for now. | |
movwf TRISB ; PORTB | |
; Configuring the CWG, Steps-2&3 | |
banksel CWG1CON0 ; [Bank 12] |