Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can I create lookup tables greater than 256 values?

Status
Not open for further replies.

Sputnik

Full Member level 3
Joined
Oct 19, 2004
Messages
150
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Location
South Africa
Activity points
1,667
How can I create lookup tables greater than 256 values? For example, I have 800 values in a table.

Thanks
Sputnik :idea:
 

pic lookup table

for that you need to add an external eeprom that is able to hold that much data
 

pic c code look up table -c -c#

you cant use look up table over 256 byte by using single step.
to solve this problem you must split data to 256 byte segments. and write some codes that jumps segment addr and inter segment.
when writing code first store segment and inter segment adress in ram.
then use goto for segment selection and pcl adjusting for sellecting data in segment. you may store data with retlw.
it like a two dimensional array.
 

pic16 lookup table

You have manualy to initialize PCLATH register, before calling a look-up.
It is the best first to read microchip AN556.
 

pic-look-up-table

Why not divide your lookup table in 4 sub-tables ?

for example, with 800 values :

here
movlw here
addwf pclath,f
'256 values'

here2
movlw here2
addwf pclath,f
'256 values'

here3
movlw here3
addwf pclath,f
'256 values'

here4
movlw here4
addwf pclath,f
'32 values'

You only must use parametric goto to select the good table... I frequently use this tip.

regards,
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top