EEPROM ASM problem

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi 

I am using below code to EEPROM read 

EEPROM_read:
; Wait for completion of previous write
sbic EECR,EEWE
rjmp EEPROM_read
; Set up address (r18:r17) in address register
out EEARH, r18
out EEARL, r17
; Start eeprom read by writing EERE
sbi EECR,EERE
; Read data from data register
in r16,EEDR
ret

 

But after compiling I am getting error for this line of code -sbic EECR,EEWE as operand out of range

I am using Atmel studio 7.0 with GCC compiler for ATmega8515

please help

Last Edited: Mon. Jan 2, 2017 - 09:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't cross post. Locking!

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

Topic locked