2003-07-18 04:57 AM
2011-05-17 02:55 AM
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.2011-05-17 02:55 AM
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 .