• AVR Freaks

Helpful ReplyHot!Powering and connection suggestions for MCP23S17 device

Author
Eusuvi
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2020/05/27 01:29:31
  • Location: 0
  • Status: offline
2020/06/02 03:55:21 (permalink)
0

Powering and connection suggestions for MCP23S17 device

I would like to connect various MCP23S17 devices to the Raspberry Pi3 MB SPI port. But first I would like to start making some test with a single connection: only one chip. I have some questions:
 
1.- Regardless electrical char:
  • About inputs, Is 20mA the max current that one input GPIOn pin can drive as said at datasheet or is it refered to SPI and power inputs? Datasheet says: "Input clamp current, IIK...20mA"?
  • About outputs there are two instructions: " output current sourced by any output pin.. 25mA" and "output clamp current, IOK...20mA". What is the difference between 2 both expressions? If 20mA is a damaging value how is it possible that they could give until 25mA? So what are typical working values for their GPIOs inputs and outputs?
2.- Regardless powering, some ideas I have found googling:
 
I have seen that several people suggests to connect SPI Rasp port pins to the expanser SPI port pins directly, without any Rs. They also has powered the chip by connecting Vdd = 3.3V Raspberry pin to the MCP23S17 and Raspb ground pin to the microchip device one like this: (see the pict)
 
  • Is it a good idea?
  • If it does, would it be correct for powering more than one device (x8 or even more) knowing that only one would be active at once at final design?
  • If it doesn't I was thinking to bring VDD from a source supply and connecting a capacitor between VDD and GND, close to the VDD pin. But I don't really know how to know the C value. I have seen examples from 0.1uF (100nF)
3.- About external resistor for pull up/down & current limitation:
 
I have another question GPIOs configured as inputs. I will only use them for being at high/low level. At my first tests I will be playing to read inputs values (some ones with '1' level) and then writing outputs connected to LED depending on inputs values. But after this, I would like having an application that some times will be configured as inputs some times, but they could also be configured as output. For doing this and save hw dis/connections with external resistors I thought about enable internal Rpull up. But if I would like to use Rpull up smaller than 100k or even connecting Rpull down, instead of pull up:
  • What could be a good way for the same pin to be connected and disconnected from this external Rpull up? in order to changing the pin direction at any moment.
  • Would you use any type of switches here? How would you do in this case?
4.- About open drain configuration for GPIO = outputs:
 
The other theme I would like to deal with is the one about the outputs configuration. I have read at datasheet that INTA and INTB could be configured for being open-drain. Does it also apply to any of GPIO being configured as output pins? I have found an application notes in which it's said that outputs could emulate this open-drain feature. So now, I don't know if it does or not. The register explanation found specifies: "INTA and INTB" outputs.
  • I guess this is the actual pins that can been configured with open drain, is it?
Thanks in advance for your attention.
Any information will help.
post edited by Eusuvi - 2020/06/04 00:39:56

Attached Image(s)

#1
ric
Super Member
  • Total Posts : 28324
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Is any powering suggestion for MCP23S17 device? 2020/06/02 13:27:23 (permalink) ☄ Helpfulby Eusuvi 2020/06/03 02:25:31
+1 (1)

Is 20mA the max current that one input GPIOn pin can drive as said at datasheet: "Input clamp current, IIK...20mA"?
Regardless electrical char:
"output clamp current, IOK...20mA"

    What about this another output specification given by datasheet: "Maximum output current sourced by any output pin.. 25mA"



No.

They are "Absolute maximum ratings". It is your job to make sure your design does not get anywhere near those figures.

The possible output current that still generates legal logic voltages is much lower.





I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#2
ric
Super Member
  • Total Posts : 28324
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Is any powering suggestion for MCP23S17 device? 2020/06/02 13:28:26 (permalink) ☄ Helpfulby Eusuvi 2020/06/03 02:25:27
+1 (1)
You can't drag and drop images into posts.
Here is your image after running through a "base64 to image" converter.
 

Attached Image(s)


I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#3
Eusuvi
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2020/05/27 01:29:31
  • Location: 0
  • Status: offline
Re: Is any powering suggestion for MCP23S17 device? 2020/06/03 02:09:45 (permalink)
0
Thanks Ric for your answer. I load the image.
 
I had problems for loading the post yesterday and I coppied to many times the whole text without loading the file, making several tryings.
 
ric

No.

They are "Absolute maximum ratings". It is your job to make sure your design does not get anywhere near those figures.

The possible output current that still generates legal logic voltages is much lower.




 
 
 
Which one is that typical value? If I will limit this current with resistors I need to know what could be the minimum current that inputs and outputs could drive for working propperly. But this information is not at datasheet. 
#4
ric
Super Member
  • Total Posts : 28324
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Is any powering suggestion for MCP23S17 device? 2020/06/03 02:18:10 (permalink) ☄ Helpfulby Eusuvi 2020/06/03 02:25:19
+3 (3)
Page 4 of the datasheet
http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf#page=4
If the supply voltage is 4.5V (or more) GPIO pins can:
drive high with 3 mA
and low with 8 mA
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#5
Jump to:
© 2020 APG vNext Commercial Version 4.5