Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
PIC16F877A's PWM generation using MikroC for PIC tutorials.

PIC16F877A's PWM generation using MikroC for PIC tutorials.

Pulse Width Modulation (PWM) with PIC16F877A Microcontroller Using mikroC
Last updated 6/2025
English

What you'll learn

  • You will learn how to write a code to generate PWM from PIC16F877A's PWM pins.
  • Programming PIC to control speed of DC motor using transistor and a DC motor.
  • Generating PWM using PIC16F877A microcontroller to control brightness of an LED.
  • Generating PWM from PIC16F877A by utilizing the input of a joystick to drive a DC motor.

Course content

4 sections14 lectures3h 11m total length
  • Why PIC16F877A ?10:14
  • Introduction to PIC16F877A.7:00
  • Counting useful pins in the PIC16F877A microcontroller.10:13
  • How read datasheet of PIC16F877A.10:20
  • Setting up a PIC16F877A for programming.8:05

Requirements

  • Beginner level with an intrest in developing commercial products using PIC microcontrollers.

Description

Pulse Width Modulation (PWM) with PIC16F877A Microcontroller Using mikroC

Welcome to Learning Microcontrollers, your go-to resource for mastering embedded systems through real-world applications and step-by-step tutorials.

In this course, you will learn how to utilize the PWM (Pulse Width Modulation) functionality of the PIC16F877A microcontroller using the mikroC for PIC compiler. PWM is a powerful technique used for controlling the speed of motors, dimming LEDs, and managing other devices that require variable power control.

The course begins with an essential foundation in microcontroller theory, introduces you to the PIC16F877A architecture, and helps you get started with the development environment. From there, you’ll dive into practical, hands-on projects that teach you how to generate and control PWM signals for a variety of real-world applications.

What You Will Learn

  • Understand what PWM is and how it works at the hardware level

  • Explore the architecture and pin configurations of the PIC16F877A

  • Set up the mikroC for PIC compiler and the PICKIT 3 programming tool

  • Use the built-in PWM library in mikroC to generate precise PWM signals

  • Control the brightness of LEDs and the speed of DC motors using PWM

  • Interface input devices (like potentiometers, push buttons, and joysticks) to control output behavior

  • Integrate motor drivers such as the L298N H-Bridge for motor control

  • Apply PWM in practical scenarios such as throttle control and analog input conversion

Why PWM?

PWM (Pulse Width Modulation) allows digital systems like microcontrollers to simulate analog behavior. It’s essential in applications such as:

  • Motor control (speed regulation)

  • LED dimming

  • Servo positioning

  • Audio signal modulation

  • Power delivery control

With mikroC’s built-in PWM library, implementing PWM-based control becomes intuitive and flexible, even for beginners. Once learned, these techniques are transferable to other microcontrollers supported by mikroC (such as PIC18, PIC12, and dsPIC families).

Course Highlights

This course focuses on practical implementations using the PWM module of the PIC16F877A. You’ll write working C code, simulate logic, and apply concepts directly to hardware using tried-and-tested examples.

Course Structure

Introduction to PIC16F877A microcontroller.

Lecture 1: Why PIC16F877A ?

Lecture 2: Introduction to PIC16F877A.

Lecture 3: Counting useful pins in the PIC16F877A microcontroller.

Lecture 4: How read datasheet of PIC16F877A.

Lecture 5: Setting up a PIC16F877A for programming.

Downloading and Installing MikroC for PIC.

Lecture 6: Downloading and installing MikroC for PIC.

Dowmloading and installing PICKIT 3 software.

Lecture 7: Download and Install PICKIT 3 programming tool.

PIC16F877A based PWM generation tutorials.

Lecture 8: PWM library in MikroC for PIC introduction and demo code on PIC16F877A.

Lecture 9: Use potentiometer to control brightness of an LED with PIC16F877A.

Lecture 10: Button based brightness control of an LED using PIC16F877A mcu.

Lecture 11: Use PIC16F877A to control speed of DC motor using PWM pin.

Lecture 12: DC motor speed control using Potentiometer with PIC16F877A's PWM pins.

Lecture 13: Joystick based speed control of a DC motor using PIC16F877A's PWM pins.

Lecture 14: Throttle handle based speed control of a DC motor with PIC16F877A.


Who Should Take This Course?

This course is ideal for:

  • Electronics and electrical engineering students

  • Embedded system enthusiasts and developers

  • DIY hobbyists looking to control motors or LEDs in projects

  • Anyone seeking a practical understanding of PWM signal generation

  • Beginners who want to move beyond simple digital output into real-world analog simulation

Real-World Applications You’ll Be Able to Build

  • Variable-speed fan or motor controller

  • LED dimming systems

  • Motorized throttle systems for robotics

  • Analog-to-PWM conversion systems

  • Interactive control systems using sensors and input devices

Code Portability and Broad Device Support

The techniques taught in this course are not limited to just the PIC16F877A. Thanks to the standardized mikroC libraries, you can apply the exact same code to other PIC families (PIC12, PIC16, PIC18, etc.) by modifying only the pin declarations and clock configurations. This makes your knowledge portable across hundreds of devices.

Instructor Support

You are never alone in this learning journey. If you face any issues with hardware connections, coding errors, or project implementation, feel free to reach out for help. All questions are welcome and will be answered promptly.

Start Building PWM-Controlled Projects Today

Whether you want to control a motor, fade a light, or build responsive embedded systems, PWM is a critical skill every microcontroller developer must master.

Enroll now and start building your own dynamic PWM-based projects with the PIC16F877A microcontroller and mikroC. This course will turn theory into working systems, one pin at a time.

Who this course is for:

  • Anyone who have interest in microcontrollers.