This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with switches

Hi guys, I am Alvin, I got some problem with handling switches that are embedded in micro controller. I saw the sample program, it says that if the switch is being press then it is "0" if not it is "1". So I added the blinking code inside the if loop, if its a 0, it will light up if not it wont like up.

If(SW2==0){
//light up LED
}

IF(SW1==0){
//Dont light up LED
}

Something like this.

Also, If I want to read data from USB port, so which part should i look for in the header section? Is it the I/O hexadecimal or other special hexadecimal?

thank You Very Much!

0