Sparkfun has recently posted a tutorial on how to write C-based programs that access GPIO/I2C/SPI/UART devices through Linux. The programs are targeted towards the PCDuino board, but because that board runs Linux, much of this information can be useful for those using other embedded Linux boards such as the RaspberryPi, Beaglebone (SPI is a little different on the Beaglebone though) as well as other Linux boards. Continue reading
In this blog entry I will demonstrate how to successfully interface the MCP23017 general purpose input/output (GPIO) expander from Microchip, to the Raspberry Pi over the I2C bus.
The I2C Bus
The I2C bus is a two wire bus developed by Phillips/NXP (4-wire if you want to include power and ground), that is used to connect a single master device to up to 120+ slave peripheral devices. The master device is typically a microcontroller, and the slave device(s) is/are typically peripheral chips that perform special functions such as GPIO expanders, analog to digital converters, digital to analog converters, real-time clocks, eeproms and many more. Continue reading
In this entry I will outline how one can utilize remote debugging tools available in Eclipse to debug applications from a linux PC/VM, on the raspberry Pi. This tutorial assumes that you have already setup your Raspberry Pi cross compiling toolchain and Eclipse and that you are able to build your applications in Eclipse (using the cross-compiling toolchain) as well as transfer the binary executables to the RaspberryPi via the RSE plugin. If you have not done so I urge you to look at the “Development Environment for the Raspberry Pi using a Cross Compiling Toolchain and Eclipse” since this tutorial is really a continuation of the tutorial in that blog entry. Continue reading
About 6 months ago I started a tutorial on how to setup a free development environment for a Cortex-M0 microcontroller from STMicroelectronics. This tutorial utilized a free ARM toolchain, Eclipse and OpenOCD (for debugging) to setup this environment. It was based on the $8 STM32F0Discovery board.
While the tutorial targeted the STM32F0Discovery board, the larger objective of that tutorial was to make setting up a free GCC-based development environment for Microcontroller development (Cortex-M0/M3/M4) more accessible to everyone and not just the geeky few. And I feel that the tutorial has somewhat succeeded in this goal…
My issue with the STM32 and most other Cortex-M0/M3/M4 parts is that they’re only available in hard to solder surface mount packages. While I know that they are solderable, 0.5mm 48/64QFP packages are almost impossible to align with the naked eye (at least my eye). QFN packages are generally harder to solder at any pitch and simply not designed for people who want to mess around with microcontrollers on a breadboard. Sadly most of of the Cortex-M0/M3/M4 parts out there come in these packages. The exceptions are some of the Cortex-M0 chips (LPC1114) from NXP that come in 600mil 28-DIP and 0.65mm SSOP. Unfortunately these parts do not have a large enough memory density (32K Flash and 4KB RAM) and peripheral integration to peak my interest. Continue reading
In case you have been living under a rock, Processing is an open-source Java based development environment with a high level API that gives you access to a variety of mathematical, graphical, data analysis libraries in a few lines of code. Processing is basically to the PC what Arduino is to microcontrollers. Heck Arduino’s IDE is derived from the Processing IDE, so if have done any Arduino programming you should feel right at home with Processing .
Processing is a great tool to learn programming principles. The Processing website has some excellent learning resources.
I also encourage you to have a look at the following books on the basics of Processing: