Hi, newbie have question about PIC16F877A

Thread Starter

majdi

Joined Jun 22, 2011
23
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?
 

debjit625

Joined Apr 17, 2010
790
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.
 

Thread Starter

majdi

Joined Jun 22, 2011
23
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.
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
 
Top