Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #INCLUDE "P16F88.INC"
- __CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _MCLR_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_IO & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF
- __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
- org 00h
- goto setup
- org 04h
- preruseni:BCF INTCON,1;požadavek na přerušení,nastavuje se hranou na pinu INT
- COMF PORTA ;negace portu A
- retfie
- setup:bcf INTCON,7
- bcf STATUS,6
- bsf STATUS,5
- MOVLW 07h
- MOVWF CMCON
- CLRF ANSEL
- MOVLW 60h
- MOVWF OSCCON
- movlw 0FEh
- movwf TRISA
- movlw 01h
- movwf TRISB
- bcf STATUS,5
- bcf ADCON0,0
- movlw 90h
- movwf INTCON
- clrf TRISA
- sem NOP
- NOP
- NOP
- goto sem
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement