Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- poc1 equ 21h
- poc2 equ 22h
- org 00h
- goto start
- org 04h
- bcf PIR1,TMR2IF
- decf poc1,1
- btfsc STATUS,2
- call sem1
- comf PORTB,1
- retfie
- start:
- bsf STATUS,RP0
- clrf ANSEL
- movlw 60h
- movwf OSCCON
- clrf TRISB
- ;x= ((fosc/4)/f)/(PRESC*POSTSC))-1
- movlw .x
- movwf PR2
- movlw 02h
- movwf PIE1
- bcf STATUS,RP0
- clrf PORTB
- movlw .y ; y je kolikrat to prevrati hranu nez to prerusim
- movwf poc1
- movlw z ; z je nastaveni T2CON coz sou preddelicky a postdelicky atd.
- movwf T2CON
- movlw 0C0
- movwf INTCON
- bsf T2CON,TMR2ON
- Sem1
- nop
- Sem2
- decf poc2,1
- btfss STATUS,2
- goto Sem2
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement