NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Bit shifting and registers?

February 18, 2012
by mdk
mdk's Avatar

Probably been asked before but whats a good reference for bit shifting in C in relation to MCU registers (or any reference at all for that matter). I have done quite allot of high level programming in languages like C# and VB.net but I am new to C and electronics and a good reference would be a great help.

I have just got my temp sensor to send the temp in Celsius to my C# app, I am currently making an app that will plot it on a graph (gotta finish the graph first) and I will post it here when done. But I would also like my app to be able to send data to the MCU to display on the LCD but need to under stand bit shifting and registers better first.

Thanks in advance...

February 18, 2012
by treymd
treymd's Avatar

This Page is as good as any. You really just need to wrap your head around a couple of operators you've probably not used before. Actually more like 6, bitwise AND/OR/XOR, the bitwise complement (tilde) and the Right and Left shift operators. If you have windows 7 the calculator in programmer mode is a nifty way to see how the operations modify things in binary.

February 18, 2012
by mdk
mdk's Avatar

Thanks, your right, its the operators that look alien to me. Yes I do have windows 7 but didnt know about that, will check it out. Thanks.

Post a Reply

Please log in to post a reply.

Did you know that you can build a giant scrolling LED array with our microcontroller kit? Learn more...