Shop OBEX P1 Docs P2 Docs Learn Events
MCP2308 IO Exp. question — Parallax Forums

MCP2308 IO Exp. question

KC8DKTKC8DKT Posts: 76
edited 2007-04-26 17:24 in Propeller 1
· 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

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-25 18:02
    1) What do you mean by "craps out". I get this very strange literal image from the phrase and it's not pretty. I don't think you mean that.

    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.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-04-25 22:35
    KC, I have my fingers extended from both hands, lightly pressing into my temple. With a concentrated look in my eyes and frowning hard I am still unable to read your mind (although I can and do visualize "craps out" shocked.gif ).

    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*
  • KC8DKTKC8DKT Posts: 76
    edited 2007-04-26 06:24
    rofl, was not sure what info I could give that would help.

    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
  • KC8DKTKC8DKT Posts: 76
    edited 2007-04-26 06:35
    The 2 cards are on a proto board for now.· They will be mounted on a card when testing is done and I get the Pelt/Fan controler board done.
    1024 x 768 - 229K
    2560 x 1920 - 1M
    2560 x 1920 - 1M
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-04-26 13:14
    KC,
    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*
  • KC8DKTKC8DKT Posts: 76
    edited 2007-04-26 15:17
    · Yes it is the Prop,· and yes I can zip and upload the code but this is my first prop so the code sucks.· I love this LCD with the touch screen interface to the prop.·· With the prop I can get the full 230400kbs baud rate of the lcd.· Man did that make a diff in the graph update speed over the bs2px.

    · 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.
  • KC8DKTKC8DKT Posts: 76
    edited 2007-04-26 15:21
    O ya, if you look at the board in the front you can see the 3.3v reg and the 2 "0.1 and a 1500uf" caps. The MAXIM chip is the MultiPlex and to the right at the top is the mcp8. I will try to export my layouts to bmps and upload if you think its a hardware problem.

    Post Edited (KC8DKT) : 4/26/2007 4:56:37 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-04-26 17:24
    Bypass caps are different than supply caps. Supply caps are local to the supply, bypass caps are additional caps placed right next to chips to provide a local transient supply. All wire has inductance, inductance resists changes in current by sacrificing voltage, hence increases in current will dip the voltage local to the chip. With a bypass cap (which has the effect of trying to keep a constant voltage), the voltage is stabilized by temporarily depleting it's charge to counteract the effect of the inductance in the wire carrying power.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.