Searching \ for ' [AVR] lookup tables' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/mems.htm?key=table
Search entire site for: 'lookup tables'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [AVR] lookup tables'
2002\02\26@070719 by Trevor Page

flavicon
face
Hi all,

Really basic question for those of you who have experience with AVR devices.


I wish to implement a lookup table. On the AVR there doesn't appear to be an
instruction that's equivalent to the PIC's convenient "RETLW" instruction.
It seems that I need to actually have two instructions per lookup table
entry on the AVR, such as:

CPI Rd, value
BREQ an_address
CPI Rd, another_value
BREQ an_address

Am I missing something here? I feel there must be a method using one
instruction per enry, but I can't see how.

Cheers

Trev



The E-mail and any attachments hereto are strictly confidential and intended
solely for the addressee. If you are not the intended addressee please
notify the sender by return and delete the message. You must not disclose,
forward or copy this E-mail or attachments to any third party without the
prior consent of the sender.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\02\26@071343 by Jinx

face picon face
LPM + Z ?

LD + Y ?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\02\26@142558 by uter van ooijen & floortje hanneman

picon face
> I wish to implement a lookup table. On the AVR there doesn't appear to be
an
> instruction that's equivalent to the PIC's convenient "RETLW" instruction.
> It seems that I need to actually have two instructions per lookup table
> entry on the AVR, such as:

I recall that there are more efficeint ways than 2 instrcutions per value,
but not down to one. Look around on Atmel's website for an appnote about
'implementing table lookup on the 1200' or something like that.

Wouter

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...