03.03.2011, 05:12 PM
was soll ich dir denn sagen weis ja nicht mal von welchen AVR du redest.
Aber hier mal die Routine in Bascom/Asm:
Do_spm:
Bitwait Spmcsr.selfprgen , Reset ' check for previous SPM complete
Bitwait Eecr.eepe , Reset 'wait for eeprom
Z = Page 'make equal to page
Shift Z , Left , Maxwordshift 'shift to proper place
Z = Z + Wrd 'add word
lds r30,{Z}
lds r31,{Z+1}
Spmcsr = Spmcrval 'assign register
spm 'this is an asm instruction
nop
nop
Return
Aber hier mal die Routine in Bascom/Asm:
Do_spm:
Bitwait Spmcsr.selfprgen , Reset ' check for previous SPM complete
Bitwait Eecr.eepe , Reset 'wait for eeprom
Z = Page 'make equal to page
Shift Z , Left , Maxwordshift 'shift to proper place
Z = Z + Wrd 'add word
lds r30,{Z}
lds r31,{Z+1}
Spmcsr = Spmcrval 'assign register
spm 'this is an asm instruction
nop
nop
Return