cancel
Showing results for 
Search instead for 
Did you mean: 

Port B

elsiun
Associate II
Posted on July 18, 2003 at 13:57

Port B

2 REPLIES 2
elsiun
Associate II
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.

joseph2399
Associate II
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 .