PDA

View Full Version : DT Instant Interupt with a 2nd serial port



ecoli-557
- 10th January 2012, 20:39
Hello All, I am going to try the new PBP3 with the MCSPx and try my luck using the compile ICD option so I can debug my code easier. In doing so, the project I am trying to do also uses a serial port.
The primary serial port will be used for debug on MCSPx and the 2nd serial port will be used for communication via RS485.
So, I have used DT's Instant Interupt before (nice job!) but the chip I plan on using is the 16F1527 and it has 2 EUSARTS, do I brave fiddling with the venerable code inside DT-INTS-14 to see if I can get it to look at the 2nd serial port? Or is there a better way? Clearly I would prefer another way as I don't want to disturb something that works <grin>.
I must use the 1st serial port for the debug and the 2nd serial port for the 485 communication, design already cut.
I am using PBP3, MCSP5 and DT-INTS 1.10

Happy New Year to All,
Steve

Darrel Taylor
- 10th January 2012, 23:20
Steve,

Just add this to your program ...

DEFINE TX2_INT PIR4,TX2IF, PIE4,TXIE

Then add an INT_HANDLER for TX2_INT.

Darrel Taylor
- 11th January 2012, 06:09
I guess you'd probably rather have ...



DEFINE RX2_INT PIR4,RC2IF, PIE4,RC2IE

Oops! :o