Objectives

This subject demonstrates the utility of microcontrollers, focusing in:

  • Understanding the internal architecture of microcontrollers;
  • Programming microcontrollers using "Assembler" language;
  • Usage of an integrated program development environment - MPLAB;
  • Learning how to transfer a program to the microcontroller's flash memory;
  • Utilization of digital inputs and outputs of microcontrollers.
  • "Assembler" Projects

    Assembly language is the most basic form of programming in the microcontroller, where communication is sent through bits to the hardware. The following programs were developed in Assembly language and performed on a Microchip PIC16F877:

  • Control a water tank level w/ Hardware: breadboard, microcontroller, voltage regulator, 2 LEDs; 2 resistors;
  • Digital termometer w/ Hardware: thermocouple, operational amplifier, microcontroller, 3 LEDs, some resistors;
  • "C" Projects

    Using a different compiler ("MPLab XC8" in this case), it is possible to program in "C" language instead of "Assembly". It is more practical and provides extra functionality, enabling the development of the following programs (Microchip PIC16F877):

  • Digital termometer: microcontroller, PICDEM 2 plus board, Rs232 cable;
  • Stepper motor control: microcontroller, stepper motor, switches, potentiometer;
  • DC motor control: microcontroller, dc motor, H bridge circuit, potentiometer, 2 switches;
  • Rs232 supervision: microcontroller, MAX232 converter, Rs232 cable, computer with Hyperterminal;
  • Electronic controller: microcontroller, incremental encoder, stepper motor;
  • SPI communication: "C" code only
  • I2C communication: microcontroller, PICDEM 2 plus board, Rs232 cable;
  • Project Gallery

    In this section there is a set of pictures showcasing some of the diagrams/schematics for the programs.

    Conclusion

    This subject provided tools to control and activate many different systems using a very powerful yet small device. It proved that anyone with electrical and programming competencies can control such systems using microcontrollers. It has also provided important knowledge concerning communication protocols and how data flows in the studied electronic circuits.

    "C" Programming

    Code for microcontroller programs

    Control and Actuation systems

    Setting up circuits controlled by a microcontroller.

    Autonomy