I have found that saving money on hardware is the most expensive thing you can do. I use 18F8723's for some pretty mundane tasks, simply because by using that part, I don't have to worry about codespace, or speed, or what peripherals it doesn't have, and then spend time working around the limitations.
It can be rewarding to build a complete system with a device that has only has 2K of FLASH, but very few outside of this group will recognize your brilliance. I would just use both serial ports of a second 8722 and be done with it.
That said, I have recently become a fan of I2C, now that I have a good interrupt-driven slave working. I2C is handy because it doesn't generate an interrupt if the address doesn't match. It is also fast ~200Kbaud.
For device-device transfers using a port, you can use a method that I once used:
Connect two ports together, use one more line as a "ACK" line and two more to connect to each other's PORTB.0. When one device wants to speak
to the other, he checks the ACK line for a "high" (bus empty), places the data on the port, and toggles the interrupt (of the other device). The other device's ISR pulls the ACK line low, grabs the data, and then lets the ACK line go high (it is driven open-collector, and has a pullup). Whenever a device isn't sending data, its port is tri-stated. You can even use a couple more lines to indicate the type of data being transferred. It is a little messy, but it does work. I used it when I had an application similar to yours - that needed 4 UARTS, so I "lashed together" two 8723's.
Bookmarks