ahme0307
Member level 1
p16f873.inc
i am working my final year project.but i'm having problem.i write assembly code to
display just A using UART,but i am having multiple A s.please any one what is wrong with the code? here is the code
LIST P=16F873
#include "P16F873.INC"
#DEFINE BANK0 BCF STATUS,5
#DEFINE BANK1 BSF STATUS,5
;PORT INITIALIZATION
BCF STATUS,6
BANK0
CLRF PORTC
BANK1
BSF TRISC,7
BCF TRISC,6
START
;SERIAL INITIALIZATION
BSF TXSTA,4
BCF TXSTA,7
BSF TXSTA,5
;NEW
BCF TXSTA,6
BANK0
BSF RCSTA,7
BCF RCSTA,4
BCF RCSTA,5
MOVLW d'65'
MOVWF TXREG
BANK1
WAIT BTFSS TXSTA,1
GOTO WAIT
BANK0
GOTO START
END
i am working my final year project.but i'm having problem.i write assembly code to
display just A using UART,but i am having multiple A s.please any one what is wrong with the code? here is the code
LIST P=16F873
#include "P16F873.INC"
#DEFINE BANK0 BCF STATUS,5
#DEFINE BANK1 BSF STATUS,5
;PORT INITIALIZATION
BCF STATUS,6
BANK0
CLRF PORTC
BANK1
BSF TRISC,7
BCF TRISC,6
START
;SERIAL INITIALIZATION
BSF TXSTA,4
BCF TXSTA,7
BSF TXSTA,5
;NEW
BCF TXSTA,6
BANK0
BSF RCSTA,7
BCF RCSTA,4
BCF RCSTA,5
MOVLW d'65'
MOVWF TXREG
BANK1
WAIT BTFSS TXSTA,1
GOTO WAIT
BANK0
GOTO START
END