Pages: [1]   Go Down
Author Topic: Bitmanipulation  (Read 549 times)
0 Members and 1 Guest are viewing this topic.
Berlin
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Berlin
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: