electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

look up table (LUT)


Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> look up table (LUT)
Author Message
mamhosney



Joined: 04 Jan 2005
Posts: 21


Post10 Jan 2005 9:20   

retlw const data


i want a topic or site explain how to build a look up table in atmel 89c51 pls reply me fast
Back to top
Antharax



Joined: 01 Jan 1970
Posts: 227
Helped: 13


Post10 Jan 2005 9:57   

Re: look up table (LUT)


in what language?
C, Assembler, ...

And when you have questions about microcontrollers, please post them in the Microcontrollers section!

lookuptables can be made like this in C (one of many possible ways)
Code:
const unsigned int MyLookupTable[] = { 0x0022, 0x8844, 0x8982, 0x8d94 }

MyLookupTable[1] will give you 0x8844

but please check where the compiler puts the const data (it can be in rom or in ram). Also check the size of an int for your compiler (most uC have a 16 bit integer but it can also be 32 bit like most PC's)

Antharax
Back to top
nj_jack



Joined: 09 Nov 2004
Posts: 90


Post16 Jan 2005 3:53   

look up table (LUT)


you can create an data array, which can make your program speed. This is a convenient method.
Back to top
banh



Joined: 16 Dec 2004
Posts: 472
Helped: 12


Post16 Jan 2005 4:41   

Re: look up table (LUT)


mamhosney wrote:
i want a topic or site explain how to build a look up table in atmel 89c51 pls reply me fast



lookup table can be easily built using array declaration.

you may need to consider a few more things such as: in ROM or RAM (i.e. is it updateable?), at which address (the address in some cases can help you access the table conveniently.)? ...
Back to top
boeysue



Joined: 23 Dec 2004
Posts: 190
Helped: 3


Post21 Jan 2005 22:09   

Re: look up table (LUT)


First you should tell us the function of your look-up table.
Then other will be easiear to help u.
Back to top
mamhosney



Joined: 04 Jan 2005
Posts: 21


Post04 May 2005 13:09   

Re: look up table (LUT)


thanks for all ,i have designed my LUT and it worked well
Back to top
Badaruddin



Joined: 25 Jan 2005
Posts: 32


Post04 May 2005 16:38   

Re: look up table (LUT)


I don't know the site, but i suggest you learn instructions about :

1. label
2. movc a,@a+dptr
3. memory locations

It is usefull to built LUT.
Back to top
Google
AdSense
Google Adsense




Post04 May 2005 16:38   

Ads




Back to top
ahmad_abdulghany



Joined: 12 Apr 2005
Posts: 1369
Helped: 212
Location: Cairo, Egypt


Post04 May 2005 16:58   

Re: look up table (LUT)


If you want to make a LUT you can use Assembly language like the following :
assume you want to do LUT for sine wave generation , then you will call a subroutine that takes the required value of sine and moves it to the program counter register PCL then it will jump to certain address that corresponds to the called value then returns with literal value stored in the Working register ...

like that :
label :
..... ; here you will transfer the input value that you need to get its sin
movfw input
call sin
....

sin :
movwf PCL
retlw .1 ; scaled value of the sin output ...
retlw .2
retlw .3
retlw .4
.....

I hope that Helped you ... Smile
If you needed anything else or didn't understand what i said .. please PM me ..
Back to top
Badaruddin



Joined: 25 Jan 2005
Posts: 32


Post11 May 2005 5:27   

Re: look up table (LUT)


It is not 89c51 assembly language.
Back to top
eng_ahmed22



Joined: 07 Jun 2005
Posts: 178
Helped: 13


Post21 Feb 2006 8:11   

Re: look up table (LUT)


Badaruddin wrote:
It is not 89c51 assembly language.

i think it is PIC code, in assembly.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> look up table (LUT)
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
LUT(lookup table) in FPGA can be implemented in ASIC? (5)
C look up table (1)
what's look-up table? (3)
hummidity look up table? (18)
Design the Look-up Table (17)
look up table in atmel 89c51 (3)
how write a Look Up Table (2)
how to implement look-up table in RTL? (13)
need of ramp generation look up table (2)
how to implement Look-Up table in verilog (4)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS