View previous topic :: View next topic |
Author |
Message |
Woody
Joined: 11 Sep 2003 Posts: 83 Location: Warmenhuizen - NL
|
Somewhat limited use of F ports on 55Q43 |
Posted: Mon Oct 31, 2022 4:53 am |
|
|
In the LoRa prototype I'm working I want to use as little power as possible, so I sleep the MCU most of the time, only to wake it up on a power event or an external timer event. These interrupts I attached to INT1 and INT2 and they work fine. For some future possibilities I provided a couple of switch type inputs (high when open, low when closed) that I assigned to port F4, F5 and F6 with the idea that I could set the IOC function (when needed) on whatever port.
That turns out to be not the case: you can use a lot of ports for IOC, but not ports D and F.
As there are no flies on me I thought, hmmm, let me use the CLC functionality for this then. I can easily make a CLC produce an interrupt when its input goes low and I can PPS an input to the CLC, so no problem. Even better, for now I can give each input its own interrupt where with IOC I have to figure them out myself.
Only it turns out that I cannot PPS inputs on port F to CLC inputs. So now it is back to the soldering iron (and microscope) to reroute a physical input to the MCU.
Reading the DS I see that functionality like PPS and IOC is widely available on ports A, B and C and more limited for ports D and F. So a lesson I get from this is to try to limit those ports to 'simple' outputs like leds or relays. And read the DS better so I 'know' instead of 'think'..... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Mon Oct 31, 2022 5:15 am |
|
|
A caveat.
Yes, it is interesting. There are three versions of pin select. Type 1, was the
APFCON version, with pins only selectable between two locations. Type 2
is generic, but with only limited ports available (it is limited by the number
of bits in the selection register, so usually 16 or 32 selections). Type 3
only exists on chips like some PIC24's, with any pin selectable pretty
much anywhere. The 'freedom' offered by PPS, is rather spoilt, when you
find the chip you are using has such restrictions....
It is a restriction on the implementation on most of the '8bit' devices.
Not noticeable on small devices (enough selections to cover all the pins),
but particularly noticeable on chips with lots of pins. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Mon Oct 31, 2022 2:02 pm |
|
|
In the good old dayze, you never worried about what type of pin select a pin on a PIC had... there weren't any choices!!! |
|
|
Woody
Joined: 11 Sep 2003 Posts: 83 Location: Warmenhuizen - NL
|
|
Posted: Tue Nov 01, 2022 1:54 am |
|
|
Yep. 950 pages of datasheet and the idea that you can fix things afterwards makes you cross-eyed and lazy and that leads to surprises. OTOH, I was saved a couple of times by CLC functionality, so I am not complaining
An advantage of modern pics IMO is that the myriad of peripherals in very small footprints means that you can solve almost anything with one type of chip. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Tue Nov 01, 2022 2:24 am |
|
|
Well said. But also a very good warning... |
|
|
|