Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;============================
- ;Adam Naglmuller, 10A
- ;Uloha A2
- ;============================
- INCLUDE "P16F88.INC"
- ZALOHA equ 20h
- __CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _MCLR_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_IO & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_ON
- __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
- org 00h
- goto setup
- org 02h
- setup
- bcf INTCON,7
- bcf STATUS,6
- bsf STATUS,5
- movlw 07h
- movwf CMCON
- movlw 00h
- movwf ANSEL
- movlw 60H
- movwf OSCCON
- movlw 0FFh
- movwf TRISA
- movlw 00h
- movwf TRISB
- bcf STATUS,5
- bcf ADCON0,0
- start
- movf PORTA,0 ;sejmu portA -> W
- movwf ZALOHA ;zaloha portA -> portA se mi meni co 10ms
- andlw 0FH ;maskování I. operandu
- movwf 21h ;ulozeni I. op do 21h
- movf ZALOHA,0 ;nacteni puvodni hodnoty do W ze zalohy
- andlw 0F0H ;maskovani II. operandu
- movwf 22h
- swapf 22h
- movf 22h,0
- addwf 21h,0
- movwf PORTB
- goto start
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement