Курсовая работа: Устройство контроля за уровнем аналоговых сигналов
MOVWF SV
;--------------------------- INIT TIMER1
MOVLW B'00111000'
MOVWF TMR1L
MOVLW B'10100111'
MOVWF TMR1H
;------------------------------- INIT TIMER 2
; --------------------------- RUN TIMER1
CLRF T1CON
BSF T1CON,TMR1ON ; TIMER ON
BCF PIR1,TMR1IF
BSF INTCON,GIE
BSF INTCON,PEIE
BSF STATUS,5 ; BANK1
BSF PIE1,TMR1IE
BSF PIE1,TMR2IE
; MOVLW B'00000001'
; MOVWF PIE1
MAIN
;--------------------------------------------- ADC ------------
BCF STATUS,5 ; BANK0
MOVLW B'11000001'
MOVWF ADCON0
BSF ADCON0,2 ; START CONV
CALL BINTOSEVEN
LOOP
BTFSC ADCON0,2
GOTO LOOP
;---------------------------- TEST VALUES