Searching \ for '[PIC]. CCS/16F876 Serial port auto disabling' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: '. CCS/16F876 Serial port auto disabling'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]. CCS/16F876 Serial port auto disabling'
2002\10\14@072958 by James Winter

Hiya folks,

Right - here's an interesting one. I have a 18f876 running some code, compiled using CCS C.

I am reading data in from a serial stream at 19200 baud - the system works great most of the time.

However, occasionally the usart will stop interrupting me!

This is what I've done. (I can't use the serial port to debug itself as it is on a RS485 protocol type bus)

- mirrored the data coming in from the Rx pin onto another pin (so the tris values haven't changed)
- used a pin to indicate that I am in the timer irq, and it's still running - timer OK.
- used a pin to indicate that I am in the serial ISR (the pin wiggles for a bit to indicate that I am running, and then stops in the 'out' of irq state)
- used a pin to indicate the state of the PIE, and the serial interrupt enable (both are still enabled)

The rest of the code is running fine, I have a diagnostics led in the main loop, and it's flashing away quite happily indicating that all is well, it just won't get any serial interrupts.

I'm running out of ideas now, especially as I have even put a cleanup 'reboot me' routine in the timer interrupt, so that if it hasn't had a new character in from the usart in a couple of seconds it reboots. HOWEVER - a software reboot does not sort the problem out, the usart is still not working on the reboot! (A hardware reboot using MCLR or even the watchdog timer does work however!)

Any ideas.... anyone??? (I'm tearing my hair out on this one!). Even starting to think of rom/ram page boundary problems and stuff like that now!



-- hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2002\10\14@075947 by Michael Rigby-Jones

{Quote hidden}

You don't mention if you are checking the overrun bit (OERR).  You must
clear this bit (by clearing and resetting CREN) if you get an overrun or no
more bytes will be recieved.



-- hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...