mmm, what happen if you do a simple test and use DEBUG instead of SEROUT. As you're using a 4MHZ clock, SEROUT may work or not.
to me the built-in USART is always a better choice so far. and @4mhz, you'll end up with a nice error % -> 0.16%
Code:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 25 ' 9600 Baud @ 4MHz, 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
The main problem is that you'll have to change a little bit your actual setup... but...
EDIT:
Code:
Data_Entrada var PORTC.1 '1
Data_Saida var PORTC.1 '1
Should they be on a different pin?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks