Syed WQ
Newbie level 3
- Joined
- Jan 2, 2014
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 21
plz any provide me simple basic Assembly code for PIC16f877a for serial communcation
or here it is my code ,,point the problem inthis code....
when i load it to proteus ,after connecting virtual terminal with PIC ,,virtual terminal is showing some curious code and always repeating..although i program for sending character only one time...here is code and schematic
or here it is my code ,,point the problem inthis code....
when i load it to proteus ,after connecting virtual terminal with PIC ,,virtual terminal is showing some curious code and always repeating..although i program for sending character only one time...here is code and schematic
Code:
list p=16f877a
#include "P16F877A.INC"
__CONFIG _LVP_OFF &_WDT_OFF &_PWRTE_OFF &_CP_OFF
STATUS EQU 0x03
PORTC EQU 07H
TRISC EQU 87H
TXSTA EQU 98h
RCSTA EQU 18H
SPBRG EQU 99H
TXREG EQU 19H
PIR1 EQU 0CH
ORG 0x00
MOVLW D'15'
MOVWF SPBRG
MOVLW B'00100100'
MOVWF TXSTA
banksel RCSTA
BSF RCSTA,SPEN
BANKSEL TRISC
BCF TRISC,6
clrw
MOVLW 'a'
here
banksel PIR1
btfss PIR1,TXIF
goto here
BANKSEL TXREG
MOVWF TXREG
END
Last edited by a moderator: