Skip to main content
Visitor II
July 18, 2003
Question

Port B

  • July 18, 2003
  • 2 replies
  • 508 views
Posted on July 18, 2003 at 13:57

Port B

    This topic has been closed for replies.

    2 replies

    elsiunAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:55

    Hello Everybody

    I am trying to write debounce code for switch 1.

    Switch 1 is connected to port b pin 2 through jumper.

    The problem is that the DATAIN_B register does not chang its value after I press switch 1 (Port B2 pin configured as GP I/O mode).

    The declaration of port B are :

    PSD_reg.CONTROL_B &= 0x00;

    PSD_reg.DIRECTION_B &= 0x00;

    if(PSD_reg.DATAIN_B==0x2)// Checkes bit 2 in port B

    Thank you very much Kobi.

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:55

    There is a coded example in the third set of demo code that comes with the Dk3200 boards; it is attached here for your convenice. The switch setting code is in DK3200_3_demo.c .