Atmel (recently bought by Microchip) has been producing a large family of 8-bit microcontrollers, the tinyAVR and megaAVR series for quite some time. Actually the first Atmel 8-bit AVR was introduced back in 1997. You will probably find AVR's in many household devices throughout your house, from microwaves to coffee machines and some home automation devices.
Like most microcontrollers, they have many I/O options and are quite flexible. Memory however, especially on the ATTiny (tinyAVR) devices, is rather scarce. So I started to write some low-level assembler routines with minimal footprint to do basic stuff for the programs I want to develop, like queueing data, send and receiving serial data, allocating memory, reporting errors, writing EEPROM memory, etc.
In the first article on low speed serial communications for 8-but microcontrollers, we looked primarily at the design principles and message structure. In this second, long overdue, article, we take a closer look at handling a message.
I am designing a simple, robust protocol for universal serial communications between low-level devices and sensors with very limited resources, whether it is over an RS485 bus, Wi-Fi, PLC or otherwise.
A look at the Smart Meter eco system
When moving to a new house, I immediately had a Smart Meter installed (still not sure what's so smart about it...) with the intention to hook-up a device to read the power and gas consumption throughout the day. Well, doing jobs around the house got in the way and a year later I finally started to look into the details of this Smart Meter. After doing some 'research' on Internet, I decided to start at the beginning: the standards for Dutch Smart Meters, since every meter has to comply with those standards.
In a previous blog post I looked at Atom and PlatformIO, how to install and how to create and run a project for one of the 200+ supported MCU boards. But the true power of this development platform comes from its extensibility, including syntax highlighting, Git integration, custom board and platform definitions and simple project management.
Let's have a quick look at some of the extensions I've added to improve my 'productivity and workflow'... ;o)