In this blog entry I will present the mmapGpio class that provides basic access to all the GPIO’s on the RPI’s 26-pin header using direct register access. The advantage of this approach to GPIO control is that one can bypass Linux and talk directly with the GPIO registers which enables much faster GPIO toggling speeds. Using this approach I was able to get GPIO toggling speeds that exceed 25MHz!!!! That’s much faster than the toggling speeds that can be achieved using the safer but slower SYSFS approach to GPIO control.
The mmapGpio class is intentionally designed to be simple but useful. A great feature of this class is that a single instance can be used to control the all the RPI’s GPIOs. The mmapGpio class with two examples and makefiles can be downloaded from here.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — “The Essential Guide to Electronics in Shenzhen – Delivery Update”
Wearables — Vinegar meets rust
Electronics — How to make your LiPo long-lasting
Biohacking — How does PCR work?
No comments yet.
Sorry, the comment form is closed at this time.