electronics forum

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

C look up table


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> C look up table
Author Message
123testing



Joined: 22 Dec 2007
Posts: 10


Post03 Feb 2008 13:17   

C look up table


I am trying o write the following program in C for use in a Micro.

Can anybody give me:

Examplea on "look up tables" using C.

Thanks to all.


Last edited by 123testing on 12 Feb 2008 17:01; edited 1 time in total
Back to top
Google
AdSense
Google Adsense




Post03 Feb 2008 13:17   

Ads




Back to top
wek



Joined: 21 Dec 2004
Posts: 239
Helped: 26


Post04 Feb 2008 12:52   

C look up table


Code:

const unsigned char lookup_table[256] = {12, 32, 33, *etc.* }

[...]

resulting_value = lookup_table[input_value];

[...]

Use an appropriate qualifier (nonstandard) to place the table into ROM/FLASH rather than RAM.

JW
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 -> Microcontrollers -> C look up table
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
what's look-up table? (3)
look up table (LUT) (9)
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)
LOOK UP TABLE for sine wave signal (11)


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