problem to interface MCP23017(4 nos.) with PIC16F1527

Discussion in 'The Projects Forum' started by mthakor, Jul 17, 2013.

  1. mthakor

    Thread Starter New Member

    Jul 17, 2013
    1
    0
    Hi Friends,
    we are interfacing MCP23017(4 nos.) with PIC16F1527.
    Our target is scanning 64 keys with 4 port expander.
    I have disable the intrrupts.
    But when test push buttons continuously pressing on & off with 20 ms delay.
    But after some time my MCU goes hanged.
    Is anyone can suggest what i will try to overcome this problem.?
    Thanks.
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    I suggest you post a schematic, and your code.
    The most likely reason for a PIC (or any Harvard Architecture) machine to hang is waiting on a single condition that will never happen. In defensive programming you always need to test multiple conditions to exit from a loop.
     
Loading...