Go Down

Topic: Bitmanipulation (Read 600 times) previous topic - next topic

Stephan

Hallo to all Arduino User/developers,

is a way to manipulate the bits of a predefined Byte?

Like:

Byte(somewhere);
Bit(i) of Byte(somewhere)?;

Thanks for help,

Stephan

mellis

There is, but it's a little complicated.  You need to use the C bit manipulation operators like "|", "&", "^", ">>", and "<<".  This tutorial looks reasonable:
http://www.gamedev.net/reference/articles/article1563.asp

Or if there's a specific task you're trying to accomplish, we can try to help you with some sample code.

Stephan

Thank for this fast reply,

I think i can handle the c-code things.......

Another Question:
Is the entire "Arduino-Language" a part of "C", when so, could one delimit that part which one can use?


Stephan

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy