Hello guys,
In this video, I am gonna teach you one of the most precious, cheap and effective technique to generate frequency using PIC16F877A microcontrollers. Programming language used is MikroC for PIC.
PWM stands for Pulse Width Modulation, it finds its huge application in the field of robotics beacuse speed control of DC motors is very crucial in robotics. Thats why we use PWM in these type of projects. Apart from them it has great application in the field of manufacturing power supplies. Switching power supplies are very common nowadays and they all work using PWM techniques.
Become a Patreon and support my channel using link below:
patreon.com/us...
Note: In the description I cannot write divide sign so i am gonna write
divide in English there, you have to replace it with proper sign as shown in the video aswell.
MikroC for PIC code being used in the video is as under:
int count;
int read1;
int conv1;
void main() {
ADC_Init();
Delay_ms(500);
PWM1_Init(5000);
Delay_ms(500);
while(1)
{
read1 = ADC_Read(0);
delay_ms(100);
conv1 = read1 divide 4.1;
delay_ms(50);
PWM1_Start();
delay_ms(20);
PWM1_Set_Duty(conv1);
delay_ms(100);
}
}
28 авг 2024