Time to get some experience with 32bit microcontrollers – some progress

At Time to get some experience with 32bit microcontrollers I wrote that after almost 50 years working with 8bit microcomputers and microcontrollers, I thought it about time to get my hands dirty on some 32bit microcontrollers.

This article reports some work in the STM stream.

I abondoned the ST Discovery board in favour of a low cost basic ST32F103 development board costing about $4 on eBay. The chip is a 32bit microcontroller clocked at 72MHz.

As a learning vehicle, I decided to implement the functionality contained in Arduino thermistor thermometer – a tutorial.

The development environment is Eclipse with the GNU ARM toolchain, a debugger probe, the basic development board, and a 1602 LCD display with I2C backpack and an inexpensive CP2102 USB RS232-TTL interface.


Above is the working trial. The GDB debugger allows On Chip Debugging (OCD).

It has been quite a learning exercise, finding out how to configure / enable microcontroller features, but at the end of the day (or a couple of days really), this implementation measures the voltage across a thermistor fed from 3.3V by a 1kΩ resistor calculates thermistor resistance, and given the thermistor characteristic (R25=210,β=3200) calculates the temperature of the thermistor (deducting a quantum for calculated self heating).

The firmware writes the results to the LCD and to the CP2102 USB virtual COM port.

This chip has a 12bit fast ADC which may be more suited to some projects than the 8bit Atmel chips being used. The work on this test lays down the groundwork to use this board in the AD8307 power meter under development. The speed of the ADC may also suit a digital PEP power meter application.

Though the capability of the chip and the complexity of configuring it much greater than the 8bit chips in Arduino, the very capable debugger makes it suited to complex / high performance projects.