PDA

View Full Version : Problem using Microloader and Uart Comm at the same time



guanerrr
- 3rd August 2007, 09:31
I have problem using hserout using portc.6 and portc.7 (PIC16F877A) and at the same time I load my program using microcode loader. Can I use the same circuit for microcode loader and at the same time I use the circuit for serial communication to PC using hyperterminal. So far I don't receive any output at the hyperterminal screen or my code is wrong. For your infos, below is my serial communication source code using uart communication

DEFINE LOADER_USED 1
DEFINE HSER_BAUD 2400
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_SPBRG 25
DEFINE OSC 4 ' 4MHZ

MAIN:
HSEROUT [DEC 120, 13, 10]


LOOP:
GOTO LOOP
END

This program should display character "X" at the hyperterminal. Is there any problem with the source code or I cannot use the same circuit for serial comm using microcode loader circuit. For your info, my setting is 2400,8,N,1. TQ