Posts

Showing posts from 2016

Beginner's Guide to PIC Microcontrollers

Image
Introduction to PIC Microcontrollers Introduction PIC Microcontrollers have been the very first microcontrollers I worked with. I started with the venerable 16F84 and I have worked with a lot of other PIC devices since then. The aim here like my other posts is to give an idea of the implication of working with such devices. So basically what is a PIC Microcontroller, well its another microcontroller available on the market made by Microchip. PIC Microcontrollers are available in a wide variety of offerings namely 8bit, 16 bit or also called DSPIC and 32 bit. Don't get scared here on the number of bits they are actually the size of instruction that the microcontrollers can process. 8bit microcontrollers are out there and performing very complicated tasks. Microchip enhances all their portfolio offerings regularly to make sure their microcontrollers keep up to the job. From a hobbyist point of view there seems to be some models which are very popular mainly the through hole p

Writing code for the STM32

Writing Code for the STM32F Introduction Following my previous post on setting a project and all the necessary files for an STM32F, I will now guide you to setup the code that needs to be written. In case you get lost in the steps below please refer to the following post Introduction to STM32F   All the code will be placed in the files which were created in Introduction to STM32F  will be reused here. Before we start writing any code, first you need to understand how everything will be structured. Below is a summary of how the code will be organized:   Preparing to write the code In order to code the STM32F C programming language will be used. In C programming language we don't write all the code in a continuous set of lines in a single file. This makes the code difficult to maintain and re-use. The proper way to proceed is to first decide what the microcontroller needs to do. For this post I will keep things simple I just want to make pin PB8 an output and then ma