Search Engine

73 Threads found on Pwm Code For Pic
i am using pic 16f877a and i want to use pwm to control my output voltage using buck converter and i have sucessfully tested pwm and lcd (separately) and it works fine but when i start pwm(PortC) and lcd on PortD then pwm works sucessfully but lcd doesnt display anything. kindly help me in mentioning what (...)
thanks for that it helps a lot :D and now the motor is running CW and CCW but another problem is that how can i limit the speed of the motor ? i see some people that use arduino uses POT to limit it but how can i use it in pic ? thanks Speed of bldc is depend on current or voltage of windings. You can cont
/* Frequency 8Mhz */ void main() { PORTC=0; //Clearing output port TRISC=0x00; //Initialising C port as output T2CON=0; //Prescaler for timer (1:1) Timer2 off CCP1CON=12; //Initialising ADC TMR2ON_BIT=1; // Turning On timer 2 PR2=199; // Setting Time period/Frequency CCP
Hello there,I am trying to generate an Spwm signla which must be used for controlling an H-bridge but I am not succeeding;I used Tahmid blogs but I am not getting the point on calculation of the following values: SET_FREQ= PR2= TBL_POINTER_SHIFT = TBL_POINTER_NEW >> 13; Wan you please help me to think about that issue? I am using a quartz
Can any one tell me how can i generate 50 Hz pwm with vary duty cycle as ouput of 2 pins using any16f pic with mikroc ... any source example would be helpfull.. thanks in advance...
hi this is shre naik m doing speed control of 3 phase induction motor using single phase 230 volts,50hz supply. i wanted assembly language code for generation of 3 phase pwm signals(6 pwm) to be given to IGBT inverter i am using pic p18f4431,supply frequncy 50 hz,switching (...)
Hey, I wanted to trigger mosfets using pwm from pic 16F877A .The pwm is supposed to oscillate at 50Khz with the duty cycle of about 50 %.I want to draw four pwm signals from the pic MCU that are apart from each other by 10 micro seconds.But i am unable to achieve the required duty cycle and frequency (...)
I have asm program for generating pwm for pic18f452, i have checked it in proteus and it is working fine. But i dont kno why i am not getting any output when i implement it on hardware. here is the program. LIST P=pic18F452, F=INHX32, N=0, ST=OFF, R=HEX #include P18F452.INC CONFIG (...)
hi i m a newbie at pic programming but i m doing a project on 3ph BLDC sensorless drive for which i need to generate pwm code for 3ph bridge ie. 6 PULSE pwm code.I m using pic18f4520,pwm freq is 50HZ,crystal is of 20MHz...can you please give (...)
Hello friends, I have small application of Generating 38KHZ Frequency for IR Application. I want to use pic12F675 and it doesn't have Hardware CCP Module inside the micro controller so i want to use Soft pwm for generating pwm Signal. I searched pic Library but i m not able to find the (...)
You are not so clear , you wrote : ADC is not working ... but now, it seems probleme is on pwm output.. is it ? Try to replace the driving (ADC result) value for pwm by a fixed value, instead of ADC measurement to only test the pwm .. void Tempo( unsigned long L) { while(L>0) { L--; } } void main() { unsigned (...)
Hello everybody I'm facing with a problem in my H bridge design. I am using pic 18F45K20 Microchip Controller along with BJT tranzistors to make a servo direction for a 5V motor. Everything is fine but i can't get around with C code for microcontroller. I'm using C18 Compiler. I want to get the signal from a (...)
HI, Here is the c code for pwm generation using pic16f72 /***************************************************************************** 1)The Timer2 module has one source of input clock, the device clock (FOSC/4). 2)The postscaler counts the number of times that the TMR2 register matched the PR2 register 3)Changing (...)
To better Understand the pwm Techniques , search in this forum for: 1-pic16F72 code and schematic for sine wave inverter. 2-pic 16f876a Pure Sinewave inverter there are a lot of useful information and then do your own analysis to combine the ideas (...)
You have to use pwm for speed control and bi directional motor to change the direction.
Hey guys, i am a beginner in micro-controller, i want to know how to use pic 18f4431 to generate pwm on six pins to control the switching on and off the 6 mosfets of my 3Ph inverter. I use pic c compiler and i couldn't understand so much the help -> directory file in the pic c. so i would be thankful if anyone could help (...)
Hey guys, i try to make a code in mikroC but i can make the PID controoler to work. ok here is the code to genetare pwm and control the duty cycle. code: Select all unsigned short DutyCycle=0; unsigned int adc_value; void main() { pwm1_Init(10000); pwm1_Start(); (...)
To control the speed, pwm is the easy and efficient method. Here you can find a circuit and an example code for DC motor control with pic16F877A, using pwm. While the program has been written for mikroC compiler, you should have no problem in "porting" it to CCS. From there: (...)
hai,I am new to pic it possible to use the 2 pwm channls in pic 16f877A simultaneously?i have a code for pwm in ccp1 module.I want two pwm for controlling two motors.How can i use ccp2 in pwm mode?I use MPLAB IDE,HI TECH C complier....pls (...)
Successfully simulated the following code for normal pwm (ccp1) in Proteus. How ever I m interested to use the ECCP capability of pic18f4520 and Tried all the configuration modes given in the CCs c manual, but could not get pulses at the out put pins(P1A,P1B,P1C,P1D). In PROTEUS i connected (...)