Forums

Unexpected PIC32 behavior

Started by Randy Day April 10, 2014
I'm trying out the SPI module on a PIC32MX150, 
and I've encountered something I wasn't expecting.

The pin selection / module enabling stuff is done, 
and I get i/o, but the Slave Select pin only goes 
0-1.2v, rather than 0-3.3v like the clock and data 
pins. I tried a 10k pullup resistor, it stayed at 
0-1.2.

Nothing is attached to the pins except the 
oscilloscope. I've hooked up two different chips, 
and both do this. 

Is this normal? 

I've explicitly turned off the A/D, pullups/downs,
and every peripheral I can think of (although I 
certainly could have missed one).

Has anyone seen this in their travels? 
On 4/10/2014 6:08 PM, Randy Day wrote:
> I'm trying out the SPI module on a PIC32MX150, > and I've encountered something I wasn't expecting. > > The pin selection / module enabling stuff is done, > and I get i/o, but the Slave Select pin only goes > 0-1.2v, rather than 0-3.3v like the clock and data > pins. I tried a 10k pullup resistor, it stayed at > 0-1.2. > > Nothing is attached to the pins except the > oscilloscope. I've hooked up two different chips, > and both do this. > > Is this normal? > > I've explicitly turned off the A/D, pullups/downs, > and every peripheral I can think of (although I > certainly could have missed one). > > Has anyone seen this in their travels? >
Does the chip get hot when SS is at 1.2V? Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On Thu, 10 Apr 2014 16:08:11 -0600, Randy Day <randy.day@sasktel.netx>
wrote:

>I'm trying out the SPI module on a PIC32MX150, >and I've encountered something I wasn't expecting. > >The pin selection / module enabling stuff is done, >and I get i/o, but the Slave Select pin only goes >0-1.2v, rather than 0-3.3v like the clock and data >pins. I tried a 10k pullup resistor, it stayed at >0-1.2. > >Nothing is attached to the pins except the >oscilloscope. I've hooked up two different chips, >and both do this. > >Is this normal? > >I've explicitly turned off the A/D, pullups/downs, >and every peripheral I can think of (although I >certainly could have missed one). > >Has anyone seen this in their travels?
Check your CONFIG bits, that is usually where most problems arise with the shared I/O pins. Cheers
> > Has anyone seen this in their travels? > > > > Does the chip get hot when SS is at 1.2V?
Warm. I just found out if I comment out the SPI init code, the circuit current drops by 60ma! Here I thought my display was pulling all that current... I put a pullup resistor on the (now input) pin, and it reads near vdd, like it should. I can declare it an output, and get proper vss/vdd by setting it hi/lo, so it's not a short on the pin. Now I'm suspicious of the Slave Select pin remapping - and not at all sure what to change. <dives back into the docs>
On Thu, 10 Apr 2014 21:58:34 -0700, Randy Day <randy.day@sasktel.netx>  
wrote:

>> ...snip.... > > Now I'm suspicious of the Slave Select pin > remapping - and not at all sure what to > change. > > <dives back into the docs>
You may not want to hear this, but don't always assume YOU'VE done something wrong. Years ago, I once had my software department spend six weeks out of a tight schedule to chase down a weird effect only to find that the manufacturer's [remain nameless, since they've cleaned up their act] FPGA's moftware did NOT do what it said it did. In other words, the simulations were NOT converted properly into programming the hardware!! Needless to say, at the time we went with a different manufacturer, problem solved.
In article <op.xd5qtvfg2cx0wh@ajm>, robert.a.macy@gmail.com says...

[snip]

> You may not want to hear this, but don't always assume YOU'VE done > something wrong. Years ago, I once had my software department spend six > weeks out of a tight schedule to chase down a weird effect only to find > that the manufacturer's [remain nameless, since they've cleaned up their > act] FPGA's moftware did NOT do what it said it did. In other words, the > simulations were NOT converted properly into programming the hardware!! > Needless to say, at the time we went with a different manufacturer, > problem solved.
That's certainly a possibility. I may have to check out Microchip's errata on the '150 to see if there's a known issue. Ain't learning curves fun?
On Thu, 10 Apr 2014 16:08:11 -0600, Randy Day wrote:

> I'm trying out the SPI module on a PIC32MX150, and I've encountered > something I wasn't expecting. > > The pin selection / module enabling stuff is done, > and I get i/o, but the Slave Select pin only goes 0-1.2v, rather than > 0-3.3v like the clock and data pins. I tried a 10k pullup resistor, it > stayed at 0-1.2. > > Nothing is attached to the pins except the oscilloscope. I've hooked up > two different chips, and both do this. > > Is this normal? > > I've explicitly turned off the A/D, pullups/downs, > and every peripheral I can think of (although I certainly could have > missed one). > > Has anyone seen this in their travels?
Have you verified that you don't have a short to another pin? Getting 1.2V on a wire when the logic is powered by 3.3V sounds a lot like two output pins having an argument about whether that wire should be a 1 or a 0. 1.2V isn't exactly 3.3V/2, but pull-downs tend to be stronger than pull- ups, and the two pins may not be on the same chip anyway. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Thu, 10 Apr 2014 16:08:11 -0600, Randy Day <randy.day@sasktel.netx>
wrote:

>I'm trying out the SPI module on a PIC32MX150, >and I've encountered something I wasn't expecting. > >The pin selection / module enabling stuff is done, >and I get i/o, but the Slave Select pin only goes >0-1.2v, rather than 0-3.3v like the clock and data >pins. I tried a 10k pullup resistor, it stayed at >0-1.2. > >Nothing is attached to the pins except the >oscilloscope. I've hooked up two different chips, >and both do this. > >Is this normal? > >I've explicitly turned off the A/D, pullups/downs, >and every peripheral I can think of (although I >certainly could have missed one). > >Has anyone seen this in their travels?
You have not given the whole part number, and I'm not going to plod through more than one errata, but this might be relevant:- http://www.microchip.com/forums/tm.aspx?m=697846 Voh of 1V sure sounds like some kind of internal contention. --sp
On Fri, 11 Apr 2014 08:04:32 -0700, RobertMacy
<robert.a.macy@gmail.com> wrote:

>On Thu, 10 Apr 2014 21:58:34 -0700, Randy Day <randy.day@sasktel.netx> >wrote: > >>> ...snip.... >> >> Now I'm suspicious of the Slave Select pin >> remapping - and not at all sure what to >> change. >> >> <dives back into the docs> > >You may not want to hear this, but don't always assume YOU'VE done >something wrong. Years ago, I once had my software department spend six >weeks out of a tight schedule to chase down a weird effect only to find >that the manufacturer's [remain nameless, since they've cleaned up their >act] FPGA's moftware did NOT do what it said it did. In other words, the >simulations were NOT converted properly into programming the hardware!! >Needless to say, at the time we went with a different manufacturer, >problem solved.
That was the norm about 15 years ago. I had the boss buy a Synplicity-Pro seat to get even simple designs to synthesize into something that worked. At the time, Synplicity-Pro was something like $25K for the license, plus $5K per year. The good part was that it made the justification for the $4K laptop easier. Of course, I had to buy two so I always had a backup, which I let the boss use. ;-)
In article <RIydnfO34MuVhNXOnZ2dnUVZ5jCdnZ2d@giganews.com>, 
tim@seemywebsite.really says...

[snip]

> Have you verified that you don't have a short to another pin? Getting > 1.2V on a wire when the logic is powered by 3.3V sounds a lot like two > output pins having an argument about whether that wire should be a 1 or a > 0.
I've checked continuity between adjacent pins and traces - nada.
> 1.2V isn't exactly 3.3V/2, but pull-downs tend to be stronger than pull- > ups, and the two pins may not be on the same chip anyway.
I disabled the spi, and made it a gpio. set high=3.3v, low=0v. The spi pins are currently not connected; they go to to an off-board connector.