Project - LPC23xx Register Visual BIT Manipulator - GHI Class Bit Manipulation - A Calculator/Learning Tool!

LPC23xx Register Visual BIT Manipulator - GHI Class Bit Manipulation - A Calculator/Learning Tool!

by Chris Sykes (ChrisO)

Shifting Bits in a Register is not easy to learn! Its in-fact quite difficult unless a very good understanding is known already about Bitwise procedures. For example, doing a Bitwise procedure on a Hexadecimal Address (0xE0074000) can change the address entirely. If we were to assign this value (1 << 22) to the above address (0xE0074000) the address is changed to (0x00000000) which is no longer valid for the Register we were using (T3IR).

It took me some time to understand what is actually going on here and its not the Bitwise procedure that was the problem, it was the actual assignment of the Bits to the Binary Address. The Classes that GHI provide in their SDK are very good classes but getting a grasp of the whole How it all works together was a bit of a task. For the Old School Programmers, they know Bitwise inside out, so for them it is likely much easier to understand the whole maneuver, but for those of us that dont use Bitwise procedures often or at all its a lot harder to understand.

I built the attached application (LPC23xx Register Visual BIT Manipulator - GHI Class Bit Manipulation) to see a visual representation of what is really going on in the Register Addresses of the LPC23xx Chips.

Its important to think of the Address as an array of Bits. In Computer Geek Speak, a 1 is ON, and a 0 is OFF. So try this app out and see if it helps you as it has helped me.

Please let me know if you find any issues with it. Some of the Code could be tidied up and changed to improve performance but I kept it simple for the readability factor for others.

All the Best, ChrisO.

P.S. This is my way to help others out, thanks to those that have helped me out!

Thanks for sharing!

Hi and thanks for sharing. Does your program work with a Spider Fez ?

Spider uses different processor LPC2478. Register map is different.