To run at 3.3 volt, yup you'll need a 3.3v voltage regulator. Now double check your specific datasheet to know if the PIC can run @3.3 volt without problem, case not, you may need to use a sort of level shifter between your PIC running @5volt and the Xport running @3.3v.
USART is just another built-in PIC feature, listed in the datasheet. You will need to use HSERIN/HSEROUT + some DEFINEs all listed in the PBP manual.
with 4MHz you can run the internal USART to have a really decent/accurate 9600 bauds.
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
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks