CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Somewhat limited use of F ports on 55Q43

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Woody



Joined: 11 Sep 2003
Posts: 83
Location: Warmenhuizen - NL

View user's profile Send private message

Somewhat limited use of F ports on 55Q43
PostPosted: Mon Oct 31, 2022 4:53 am     Reply with quote

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. Embarassed

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'..... Wink
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Mon Oct 31, 2022 5:15 am     Reply with quote

A caveat. Sad

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

View user's profile Send private message

PostPosted: Mon Oct 31, 2022 2:02 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Nov 01, 2022 1:54 am     Reply with quote

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 Very Happy

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

View user's profile Send private message

PostPosted: Tue Nov 01, 2022 2:24 am     Reply with quote

Well said. But also a very good warning... Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group