Page 1 of 1

PIC32MX695F512H Port B question

PostPosted: Tue Jul 22, 2014 5:46 am
by CaptFrito
I have Port B0 through B5 allocated as digital outputs, B6-7 dedicated to ICSP (aka PGEC2/PGED2). RB8,11,12 are also set as digital outputs.

Every pin except B0 is acting correctly. When configured as an output B0 stays low. If I configure it as an input I can pull it high (with its dresigned load too) using a 10K resistor with no issue.

Is there some configuration that might hold B0 low? I wrote a test routine that cycles every port B pin I am using (and some port G pins too) at a 20Hz rate at the head of my code and made sure nothing else was grabbing this pin. Everything works fine except the stbborn Port B0 pin.

At the risk of being called out over something stupid, I am just not seeing where this could go wrong... Anyone able to set me straight?

Re: PIC32MX695F512H Port B question

PostPosted: Tue Jul 22, 2014 1:27 pm
by Tom Maier
Are you running in debug mode? If so, the debugger code owns RB0, because that is also PGED1.

Re: PIC32MX695F512H Port B question

PostPosted: Tue Jul 22, 2014 1:54 pm
by Tom Maier
Wait a second here... if you moved the ICSP then the debug should have moved also...

It might be that there is either a bug in the debug code that it still has control of the data pin. Try running some test code with debug off and toggle RB0 to see what happens.

The other guess would be that you have a partially blown pin. Does this happen on more than one board?

Re: PIC32MX695F512H Port B question

PostPosted: Mon Jul 28, 2014 4:23 am
by CaptFrito
Hi Sorry I expected an email ping on any replies... But: I thought about the partially blown pin, but as I thought more about this, it would be exceptionally unusual since it unquestionably works as an input and I can drive it as such from other output pins (no adverse loading).

I have only built one board so far, it's a prototype and I have small run SMT mfg equip on hand. I'll try running with debug off, something's keeping this pin from doing what I want. In the end I will probably not use this pin, I don't really have to, but I don't want to deal with a pin that gets hijacked by the debugging process.

And ICSD is definitely moved and fully functional on the altertnate pins. I usually dedicate these unless I am totally out of options.

Re: PIC32MX695F512H Port B question

PostPosted: Mon Jul 28, 2014 4:27 am
by ric
CaptFrito wrote:Hi Sorry I expected an email ping on any replies...
....

Check if you have that enabled.
User Control Panel, Board preferences, Edit posting defaults.
Quick link: ucp.php?i=prefs&mode=post

Make sure "Notify me upon replies by default:" is set to "Yes".