Page 1 of 1

PIC18F4XXXX Switching ESUART to different ports routine.

PostPosted: Wed Jul 19, 2023 6:19 pm
by troyboy
Does anyone have or know where I can find routines/sniplets etc. that can smoothly setup, resetup and switch UART's around to different I/O's with just a single call?
I started to create one...just a lot of work with the PPS. The MCC is great for a one shot single setup...just need a bit more. Or if there is a app note somewhere...
Thanks.

Re: PIC18F4XXXX Switching ESUART to different ports routine.

PostPosted: Sat Jul 22, 2023 10:25 pm
by ric
It should only be a couple of instructions with PPS. Please show what you tried.

Re: PIC18F4XXXX Switching ESUART to different ports routine.

PostPosted: Mon Jul 24, 2023 3:22 am
by AussieSusan
As a suggestion DON'T start with MCC generated code and try to emulate that. In general the MCC creates a lot of extra code layers as it tries to abstract away the various hardware platforms.
Instead, check the data sheet around the PPS registers (and make sure that the MCC generated code has not locked them depending on your actual MCU) and you will find that, as Ric says, it should be relatively straight forward.
Susan