Page 1 of 1

Question about 5V tolerant pins.

Posted: Mon Jun 16, 2014 3:47 pm
by SkG
Hi,

I'm using a ultrasonic sensor that gives back a 5V pulse. In other micro controllers that don't allow 5V I use a 1k resistor so I went to the Pyboard schematics and I found this: "All pins are 5V tolerant except PA4 & PA5" (and those are X5 and X6).

So as far as I understand there is no need of resistor in I dont use PA4-X5/PA5-X6, sure?

Regards.

Re: Question about 5V tolerant pins.

Posted: Mon Jun 16, 2014 5:47 pm
by dhylands
That's my understanding.

Page 45 thru 57 of the datasheet has a table with all of the pins.

The IO structure column has FT for the 5v tolerant pins.

Note that FT pins are NOT 5v tolerant when in analog mode, only when in a digital mode (Note 4 on page 57)

Re: Question about 5V tolerant pins.

Posted: Sat Jun 21, 2014 9:29 am
by Mr.Nordheim
Anyone tested? Does one of the adc tolerate 5v?

Re: Question about 5V tolerant pins.

Posted: Mon Jun 23, 2014 1:13 am
by dhylands
Mr.Nordheim wrote:Anyone tested? Does one of the adc tolerate 5v?
The docs are quite clear that the ADCs only work from 0v to 3.3v.

You'll either need to use a resistor divider network, like this:
http://en.wikipedia.org/wiki/Voltage_divider
Vin would be your 0 to 5V signal.
Vout would be the scaled signal (0 to 3.3v)

Using Z1 = 47K and Z2 = 91K seem like reasonable values.

The resistor divider only works with some types of analog signals. For others you may need to use an op-amp instead.
Something like this: http://www.daycounter.com/Circuits/OpAm ... fter.phtml
Disclaimer: I haven't actually tested the above opamp circuit.

Re: Question about 5V tolerant pins.

Posted: Wed Jun 25, 2014 10:10 am
by chrismas9
Pins X9 & X10 are probably not 5V tolerant. They are connected to the on board accelerometer. The MMA7660 datasheet does not have an absolute maximum voltage spec for IO pins, only supply pins, but it is unlikely to be 5V tolerant.

Re: Question about 5V tolerant pins.

Posted: Wed Jun 25, 2014 1:04 pm
by JonHylands
chrismas9 wrote:Pins X9 & X10 are probably not 5V tolerant. They are connected to the on board accelerometer. The MMA7660 datasheet does not have an absolute maximum voltage spec for IO pins, only supply pins, but it is unlikely to be 5V tolerant.
Actually, the MMA7660 datasheet has a table on page 7 (Table 2. Maximum Ratings) that lists those values, and the max is 3.6 volts.

- Jon