You are on page 1of 2

Activity 1 Make Led according to Workstation number (13) using bcd and common anode(input signal:

light on 0)

Code:

#include P16F84A.inc

org 0x000

//(BSF STATUS, RP0

MOVLW 0x00

MOVWF TRISA

MOVLW 0x00

MOVWF TRISB )

//OR, the lower codes, more efficient

BSF STATUS, RP0

CLRF TRISA

CLRF TRISB

BCF STATUS, RP0

MOVLW 0x00

MOVWF PORTA

MOVLW b'0100001'

MOVWF PORTB

End

You might also like