PWM motor control using 8051 microcontroller

Thread Starter

rahul411

Joined Feb 19, 2018
260
I'm working on a project which will use 8051 microcontroller to control a dc motor for this I'll be using PWM. I have code for the same, which i found on internet. Running the code on software was easy but how do i implement the same on hardware (i can't use ready-made kit to run it as per the instructions given by the college). Code is attached below. We can change the duty cycle by changing the value of msec but how to change duty cycle using potentiometer just like what we do in other circuits.
I have the schematic of the 8051 dev board...
How to upload the code on the board and control the speed of motor?
 

Attachments

danadak

Joined Mar 10, 2018
4,057
The board schematic shows jumper for programming, board manual should
cover this. Assumption made is board as shipped has an 8051 with a bootloader
already programmed into it. That will facilitate programming. There should also be
a discussion in manual on how to update bootloader if necessary.

What 8051 chip part number is on board ?

Normally one takes A/D value and writes that to PWM compare register to
control duty cycle.

Regards, Dana.
 
Top