TUTA5 microcontrollers and electronics,
-
Upload
traian-vladu -
Category
Documents
-
view
216 -
download
2
description
Transcript of TUTA5 microcontrollers and electronics,
; TUTA5.ASM 11MAR02; as TUTA4, showing how Carry bit rotates into reg
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ; Configuration data ; PICmicro MCU type: 16F84 ; Oscillator: RC mode, slow, VR1 fully clockwise (max.rate) ; LCD display: off ; 7-segment display: off ; Version 2 board settings: J14 links: Digital;::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ;; The following line embeds configuration data into the PICmicro
__CONFIG H'3FFB' ; RC mode;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#DEFINE PAGE0 BCF STATUS,5#DEFINE PAGE1 BSF STATUS,5
STATUS EQU H'03' ;TRISB EQU H'86' ;PORTB EQU H'06' ;W EQU 0 ; WorkingF EQU 1 ; FileC EQU 0 ; Carry
ORG 0 ; Reset vectorGOTO 5 ; Goto start of programORG 4 ; Interrupt vectorGOTO 5 ; Goto start of programORG 5 ; Start of program memory
CLRF PORTB ; clear PORTBPAGE1 ;CLRF TRISB ; PORTB as outputPAGE0 ;
BSF STATUS,C ; set the Carry bit in STATUS
LOOP RLF PORTB,F ; rotate left PORTBGOTO LOOP ; repeat
END ; final statement