Jump to content
Sign in to follow this  
yong

16-bit Look-up Table

Recommended Posts

Hi

 

I think I am stuck by the BoostC 8-bit array limitation. From the BoostC manual, it stated that using ROM has to be an 8-bit type constant.

 

I most cases, I used to use a 16-bit lookup table for the 10-bit ADC conversion.

 

Does anyone know how to have a 16-bit lookup table running or an alternative way of converting the 10-bit ADC reading. The accuracy is extremely important therefore I can not afford to lost a single bit.

 

Thank you in advance!!!

Share this post


Link to post
Share on other sites

yong,

Hi

 

I think I am stuck by the BoostC 8-bit array limitation. From the BoostC manual, it stated that using ROM has to be an 8-bit type constant.

 

I most cases, I used to use a 16-bit lookup table for the 10-bit ADC conversion.

 

Does anyone know how to have a 16-bit lookup table running or an alternative way of converting the 10-bit ADC reading. The accuracy is extremely important therefore I can not afford to lost a single bit.

 

Thank you in advance!!!

If your are using a PIC18 target you can used -idx 2 command line option to make all array indexes 16 bit.

 

Regards

Dave

Share this post


Link to post
Share on other sites
My PIC is 16LF1936. Is there anyway to do it?

 

I'd either use 2 tables for low and high bytes or one table that store low and high byte separately and combine their values to get a 16 bit number when needed.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...