I tried the following
config:
bsf STATUS,5
movlw B'00000111'
movwf ADCON1
movwf B'00000111
movlw CMCON
movlw B'00000000'
movwf TRISA
does not work any way
---------- Post added at 21:26 ---------- Previous post was at 20:59 ----------
I read the datasheet three times about ADC and compartors modules
But I didn't make any progress.Below is my programm.
Thankyou in advance for your help.
org 0
bsf STATUS,5
movlw B'00000111'
movwf ADCON1
movlw B'00000111
movwf CMCON
movlw H'0000'
movwf TRISA
movlw H'0000'
movwf TRISB
bcf STATUS,5
call LCDcmd
clrf COUNT3
Loop movf COUNT3,0
call w_LCD
xorlw A'T'
btfsc STATUS,2
Call Line2
incf COUNT3,1
goto Loop
LCDcmd bcf PORTA,0
movlw H'0001'
movwf PORTB
Call E_Pulse
movlw H'0038'
movwf PORTB
Call E_Pulse
movlw H'000F'
movwf PORTB
Call E_Pulse
return
w_LCD bsf PORTA,0
Call text
movwf PORTB
Call E_Pulse
return
E_Pulse
bsf PORTA,1
Call Delay
bcf PORTA,1
return
Delay
Loop1 decfsz COUNT1,1
goto Loop1
decfsz COUNT2,1
goto Loop1
return
text
addwf PCL,1
retlw A'S'
retlw A'A'
retlw A'V'
retlw A'I'
retlw A'O'
retlw A'U'
retlw A'R'
retlw A' '
retlw A'M'
retlw A'U'
retlw A'S'
retlw A'C'
retlw A'A'
retlw A'T'
return
Line2 bcf PORTA,0
movlw H'00C0'
movwf PORTB
Call E_Pulse
clrf COUNT3
Loop4 movf COUNT3,0
call w_LCD
xorlw A'T'
btfsc STATUS,2
goto stop
incf COUNT3,1
goto Loop4
stop bcf PORTA,0
movlw H'001C'
movwf PORTB
Call E_Pulse
Call Delay
goto stop
return
end
---------- Post added at 21:51 ---------- Previous post was at 21:26 ----------
Thank you for your cooperation I managed by myself thankyou!!!!!!!!