Previous Tutorial Tutorial 0 Next Tutorial Introduction To PIC MCUs Tutorials Introductory Level ★☆☆☆☆

Hello and welcome to the Embedded Systems course with Microchip PIC microcontrollers. This series of tutorials is dedicated to teaching you the basics of embedded systems development using the Microchip PIC MCUs as a platform for practical experimentations. In this series, you’ll start learning the very basic concepts in pic microcontroller programming to the advanced ones. However, there are some prerequisites indicated below that are assumed to be fulfilled.

Well, you can jump straight to the TOC (table of contents) at the end of this post. But I encourage you to read the following sections just to make sure that these tutorials are gonna be beneficial for you.

Prerequisites

While creating these materials, I assumed some basic knowledge in some areas are already existent and well-covered by all of you. The assumed basic knowledge includes:

Basic circuits & electronics knowledge (Circuit analysis laws, resistors, diodes, transistors, etc.)

Digital electronics fundamentals (Numbering systems, Logic gates, etc.)

Basics of C programming language (Data types, operators, flow control, functions, etc.)

However, many of these topics may be presented and developed from the scratch occasionally. But this is not always the case, so it’s highly recommended to have the basic background in each of these areas anyway before starting any sort of embedded systems training.

Note Anyway, these are just my recommendations for all. Obviously, you can start right away and make sure to ask about whatever you see is an ambiguous or unclear concept.

Target Audience

This course is aimed at a wide range of learners as it starts from the very basic concept all the way to the advanced ones. Which could be substantial in many situations. The audience may include but not limited to the following cases:

Engineering student looking forward to learning something new and discover if you’re passionate about this or not.

High-school student learning some hardware stuff to create side projects or DIY projects for your school activities or competitions.

Freelancer firmware engineer looking for specific technical tutorials to perform some tasks in your job.

Professional engineer looking forward to learning a new platform on the side.

Well, there are many situations indeed in which you may find these materials beneficial for you. But generally speaking, if you love programming, hardware, and robotics, you may find this series a very helpful one.

Which Microcontroller To Learn First?

or equivalently

Why learn PIC MCUs Programming?

There are actually dozens of embedded development platforms that you can learn how to use for practicing embedded programming through your learning phase. As you might know, not all platforms are targeted to the same user segment.

Using too sophisticated cutting-edge tools as a starting point may cause you too much frustration and overhead. On the other hand, using hobbyists prototyping kits may not help you much in pursuing a professional career. The tools we use somehow affect the way we do things.

However, an engineer must not be defined with the technological tool he uses. You know technology (platforms) changes too quickly. Hence some technical information while being useful (profitable) today, it gets outdated in a few years.

Compare this to the ability to analyze, design and consistently deliver embedded solutions on time and on budget. These skills are the only thing that deserves your attention and effort. That’s why you should not care too much about which platform to learn first (e.g. AVR, PIC, Arduino, ARM, or whatever) it’s not that kind of a big deal.

Here I will explain why one may go with the Microchip PIC option and give it a shot.

Engineers do more with less!

Is it a good idea to learn PIC MCUs nowadays? Is it still used at the production-level? Is it worthy anyway? shouldn’t I go for an Arduino or Rpi or any fancy stuff around there? Well, I will put all these questions and others to an end. I hope to clarify everything, you may be wondering about. But first, let me tell you a real-life example story!

I still remember a past interview in which some fresh embedded engineers were asked to give a suggestion about what to use in the following situation. We’re about to create a spacecraft that takes off, lands and orbits safely, any ideas? The majority of them gave specifications like 1GHz with decent 500MB memory and so on. The next question was “if we only have 1MHz with 512KB memory, can we still get anywhere?”. The common answer was a big NO!

Well, the 1MHz with 512KB memory were far away greater than the specifications of the IBM AP-101 Flight controller. Which ran @ less than 1MIPS with few KBs of memory. This was the computer used by the F-15 fighter, B-1 bomber and NASA’s space shuttle program!

It takes an engineer to perform such daunting optimization tasksClick To Tweet.

Technology -platform’s brand (e.g. AVR, Arduino, PIC, ARM, etc.)- has nothing to do with the underlying fundamental concepts that technically drive these machines. Which you’ll be learning in this route. And that’s why you shouldn’t abandon what others describe as obsolete just only for the sake of it. It’s amazing how much you learn when you play around with moderately old machines as long as they have concise clear documentation.

Microchip PIC VS Prototyping platforms

Well, it’s really recommended that you go for an Arduino or Rpi or whatever prototyping platform in case you aren’t pursuing a firmware career. But if you’re willing to work in the embedded industry as a firmware engineer, then invoking pre-built Arduino functions, sketches and libraries will take you nowhere further. However, these tools can be used in a very effective way. It’s only if you’re building everything from scratch yourself. And yes, re-invent the wheel. Please, just do it.

Hint If all human beings were satisfied with the old wheel and none of them had attempted to re-invent it in a new manner, we may not have ended in this age of technology.

a very basic platform will give you the chance to understand the underlying concepts and mechanics of the low-level hardware. And of course to develop your own libraries, drivers and so. This is what enhances your embedded software career in the long run.

Microchip PIC VS Production-level platforms

There is nothing could be compared to the ARM-based devices in the embedded market in terms of performance. However, some other platforms from other manufacturers are being shipped and used in many situations but obviously not comparable to the 32-Bit ARM cores specifically in the high-end devices. That’s why you must consider learning ARM programming and interfacing at some point in your path.

There’s no doubt that a 32-bit MCU delivers higher performance than an 8-bit device, but the engineer faces the traditional decision of choosing between the best available device in the market versus an application’s actual needs. Here is an old forecast back in 2014 which confirms all 8-Bit MCUs have the lion’s share of the embedded systems market in terms of shipments and revenue in Million dollars.

Semiconductor MCU revenue market forecast in millions of dollars 2012-2017. Image from electronicdesign.com

Up till 2017, the 8-Bit MCUs are slightly ahead. Note that this is an old forecast and the numbers are a bit changed but you’ve got the point of it. Since the 8-bit MCUs cost substantially less, their actual numbers still far exceed the 32-bit devices. And Microchip is the leading producer of 8-bit microcontrollers (PIC+AVR).

On the other hand, a typical datasheet for an ARM core may be in the 1500 pages long-range. Yes, it’s more complicated than AVR, PIC and other platforms. That’s why a beginner should start with a much simpler platform from Microchip that may have about 200 pages datasheet.

The Bottom line

Every single microcontroller has some sort of Input/Output ports, with serial/parallel communication peripherals, internal/external memory interfaces, interrupts circuitry and some extra peripherals and features. All of which operate similarly on all platforms anyway.

Actually, Timers, USART, I2C, SPI and other peripherals are the same things whether you’re using a PIC or an AVR, Who cares? if you are familiar with one platform, you’ll find it very easy to translate your experience to another one maybe an ARM, AVR or whatever. Just take the time and effort to master a single platform then moving to another will be a matter of few days flipping through its datasheet.

Note The process of translating your coding files, projects or so from one platform to another is called Porting.

If you’re still wondering if X microcontroller is still used in the industry or not?

Then, the answer is YES. If the manufacturer is still supporting and producing that device, there should be a market for it. There is a microcontroller for every situation!

Aggressively pushing an energy-hungry 32-Bit high-end core in any embedded device is not as much efficient as it seems to be. There are countless situations where preserving the battery life is the number 1 priority.

Required Hardware Kit

Here is a brief of the hardware development kit we’ll be using through this series of tutorials.

MCUs Sensors Modules/Interfaces Actuators PIC16F877A Ultrasonic Relays DC Motors PIC16F628A Temperature LCD Stepper Motors PIC18F4550 Pressure USB-TTL Servo Motors PIC18F2550 IMU Bluetooth Speakers And much much more…

This is actually a non-exhaustive list to only give you an idea about what we’ll be doing through these tutorials. And which MCUs we’ll be using specifically. In most cases, it’s going to be the classic PIC16F877A chip.

The Full Course Kit

You’ll find the express full course kit components and their quantities all listed down in the resources page associated to this course. just click the link down below.

There exist several software toolchains that are being used for developing Embedded-C project with the Microchip PIC MCUs. Many of them are paid services and there exist some pirated versions for them. But we’ll stay away from all these stuff. We will be using the original free tools from Microchip which is the supplier of PIC MCUs as well.

IDE MPLAB IDE (Any Version) Compiler XC8 (Any Version) Simulator Proteus ISIS (Any Version) Flasher Depends on your hardware programmer kit (I use PICkit2, 3)

The download links and installation instructions are all discussed in detail within the following tutorial. The list above is for identification purposes only.

Table Of Contents

Below is the numbered TOC for this series of tutorials. It’ll be consistently updated for new publications.

(1st Edition)

Core Content

1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16 17 18 19 20 21

(2nd Edition)

More Advanced Interfacing

22 23 24 25 26 27 28 29 30 31 32 33

You don’t have to refer to this page frequently as you can use the navigation arrows in the Header & Footer of each tutorial.

Share this: Print

Facebook

Twitter

Telegram

Tumblr

Skype

LinkedIn

WhatsApp

Reddit

Pocket

Pinterest



Like this: Like Loading...