yong 0 Posted May 1, 2011 Report Share Posted May 1, 2011 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!!! Quote Link to post Share on other sites
Dave 0 Posted May 1, 2011 Report Share Posted May 1, 2011 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 Quote Link to post Share on other sites
yong 0 Posted May 1, 2011 Author Report Share Posted May 1, 2011 Hi Dave, My PIC is 16LF1936. Is there anyway to do it? Quote Link to post Share on other sites
Pavel 0 Posted May 2, 2011 Report Share Posted May 2, 2011 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 Quote Link to post Share on other sites
Recommended Posts
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.