Flash memory

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Flash memory

1,104 次查看
aurora
Contributor I

Could anyone show me by example how to save 1 byte data into flash memory and get it back to the variable? I create a variable POWEROFF, and I give 1 to this variable in the main routine. I need to save the content of POWEROFF to a (any)location in flash memory before the MCU is disconnected from power. Then I need to get this data back into this variable when MCU is connected to power again.

 

I tried to use those supporting routines in ROM, such as RDVRRNG, PRGRNGE and ERARNGE. So far I am getting no where. I hope someone can show me an example in assembly code.

 

INCLUDE 'derivative.inc'         ; MC68HC908QY4A

 

poweroff    ds  1

 

mainLoop:           

            lda  #$1

            sta  poweroff

            bra  mainLoop

 

Thanks all

标签 (1)
0 项奖励
回复
1 回复

797 次查看
bigmac
Specialist III

This seems to be a split thread.  The original thread may be found here.

 

Mac

 

0 项奖励
回复