View previous topic :: View next topic |
Author |
Message |
RVaughn13
Joined: 09 Feb 2006 Posts: 13 Location: Santa Fe, Texas
|
Multiple Hardware UART Enable/Disable Question |
Posted: Tue Aug 27, 2013 12:09 pm |
|
|
Hi Everyone,
For extra programming room, I am in the process of migrating from a PIC16F1939 to a PIC18F46K22. This application is battery powered, and I must disable the UART to reduce the "sleeping" current draw. The PIC18F46K22 has two hardware UART's (the PIC16F1939 has one). When using the PIC16F1939, I used the command "setup_uart(FALSE)" to disable the UART. The PIC18F46K22 has two UARTs and I get an "undefined identifier" when using the "setup_uart(FALSE)" command. I have searched and can't find a command similar to "setup_uart1(FALSE)" since the device has more than one UART. Can someone help me out with the proper command to disable/enable a UART in devices with multiple hardware UARTs?
I have searched threads in this forum and the latest compiler manual, but could not find any information on this. It's certainly possible that I have overlooked it!!
thanks in advance,
Rick _________________ --Rick |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19498
|
|
Posted: Tue Aug 27, 2013 12:15 pm |
|
|
You need to setup the two RS232's with different stream names, then
setup_uart(FALSE,STREAM1);
disables the UART used by STREAM1 etc...
Best Wishes |
|
|
RVaughn13
Joined: 09 Feb 2006 Posts: 13 Location: Santa Fe, Texas
|
|
Posted: Tue Aug 27, 2013 12:22 pm |
|
|
Great! Thanks for the quick reply!
Rick _________________ --Rick |
|
|
|