Ahh I don't know those 2 languages. Is there a disadvantage to using C?
Type: Posts; User: pyroknife
Ahh I don't know those 2 languages. Is there a disadvantage to using C?
I will be using C to program the microcontrollers. What language will "ease the implementation?"
How important is objective based programming and Debugging for programming microcontrollers?
There's a chapter in my book called "objective oriented programming" and another called "Debugging...
Ok this is probably a stupid question. But, if I don't want to compile a part of the program, while can't I just take that part out and keep it in another file?
Does Debug actually tell you where...
What does DEBUG do?
My book talks about it, but I really don't understand what the point is in having the program debug.
Never mind, I don't think my previous question can be answered since a variable int can have many different sizes.
Oh thank you.
What if we defined:
int buf[100]
What would be the size of *buf now?
Oh okay, but did you have to define *buf=char?
Wiat why is sizeof(*buf)=1? Was that something defined?
Can you explain what that means? I still don't get it. Doesn't that always give 1.
How are data and dataEntry defined?
struct dataEntry
.
.
.
struct dataEntry data?
This is copied from my C book: "Finally,
if data is defined as an array of struct dataEntry elements, the expression
sizeof (data) / sizeof (struct dataEntry)
gives the number of elements...
A PIC is a req for the project I'm doing. Can you program a PIC microcontroller with C?
I will be using an arduino microcontroller. They have their own language, but they said I can use C.
It's for a mechatronics class I am taking next semester and we'll be doing a project. However, I...
I'm learning C on my own time. I'm going at a pretty fast pace, but I'm highlighting most of the important things or at least, what I think is important so I can refer back to it later. I struggle...
Thank you guys. THis explanation really helped.
I forgot in the while argument that #>0, where # is represented in decimal and not binary.
0*2^0+1*2^1=2
Does this have anything to do with bits=~0?
What if you had bits=101. Wouldn't this yield size=1, since the while loops well terminate once it hits the "0" in "101."
Yes, I think I understand that, but why does bits have to be >0?
A bit can be 0 or 1. So why is it exclusively 1 in this case?
Is it because before the while loop bits is set equal to ~0?
THe problem statement asks "Given that the expression ~0 produces an integer that contains all 1s, write a functioncalled int_size that returns the number of bits contained in an int on your...
Okay thanks.
and if an int is defined as w1=0525u, what does the 0 in the front and u in the end mean?
u, I think means unsigned, but I haven't seen what the 0 means.
Thanks. What does the "0x" stand for in "0xFFFFFFFE" again?
Is it just some notation for hexidecimal?
w1 &= 0xFFFFFFFE;
The book says it "For
example, to set the low-order bit of an int called w1 to 0, you can AND w1 with an int
consisting of all 1s except for a single 0 in the rightmost bit"...
I get what it's doing, but I'm having a hard time putting it in words.
As you previously described, you are changing the values of what the pointers point to, but not what the pointers point to....
Yes, I see what you guys are talking about. Isn't that what I said in the above post (quote)? Or am I wrong? I thought what I wrote above is what you guys are saying.