On 1/3/07, Thomas Keller <tjkeller1@alltel.net> wrote:
> Well, I was under the impression that data HAD to be in EEPROM or RAM.
> How woudl you address it if it is in the code space?
Table: .db $00, $01.....
Read_Table: ; called with offset in TEMP, output in TEMP
clr R0 ; Trashes R0
ldi ZL,low(table*2) ;Point at the table
ldi ZH,high(Table*2)
add ZL,TEMP ;Add the offset
adc ZH,R0 ;16 bit add
lpm ;On smaller AVRs the result is in R0, in larger ones it's
mov TEMP,R0 ;lpm TEMP
[Non-text portions of this message have been removed]Message
Re: [AVR-Chat] *sigh*
2007-01-04 by David VanHorn
Attachments
- No local attachments were found for this message.