Exact match. Not showing close matches.
PICList
Thread
'[PIC]: Entering Binary Numbers in CCS C'
2003\04\17@101256
by
Mccauley, Daniel H
Been having difficulty looking this one up.
Using CCS C Compiler:
Instead of writing a line such as: DATA = 0x01;
I would like to enter the data as binary instead of hex.
How would I write this out?
Any help appreciated.
Thanks
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2003\04\17@101819
by
Dale Botkin
On Thu, 17 Apr 2003, Mccauley, Daniel H wrote:
> Instead of writing a line such as: DATA = 0x01;
> I would like to enter the data as binary instead of hex.
>
> How would I write this out?
DATA = 0b00000001;
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2003\04\17@105334
by
Bob Ammerman
And for any ANSI C compiler that does not support binary constants.....
#define B(a,b,c,d,e,f,g,h) \
( ((a)<<7) | ((b)<<6) | ((c)<<5) | \
((d)<<4) | ((e)<<3) | ((f)<<2) | \
((g)<<1) | ((h)<<0) )
DATA = B(0,0,0,0,0,0,0,1);
Bob Ammerman
RAm Systems
{Original Message removed}
2003\04\17@211301
by
John Hansen
Use:
DATA = 0b00000001;
At 10:12 AM 4/17/03 -0400, Mccauley, Daniel H wrote:
>Been having difficulty looking this one up.
>
>Using CCS C Compiler:
>
>Instead of writing a line such as: DATA = 0x01;
>I would like to enter the data as binary instead of hex.
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
More... (looser matching)
- Last day of these posts
- In 2003
, 2004 only
- Today
- New search...