PIC18F4XXXX Switching ESUART to different ports routine.

(instructions, reset, WDT, specifications...) PIC17Cxx, PIC18Fxxx

PIC18F4XXXX Switching ESUART to different ports routine.

Postby troyboy » Wed Jul 19, 2023 6:19 pm

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.
troyboy
 
Posts: 1
Joined: Wed Jul 19, 2023 5:36 pm
PIC experience: Professional 5+ years with MCHP products

Re: PIC18F4XXXX Switching ESUART to different ports routine.

Postby ric » Sat Jul 22, 2023 10:25 pm

It should only be a couple of instructions with PPS. Please show what you tried.
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: PIC18F4XXXX Switching ESUART to different ports routine.

Postby AussieSusan » Mon Jul 24, 2023 3:22 am

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
AussieSusan
Verified identity
 
Posts: 173
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist


Return to 16-Bit Core

Who is online

Users browsing this forum: No registered users and 58 guests