Re: what is wrong in this code
Code:
@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _BODEN_OFF & _LVP_OFF & _CP_ON
CLEAR
TRISA = 255
TRISB = 0
' Comparator Control
CMCON=100101
CompOut var CMCON.7
' CM7 C2OUT Comparator Output 2 (Read Only)
' CM6 C1OUT Comparator Output 1 (Read Only)
' Voltage Reference Control
VRCON = 0
Pauseus 10 ' VREF to settle.
PORTB = 0
LED_A var PORTB.0
LED_B var PORTB.6
Start:
led_a = compout
led_B = ~compout
pause 1
goto start
end
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks