Flash memory

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Flash memory

1,109件の閲覧回数
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 返信

802件の閲覧回数
bigmac
Specialist III

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

 

Mac

 

0 件の賞賛
返信