How Many Bytes Does Float Occupy Inside PIC Microcontroller?

Click For Summary
A float data type typically occupies 4 bytes (32 bits) in memory, but its size in PIC microcontrollers may vary depending on the specific architecture. Different PIC controllers, ranging from 12-bit to 32-bit, may handle floating-point operations differently, potentially using fixed-point techniques instead. There is limited documentation on floating-point op codes for PIC microcontrollers, which adds to the uncertainty. Users with experience in other architectures, like Intel x86 or Motorola 68000, note the differences in handling floating-point data. Understanding the specific PIC model is crucial for accurate memory size determination.
Abstr7ct
Messages
21
Reaction score
0

Homework Statement



How many bytes does a variable of float data type occupy in the data memory of PIC microcontroller?



Homework Equations



None


The Attempt at a Solution



All I know, is that float data type has a size of 4 bytes, that's 32 bits. I'm not sure if it occupies the same size inside the data memory of the PIC.
 
Physics news on Phys.org
Abstr7ct said:

Homework Statement



How many bytes does a variable of float data type occupy in the data memory of PIC microcontroller?



Homework Equations



None


The Attempt at a Solution



All I know, is that float data type has a size of 4 bytes, that's 32 bits. I'm not sure if it occupies the same size inside the data memory of the PIC.
There are many different kinds of PIC controllers, ranging from 12-bit, 13-bit, 14-bit, 16-bit, up to 32-bit wide code memory.

I looked at this wikipedia article, and didn't see any mention of floating point op codes, so perhaps floating point operations are done in a kind of fixed-point technique.

I don't have any experience with PIC microcontrollers - most of my assembly experience has been with various Intel x86 chips and some with Motorola 68000 family.
 

Similar threads

Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
10
Views
4K
  • · Replies 25 ·
Replies
25
Views
15K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
5
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
1
Views
2K