I have a Pic with mappable pins. Really cool concept in my opinion. I can imagine how useful this might be to be able to change the function of a pin with code.
I have a couple of questions.
Why do I need to unlock the configuration of these pins before I can configure their function? Why can't I just write to the control register just like any other control register? I would think that if your code is properly written the configuration won't accidentally be changed.
To configure outputs, you write the function code to a control register. There is one control register for every mappable pin.
But to configure inputs. there is one control register for every function. You write the number of the pin to the configuration register.
Why on earth would you configure the function of the pin so differently between input and output?
I have a couple of questions.
Why do I need to unlock the configuration of these pins before I can configure their function? Why can't I just write to the control register just like any other control register? I would think that if your code is properly written the configuration won't accidentally be changed.
To configure outputs, you write the function code to a control register. There is one control register for every mappable pin.
But to configure inputs. there is one control register for every function. You write the number of the pin to the configuration register.
Why on earth would you configure the function of the pin so differently between input and output?