Here's page write: Erase is similar Loader_Page_Write: rcall SPM_Ready ; rcall Loader_MakePage ; ldi TEMP,$05 ;PGWRT and SPMEN sts SPMCSR,TEMP ; spm ; Flash page write nop rcall Enable_RWW ret ; ;**************************** ; Enable_RWW: rcall SPM_Ready clr TEMP sbr TEMP, (1<<RWWSRE) | (1<<SPMEN) sts SPMCR, TEMP spm ret ; ;****************************** ; ; Wait till the SPM and EEprom writes are done ; SPM_Ready: lds TEMP,SPMCSR andi TEMP,(1<<SPMEN) brne SPM_Ready Wait_ee: sbic EECR, EEWE rjmp Wait_ee ret ;
Message
Re: [AVR-Chat] Re: Frustration abounds..
2007-07-18 by David VanHorn