Quick question about pps as in your example above...
I see where you are setting the RX and TX on the uart to pins RB5 and RB7. That seems to make sense. However on setting the SDA and SCL you use two different commands for each. Could you be so kind as to explain why the first two commands don't do the whole job?
Just trying to learn. The PPS thing is pretty cool on the newer pics, but this would have been a gotcha for me. I probably would have only done the first two and wondered why this didn't work.
Any help is greatly appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
And in that other post, befor I saw Evans request, I wrote:
That is becouse the SDA and SCL pins are bidirectional, well the SDA always is and the SCL if the PIC is a Slave Vs Master, but it costs nothing to always define both pins as both Input and Output.
To see a realy clever use of PPS look at C:\GCB@Syn\GreatCowBasic\Demos\Vendor Boards\Xpress Evaluation Board\11 Using PWM to control LED brightness.gcb
it contains:
In another post Evan showed some code to set the PPS for HI2C...
Quick question about pps as in your example above...
I see where you are setting the RX and TX on the uart to pins RB5 and RB7. That seems to make sense. However on setting the SDA and SCL you use two different commands for each. Could you be so kind as to explain why the first two commands don't do the whole job?
Why is this also needed?
Just trying to learn. The PPS thing is pretty cool on the newer pics, but this would have been a gotcha for me. I probably would have only done the first two and wondered why this didn't work.
Any help is greatly appreciated.
And in that other post, befor I saw Evans request, I wrote:
That is becouse the SDA and SCL pins are bidirectional, well the SDA always is and the SCL if the PIC is a Slave Vs Master, but it costs nothing to always define both pins as both Input and Output.
To see a realy clever use of PPS look at C:\GCB@Syn\GreatCowBasic\Demos\Vendor Boards\Xpress Evaluation Board\11 Using PWM to control LED brightness.gcb
it contains:
Which allows one PWM output to drive all 4 LED's simultaniously.
Cheers
Chris