dear all
i am working on a RGB light using atmega16
i just want that at power on my device should glow the LED from last sequence at which my device made off due to power off.
i have used here a variable, the value of this variable changes frequentally for changing the mode of LED. and at power on its value is 0. i just want that at power on it must hold the last value which was available in it at the time of power off.
please help me.
i have studied the given link as well as datasheet also
but i couldn't do it.
is the .hex file & .eep file are same??
in my system it is showing same data in both file!!!!!!
please help me
The eep file and hed are not the same, one has flash content and the other the eeprom content, they should both be written if you intend to write values in eeprom while programming the chip.
These two files are generated from the compiler, depending on the initial content of the eeprom the eep file may be empty.
What do you mean by "in programmer (ponyprog) i found both the files with same content" , ponyprog doesn't generate them.
You just select which files you want to write so have you selected the proper files?
i mean that after compilation using avr studio when i start ponyprog for burning the files, it provide me options of:- open flash file(.hex) & open eeprom file(.eep) when i invoke them i get the same content of both file in open option of ponyprog
ok thanks
will you provide me any sample code for atmega16
- - - Updated - - -
tahmid bhai
i am implementing a RGB light using pwm with atmega16. i wrote code for different colors using functions. now i call them in different ways for generating different petern of colors. i am also using intrupt to change the colors using 1 switch. when i press switch each time one variable is incremented and the value of variable define the color which have to glow. now i want that if i remove power supply & connect it to power after some time then it should on from that pattern at which it made off
help me to do this
hoping to get the solution for it soon
- - - Updated - - -
hi everyone
please help me.
i just want to save a variable in eeprom frequently in my project. i am having one variable, the value of that variable will change time to time. let the power is off. now after some time power is on now my device will on, i want that the value of that variable should remain same as at the time of power off. i.e. let the value of variable is 10 at the time of power off. then i require the value of variable as 10 only at the time of power on