In this
article:
Navigation:
HomeHardware
Software
Techniques
Controllers
Reviews
Index
Overview
The flip side of building hardware is writing software to animate that hardware and do the things it needs to do. Whether it is processing the signals from a noisy sensor, to creating decision trees for route planning. Software is one of the three disciplines of robotics.
It is the combination of hardware and software that make the robot do what it can do. This is a list in reverse chronological order of all articles which have, as their main focus, a software theme.
Article List
Setting up the clocks for a Cortex-M chip from ST Micro can be fairly daunting. If you are used to using an ATMega AVR chip like the Arduino does, you probably soldered down a 16 MHz ceramic resonator and were done, with the Cortex-M you have a lot more options. This article covers those options for the M4 series.
Cross compiling for an architecture different than the one you were running the compiler on used to be something of an art. For the Cortex-M however, ARM has put a manufacturer supported port of the gcc toolchain for anyone to use. This is a much better answer than the one supported by the package managers and you should consider using it instead. A quick article on how to make that happen.
OpenOCD is an open source tool which can give you access to the ARM debug port. It supports a wide variety of programmer protocols that are often built into evaluation boards. Once you have a working OpenOCD setup, flashing and debugging your code is much easier.
Programming Cortex-M chips without and operating system is slightly more complicated than programming 8 bit micros. This article goes through some of the differences and gives a working example of “hello world” running on an STM32F4 …
These days programming an “embedded” chip is a much bigger endeavor than it was. This is because the price of 16 and 32 bit processors have plummeted to the point where it becomes trivial to get a “big” processor for even a “small” job, but there are costs to that too.
Working with embedded ARM systems using only a Linux system can be challenging but Blacksphere Technologies has come out with an excellent tool to help and its open source, so you change it to suit your needs.
This is the story of finding a small bug in a multiprecision addition routine which leads to a reexamination of doing multiprecision math on the PIC16 architecture.
Early on in Robotics one way to get intelligence on board was to use a cast off PC or laptop. Some folks ran MS-DOS on these but others wanted to boot to the bare metal. I researched a bit about what the exact mechanism was to get from power off to running OS and found Ray Knightly’s work useful. I’ve captured them here since his originals are no longer available on his web site.
This is a disassembly and analysis of the Windows 95 “b” (aka OSR2) boot program which is loaded on system boot.
This is a Ray Knightly’s disassembly and analysis of the Windows 95 “b” (aka OSR2) master boot record (MBR).
Programming for “Flashing” PIC chips requires a programmer. Early work like David Tait’s Programmer depended on bit banging the parallel port of a PC, as parallel ports started disappearing, and serial ports soon followed, I looked for a way to program PIC chips via USB and found a kit programmer that could do just that.
When I was competing in BattleBots we had a number of robots in various weight classes. These were typically controlled with regular R/C radios and those radios generated a standard servo control signal. I built a small board to convert that signal into relay activation.
One of the things I needed to do for my electronic speed controller was to use the output from an R/C receiver to control it. Those receivers generate a pulse which normally drive an rc-servo so I needed to meausure pulses accurately. This article describes the way I built and debugged code to do that on the PIC chip.
Input devices tend to consume precious I/O pins on your projects. A new breed of input device, the Rotary Mechanical Encoder, has come down in price (from the high $20 each range to under $5) so that you might consider using them. I set up a PIC program to do just that.
This article was pretty famous for a while. Basically I built an electronic speed controller, like the ones used in R/C models, based on a PIC and four transistors. It has been copied many times, when I re-visited the topic I did so with the ServoGizmo.