• AVR Freaks

Hot!24 bit integers in MPLAB X IDE

Page: < 12 Showing page 2 of 2
Author
1and0
Access is Denied
  • Total Posts : 12269
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: 24 bit integers in MPLAB X IDE 2021/01/19 18:27:26 (permalink)
+1 (1)
In other words, 0xFFFF is the unsigned int 0xFFFFU, while 65535 is the long int 0x0000FFFFL.

Interestingly, the decimal numbers 2147483648 to 4294967295 are unsigned long in C90 but are long long in C99. ;)
 
#21
ric
Super Member
  • Total Posts : 30239
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: 24 bit integers in MPLAB X IDE 2021/01/19 18:31:13 (permalink)
+1 (1)
Plainly because Microchip's implementation of C90 does not support 64 bit integers at all.
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#22
blue_led
New Users
  • Total Posts : 144
  • Reward points : 0
  • Status: offline
Re: 24 bit integers in MPLAB X IDE 2021/01/20 08:56:12 (permalink)
+1 (1)
i asume you use 24bits for instrument tuner code.
why not just increment one 8 bit variable on overflows in ISR ?
 
#23
Page: < 12 Showing page 2 of 2
Jump to:
© 2021 APG vNext Commercial Version 4.5