I was wondering if there is any way to define a data type of 10 bits or one of 24 bits. I am getting problems with RAM space and the possibility to define this "exotic" data types could solve some of my problems.
Thanks in advance.
Best Regards,
Eduardo
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
Posted: Tue Feb 21, 2006 8:56 am
Short answer is no. There are no native 10-bit or 24-bit data types.
You can create structures and use the UNION command to encapsulate data. But you will need to keep things on 8-bit boundaries or end up with wasted space.
Furthermore the data operators (+, -, etc) and functions are designed to use the native data types. If you created your own 24-bit integer you will also need to create your own 24-bit operators and functions.
The CCS compilers sometimes have problems with overly complex data structures so be prepaired to read LST and MAP files.
What part are you currently using? _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Ed_Banses
Joined: 15 Sep 2005 Posts: 15
Posted: Fri Feb 24, 2006 6:44 am
Thanks for your answer.
I am using the PIC16F688 because the Ultra Low Power Wake Up feature.
I am going to take a look that you say, but I think that I am going to change the idea using the exotic data types.
Thanks a lot.
Eduardo
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum