Re: Control a Radio PLL with a PIC
Yes, var= variable
bit is one of the placeholders in the larger variable, example
say you want a variable to hold a value as a flag for an event, you could make a bit variable, called . . . FLAGBIT this way FLAGBIT VAR BIT
or you might need several flag bits and do it this way
FLAGBIT VAR BYTE which gives you an 8 bit byte full of FLAGBITS as follows
FLAGBIT.0 lowest bit in the byte
FLAGBIT.1 second bit in the byte
FLAGBIT.2 third " " " "
FLAGBIT.3 . . .
FLAGBIT.4 . . . all the way to FLAGBIT.7 , FLAGBIT.7 being the highest order bit in the byte variable
which is to say you can address every bit of your variable individually.
Byte = %00000000 will hold 0 to 255 in decimal
word = %00000000 00000000 will hold 0 to 65535 in decimal
LONG = %00000000 00000000 00000000 00000000 which is 4294967295 but I think (I am not sure of this) only allows 1/2 that much on each side of zero -2147483647 0 2147483647
Notice the way I have written the binary expression %00000000 this is the appropriate syntax for P Basic Pro, other compilers may use different "punctuation" and you will see "BIG ENDIAN" and LITTLE ENDIAN" usage and all that means is which end of the group of zeros is the least significant bit, the Left or the Right.
You will see different ways of displaying hex as well, in PBP we use $00 whereas in C you might see something like 0h00
Last edited by Archangel; - 12th June 2011 at 01:15.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks