View previous topic :: View next topic |
Author |
Message |
mhz1575
Joined: 20 Jun 2008 Posts: 14
|
Secondary uart on pic 18F46k80 |
Posted: Tue Jan 14, 2014 1:30 am |
|
|
Hello folks
I hope that this messages will be not a copy of an existing post but I do not discover nothing with the search tool.
I'm looking for an example on the pic in object that show me how to configure and use the two uarts. I mean how to switch from 1 to 2 example to send a easy printf.
Thank you in advance
mm |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Tue Jan 14, 2014 2:15 am |
|
|
Look at EX_XTEA.c, which shows how to read data from one port, and send it on another.
Key point is the use of fprintf/fputc/fgetc, and stream identifiers.
In your case it is simpler than on many chips, since the pins are fixed (the threads covering this, often deal with chips with UART's that can be 'relocated' to different pins), so there is the added complexity of using SELECT to locate the UART before using it..
A search here on 'streams', will find a lot of threads about this.
Best Wishes |
|
|
mhz1575
Joined: 20 Jun 2008 Posts: 14
|
|
Posted: Thu Jan 16, 2014 1:42 pm |
|
|
Hi Ttelmah
Thank you for your informations, now it's clear.
Best regards |
|
|
|