Comments on: Generating PWM with PIC Microcontroller using CCP Module https://electrosome.com/pwm-pic-microcontroller/ You Inspire.....We Create..... Sun, 11 Dec 2022 10:03:25 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Ligo George https://electrosome.com/pwm-pic-microcontroller/#comments/10144 Sun, 11 Dec 2022 10:03:25 +0000 https://electrosome.com/?p=3293#comment-10144 In reply to Khairul.

Thanks for helping others.

]]>
By: Khairul https://electrosome.com/pwm-pic-microcontroller/#comments/10134 Thu, 03 Nov 2022 20:00:55 +0000 https://electrosome.com/?p=3293#comment-10134 In reply to Virender Kumar.

current_duty_1–; => wrong
current_duty_1––; => true

]]>
By: Virender Kumar https://electrosome.com/pwm-pic-microcontroller/#comments/6981 Fri, 12 Jan 2018 11:28:00 +0000 https://electrosome.com/?p=3293#comment-6981 HI,
I have programmed the pic16f88 the below program. Pin RA0 & RA1 are connected to 2 push buttons for increment or decrement the Pwm & Pin RB0 is used for ccp1 out & connected to Led . After powering the circuit i can see the pwm on RB0 Led and on scope also but no change happens after pushing 2 push buttons … Can you please help ? Internal Oscillator frequency is set to 8 Mhz.

void main()
{
short current_duty_1 = 16; // initial value for current_duty_1

TRISA = 0xFF; // PORTA as input
TRISB = 0x00; // PORTB as output

PWM1_Init(5000); // Initialize PWM1
PWM1_Start(); // start PWM1

PWM1_Set_Duty(current_duty_1); // Set current duty for PWM1

while (1) // endless loop
{
if (!RA0_bit) // if button on RD0 pressed
{
Delay_ms(40);
current_duty_1++; // increment current_duty_1
PWM1_Set_Duty(current_duty_1); //Change the duty cycle
}

if (!RA1_bit) // button on RD1 pressed
{
Delay_ms(40);
current_duty_1–; // decrement current_duty_1
PWM1_Set_Duty(current_duty_1);
}

Delay_ms(10); // slow down change pace a little
}
}

]]>
By: harun kürk https://electrosome.com/pwm-pic-microcontroller/#comments/6960 Mon, 18 Dec 2017 16:19:00 +0000 https://electrosome.com/?p=3293#comment-6960 hello sir can we use this code for half bridge mosfet driver

]]>
By: Mark Alfeche https://electrosome.com/pwm-pic-microcontroller/#comments/6801 Fri, 16 Jun 2017 15:37:00 +0000 https://electrosome.com/?p=3293#comment-6801 Sir our thesis is all about buck-boost converter using pic16f877a..can you help me how to use the pins on that microcontroller so that the switch of our microcontroller is that pic

]]>
By: Rolando Aguilera https://electrosome.com/pwm-pic-microcontroller/#comments/6792 Mon, 05 Jun 2017 19:06:00 +0000 https://electrosome.com/?p=3293#comment-6792 Do you know how to generate SPWM with a TI microcontroller?

]]>
By: Phunsukh Wangdu https://electrosome.com/pwm-pic-microcontroller/#comments/6738 Sat, 08 Apr 2017 12:21:00 +0000 https://electrosome.com/?p=3293#comment-6738 Please help me…i want to control light brightness by using PIC Micro
controller with button (PWM)..I found this in your site. Why my LED
always blinking…in oscillation PWM working. Please give me a proper
solution or give me a source code for light brightness control PIC with
push buttons

]]>
By: nj https://electrosome.com/pwm-pic-microcontroller/#comments/6726 Sat, 01 Apr 2017 14:21:00 +0000 https://electrosome.com/?p=3293#comment-6726 in which software i do the programming

]]>
By: eee angels https://electrosome.com/pwm-pic-microcontroller/#comments/6673 Wed, 01 Mar 2017 09:47:00 +0000 https://electrosome.com/?p=3293#comment-6673 how to generate 3 different delayed pulses to switch on 3 mosfets in micro c?

.

]]>
By: Umair Rehman https://electrosome.com/pwm-pic-microcontroller/#comments/6665 Wed, 22 Feb 2017 21:41:00 +0000 https://electrosome.com/?p=3293#comment-6665 Do anybody have a code for PLECS [C-subscript] for PWM generation of three phase induction motor?

]]>