Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
SocMatt said:Hi,
I am using a PIC16C782 which has a built in Digital to Analog converter. However i have not been able to find any commands which refer to setting up or reading the DAC.
If anyone could help it would be most appreciated.
Cheers
Matt
BANKSEL TRISB ; Select bank 1
BSF TRISB,1 ; Set RB1 input
BSF ANSEL,1 ; Set RB1 as analog
BANKSEL DACON0 ; Select Bank 2
CLRF DAC ; DAC to 00
MOVLW B’11000000’ ; Enable DAC output
MOVWF DACON0 ; Set REF = VDD
MOVLW DAC_VALUE
MOVWF DAC ; Set DAC output