Hello,
I would recommend finding a different chip with more memory and the second UART peripheral. Hardware UARTs are much better.
Software UARTs are ok for transmitting data as long as you don't have any interrupts enabled in your program. For receiving data they can be used but only reliably with an interrupt (INT/IOC) to monitor for the start bit falling edge and again this has to be the only interrupt enabled in the program. The reason for no (other) interrupts is that if you interrupt while actively receiving or transmitting a byte then the byte will become corrupted.
Here are all the current PIC8 devices that have 2 or more UARTs.
16F1946:2, 16F1947:2, 16LF1946:2, 16LF1947:2, 18F23K22:2, 18F24J11:2, 18F24J50:2, 18F24K22:2, 18F24K42:2, 18F25J11:2, 18F25J50:2, 18F25K22:2, 18F25K42:2, 18F25K80:2, 18F26J11:2, 18F26J13:2, 18F26J50:2, 18F26J53:2, 18F26K22:2, 18F26K40:2, 18F26K42:2, 18F26K80:2, 18F27J13:2, 18F27J53:2, 18F27K40:2, 18F27K42:2, 18F43K22:2, 18F44J11:2, 18F44J50:2, 18F44K22:2, 18F45J11:2, 18F45J50:2, 18F45K22:2, 18F45K40:2, 18F45K42:2, 18F45K80:2, 18F46J11:2, 18F46J13:2, 18F46J50:2, 18F46J53:2, 18F46K22:2, 18F46K40:2, 18F46K42:2, 18F46K80:2, 18F47J13:2, 18F47J53:2, 18F47K40:2, 18F47K42:2, 18F6310:2, 18F6390:2, 18F6410:2, 18F6490:2, 18F6520:2, 18F6527:2, 18F65J10:2, 18F65J15:2, 18F65J50:2, 18F65K22:2, 18F65K80:2, 18F6620:2, 18F6622:2, 18F6627:2, 18F66J10:2, 18F66J11:2, 18F66J15:2, 18F66J16:2, 18F66J50:2, 18F66J55:2, 18F66J90:2, 18F66J93:2, 18F66K22:2, 18F66K80:2, 18F6720:2, 18F6722:2, 18F67J10:2, 18F67J11:2, 18F67J50:2, 18F67J90:2, 18F67J93:2, 18F67K22:2, 18F8310:2, 18F8390:2, 18F8410:2, 18F8490:2, 18F8520:2, 18F8527:2, 18F85J10:2, 18F85J15:2, 18F85J50:2, 18F85K22:2, 18F8620:2, 18F8622:2, 18F8627:2, 18F86J10:2, 18F86J11:2, 18F86J15:2, 18F86J16:2, 18F86J50:2, 18F86J55:2, 18F86J60:2, 18F86J65:2, 18F86J90:2, 18F86J93:2, 18F86K22:2, 18F8720:2, 18F8722:2, 18F87J10:2, 18F87J11:2, 18F87J50:2, 18F87J60:2, 18F87J90:2, 18F87J93:2, 18F87K22:2, 18F96J60:2, 18F96J65:2, 18F97J60:2, 18LF23K22:2, 18LF24J11:2, 18LF24J50:2, 18LF24K22:2, 18LF24K42:2, 18LF25J11:2, 18LF25J50:2, 18LF25K22:2, 18LF25K42:2, 18LF25K80:2, 18LF26J11:2, 18LF26J13:2, 18LF26J50:2, 18LF26J53:2, 18LF26K22:2, 18LF26K40:2, 18LF26K42:2, 18LF26K80:2, 18LF27J13:2, 18LF27J53:2, 18LF27K40:2, 18LF27K42:2, 18LF43K22:2, 18LF44J11:2, 18LF44J50:2, 18LF44K22:2, 18LF45J11:2, 18LF45J50:2, 18LF45K22:2, 18LF45K40:2, 18LF45K42:2, 18LF45K80:2, 18LF46J11:2, 18LF46J13:2, 18LF46J50:2, 18LF46J53:2, 18LF46K22:2, 18LF46K40:2, 18LF46K42:2, 18LF46K80:2, 18LF47J13:2, 18LF47J53:2, 18LF47K40:2, 18LF47K42:2, 18LF6310:2, 18LF6390:2, 18LF6410:2, 18LF6490:2, 18LF6520:2, 18LF6527:2, 18LF65K80:2, 18LF6620:2, 18LF6622:2, 18LF6627:2, 18LF66K80:2, 18LF6720:2, 18LF6722:2, 18LF8310:2, 18LF8390:2, 18LF8410:2, 18LF8490:2, 18LF8520:2, 18LF8527:2, 18LF8620:2, 18LF8622:2, 18LF8627:2, 18LF8720:2, 18LF8722:2
Hang on, the 47K40 is in this list as having 2 UARTs? And it has the exact same amount of ROM as the 47J13?
Just spotted that the 47K40 is missing the second RXINT interrupt. I'll get this fixed and post the updated file.
- PIC.zip
- (55.02 KiB) Downloaded 461 times