MCP2308 IO Exp. question
KC8DKT
Posts: 76
· Anyone know Y the·GPIO craps out after about 2hrs?· I can set the same settings with the·OLat and IODir and it works every time for days on·end.·· No big deal but not knowing is killing me...
Comments
2) What do you have it connected to and how? Maybe you're stressing the chip with too high a voltage or current or some such and it's limping along for a while and then just stops working.
Communicate with us humans on our level and help us to help you. Provide your setup configuration such as hardware etc. Is the chip on a pcb or on a bit of scrap matrix board a foot away from the main board? A photo may help. Do you have a decoupling cap across the chip? What loads are your switching, are they leds or are they motors? Does the ground for the load go through the ground for the I/O?
Create an alternate buddy personality in yourself that may think of some questions to ask you.
In the meantime I'll keep trying to get through to read your mind (sure).
*Peter*
What is a "decoupling cap across the chip" about?
I use the mcp to switch ports on a MultiPlex.
1 pin on the mcp is LOW at all times and is used to charge a cap. I use the v+ output portA on the plex to charge the cap.
Then the MultiPlex uses Pins0-3 to switch the ports on the plex.
After about 2hrs or less it stops working "MCP ports are no longer going Hi/Lo. they all get stuck in the high-z/input mode. READing the GPIO does not work at this point as well.
If I rem all the GPIO commands and just use the OLat and IODir it will run for days with Np.
Pulling the reset low on the mcp or powering down the board does NOT fix this problem. After I use the OLat/IODir for about 30min I can switch the code back to the GPIO commands and poof, all is working again.
I plan to just stick with the OLat/IODir but its just one of them thing thats driving me buggy not knowing why.
Sry about the english and be genital, still a noob
Proto's look neat and they seem to match the PC case! I just have a little trouble identifying the chips though, maybe a circuit would help. The decoupling capacitor is usually a small cap of around 0.1uf that is placed across the power and ground of a chip to provide that extra "transient" current when it switches. Without a decoup the chip could end up with enough noise on the supply to cause it to glitch. But this doesn't solve everything as you could have ground bounce where the chip ground is raised significantly above the real ground.
Is that the prop generating that video display? It sure looks great if it is. Mind sharing the code?
*Peter*
· What I do not get is why
i2c.WriteLocation(%0100_0000, GPIO, %0001_1101, 8, 8)
i2c.WriteLocation(%0100_0000, GPIO, value[noparse][[/noparse]2], 8, 8)
·
· Just stops working out of the blue.· All MCP8 pins go to InPut/Highz mode and get stuck there.· Stuck as in the GPIO command will no longer work.··· Power off,· hitting the reset pin does not fix it.·· The chip will just no longer let me change the pin states with the GPIO reg but the OLat reg will still work.···
i2c.WriteLocation(%0100_0000, IOdir, %0000_0000, 8, 8)
i2c.WriteLocation(%0100_0000, latch, %0001_1101, 8, 8)
i2c.WriteLocation(%0100_0000, latch, value[noparse][[/noparse]2], 8, 8)
· After about 30min I can go back to the GPIO reg code and it will be working again.· The OLatch works for months on end "the proto setup was up for a little over 3months with out a reboot or powerdown on the OLat code".· Same hardware and all but 3 lines is the same code.
· I did test reading the GPIO reg before updating as well with no luck.· Had an older chip that need this done or it would lockup some times.·· I plan to stick with the OLatch but would just like to know what is up with the GPIO going out.·· If I have a problem I would like to find it before I start the pcbs.·· I just can't stop thinking this is the start of a bigger problem.
Post Edited (KC8DKT) : 4/26/2007 4:56:37 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.