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 » Bucket Brigade

February 24, 2010
by norby31
norby31's Avatar

How do I access the memory in a sequential fashion as to move a bit from one location to the next--many times?

February 24, 2010
by treymd
treymd's Avatar

Seems to me this would be a binary shift operation, creative use of the >> or << operators. Just taking a crack at it =)

February 24, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi norby31,

I suppose the question to ask is why are you trying to move a bit through the MCUs memory space? Like treymd pointed out there are operators that work on individual bytes and let you shift those back and forth, but there is no straight forward way of just shifting an entire section of RAM.

When designing a system you should think of the constraints of the programming language, and design what your data representations are to fit easily in the way the programming language works. If you let us know what you are trying to do, and why you thought bit shifting could accomplish that, we would be glad to lend our opinion as to how to go about implementing it.


Post a Reply

Please log in to post a reply.

Did you know that you can connect a computer keyboard to your microcontroller? Learn more...