Getting Started! Setup the IDE and establish a link to the ARM Microcontroller.
After you get familiar with the powerful ARM microcontroller, you will need to set up your IDE (Integrated Development Environment) where you do the programming and the communications link to the microcontroller. The Sketch Environment is cool and all, but there are a wealth of other IDEs out there that you can use to code. I only show you one way, using the CoIDE by CooCox. This IDE is based around Eclipse, but makes it a bit easier to start.
You will also need to get familiar with the device (ST-Link) used to flash the microcontroller. It's a bit different than the Arduino where you simply plug the USB into the board (the stuff that you would need to remove for your consumer product anyway).
Starting a new projects is only a few clicks. Note: when adding the libraries, you will see the main library with the _boot suffix. That has been changed to _CUBELIB.
Here is the first part where you really get your hands dirty! The development environment is setup, it's now time to setup the physical environment.
Get our feet wet! Let's start Coding and Seeing Real Output
Starting with the GPIO is the easiest and will get you familiar with register level code writing. Don't let the register thing scare you. Imagine you are in front of a big control panel and everything is labeled for you. You will be turning on and off those switches (bits) on sets of controls (registers). Some of the registers relate directly to the actual pins of the ARM microcontroller and some of the registers control the way the pins work, or how internal features of the chip work.
Issues that you may encounter.
Let's say, you made this awesome program, but you accidentally programmed the programming pins (the pins that are used to flash the chip) as GPIO or other non-programming function. I will post any videos here that relate to solving such problems.
Basic GPIO Input
What good is a device if you can't interact with it. Push buttons are typically the next components to introduce since it will allow you to provide some type of input. Moreover, it allows you to receive information into a pin as a pulse. Lots of external devices make pulses, so it's a great early concept to learn.
GPIO Input Push Button Debouncing
Input signals are pretty good by themselves, but when a mechanical device, like a push button, is the mechanism that creates this input signal, sometimes the contact that the push button uses will create some bouncing. Electronic current flow is far faster than mechanical real world devices, and the sensitivity with electronics will pick up even the slightest peculiarities.
In part 1 and 2, I investigate ways to eliminate debouncing using code rather than components.
Interfacing an LCD to the ARM Microcontroller
Continuing with GPIO, the LCD is the natural next step. To make the LCD function, you only need to use the GPIO pins. By now, you are experts at GPIO, so let's get started. I will start by introducing the concept of how we want to use the pins of the microcontroller and we tackle the challenge of using a 5v device (the LCD display) and connect it to the ARM Microcontroller. There may be many parts, but you are learning valuable concepts, not just how to add an LCD to the Microcontroller.
ADC - Analog to Digital Conversion
Measure the output of sensors and gather other environmental data using the ADC feature of the STM32 Microcontroller. These videos will demonstrate the ADC features of the ARM Microcontroller and introduce you tothe concept of inputting analog signals and how it works.
Setting up the first circuit and prepart for the first ADC program:
Calibrating the ADC