Hi, newbie have question about PIC16F877A

Discussion in 'General Electronics Chat' started by majdi, Jun 22, 2011.

  1. majdi

    Thread Starter New Member

    Jun 22, 2011
    11
    0
    Hi, im doing some project using PIC16F877A, it used two button and two LED and input and output. First button press LED1 light up, second button press and LED2 light up. The problem is how can and it is possible to make the output hold on last action i did.

    Exampe : First on pic board two LED not light on, then i push first push button and LED1 light up, then i push second push button LED1 off then LED2 light on. But after i switch of pic board power and on back the two LED not light on like last action i did.

    How can i make it hold with last action i did even i switch off PIC board power?
     
  2. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Store the last result i.e.. status of your LEDs in your EEPROM,upon start up initialize the LEDs status from the result stored in EEPROM.
     
  3. majdi

    Thread Starter New Member

    Jun 22, 2011
    11
    0
    im sorry, to store status of LED, it can be used memory; command, i not familiar with code, but i pretty good in modify code, can i have some example code to store last status for output? i not get much in google about this
     
  4. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Whats your programming language i.e.. assembly or C.
    I am afraid,that is not going to take you too far....try to learn programming.
     
  5. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
Loading...