need help...nt difficult, but i dun know...

Discussion in 'Homework Help' started by polarbearbear, Apr 1, 2009.

  1. polarbearbear

    Thread Starter New Member

    Mar 12, 2009

    erm..anyone can teach me how to define d condition of d push on switch using CCS code. i wan the function: when push button 1 is pressed, LED 1 will on and LED 2 keep off. Then push on button 2 is pressed, LED 2 will on then LED 1 will turn off. And exclude d condition both push on buttons are pressed together.

    really thx alot.....
  2. thatoneguy


    Feb 19, 2009
    Sounds like an SR Flip Flop, a uC is a bit of overkill.

    Read the Wiki Article An SR Flip Flop and maybe a NAND Gate or two should do what you are trying to from how I'm understanding the application. Either way, seeing how the flip flop works should give you a very good start on the code if you must use a uC.

    The schematic is about 4x too small to read.