Crumb168-USB from Chip45
HC-05 Bluetooth Module
This firmware runs very stable and has all features that I planned to implement. Therefore you should not expect new features in future.
Fix for wrong output on Port Y after oPY command with bit number 15-31. The problem did not occur on all gcc versions.
Changed fuse settings to enable brown-out detection at 2,7V.
Fixes compiler warnings introduced by new avr-gcc version.
Added support for more serial ports.
Added support for Xmega microcontrollers
Added support for up to 64 additional I/O pins through external shift registers of type 74HC165 and 74HC595.
Major code cleanup. The files ADC.h, ADC.c, io-commands.h and io-commands.c are now the same as in the net_io firmware.
The status LED flashes now two times during power-on.
Added support for using backspace character in commands.
The informations on this website let you build an I/O interface module which connects to the host computer via serial port, USB or Bluetooth. That makes 18 to 84 controllable Pins, depending on the microcontroller type. And you can have even more with the help of some cheap shift registers.
The Bluetooth option is best suited for hobby electronics engineers who don't want to risk damaging their personal computer. Also they are cheap - a Microcontroller module + a Bluetooth Module cost less than 10 Euros (or US-Dollars).
Access to the I/O ports is provided via simple text commands, eliminating the need of special drivers and libraries. It works with almost any programming language and any operating system, like PC, smartphones, tablets, Raspberry Pi, ...
The C Compiler for the microcontroller is free availabe for Windows (e.g. GNU Toolchain), Linux (avr-gcc) and Mac OS. The example app "ioModule" for PC and smartphones can be compiled with Qt Creator.
For Example, the following command sets the pin PC3 to high:
To query the port D in hexadecimal format:
The whole command set is described at the page bottom. You can execute more than 100 commands per second.
As an alternative to raw microcontroller chips, I recommend Arduino Nano and Uno, as well as AVR Modules from Chip45, which are available with pre-installed bootloader, so you don't need an extra programming adapter.
Notice: Mobile devices from Apple do not support the Bluetooth SPP protocol. Use WLAN or Ethernet as an alternative.
These commands can be used on a single I/O line (PB7), a port (PB) or all ports together by a single command:
PB7 and PB are examples, all ports are accessible in the same way. When accessing all ports together, the size of the hexadecimal number depends on the size of the AVR, referring to the ports: DDCCBBAA or HHGGFFEEDDCCBBAA.
The commands for single pins support characters as an alternative to 0 and 1:
The commands d, p and o respond always with "Ok". The i command responds this way:
The available references depend on the capabilities of the Mikrocontroller:
Example for the r command:
The a command expects the channel number of the analog input, for example:
The length of the hexadecimal number depends on the size of the shift register (8-32 bits).
Again, the length of the hexadecimal number depends on the size of the shift register (8-32 bits). The current status of port Y can be read out by the command i.
The Commands d and p are not available on the port extensions!