Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

c code for PWM generation using 16f877a :

Status
Not open for further replies.

arulvallavan

Newbie level 4
Joined
Feb 17, 2012
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
coimbatore
Activity points
1,322
am using ccs compiler n tinybld win boot loader for my controller16f877a..my clock is 11mhz..i need c code for generating PWM...am new to tis pic pgming..plss help me out !!!

thank u all frs !!!!

--regards
ARUL
 

50% duty cycle
Code:
#include <16F877.h>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=11MHZ)
#bit a=6.0


main()
{



set_tris_a(0b00000000);
while(1)
{
a=1;
delay_ms(500);
a=0;
delay_ms(500);
}
}
 
thnk you so much hssn601....ill try this n let u know :) cheers !!!!

---------- Post added at 17:54 ---------- Previous post was at 17:53 ----------

thnk you dude engshahrul :)
 

Hi friend,
It seems to be a useful tutorial. But I am not able to understand it as it is written a language which i dont know.. Can I get its english version??

Regards,
jis
 

Hi friend,
It seems to be a useful tutorial. But I am not able to understand it as it is written a language which i dont know.. Can I get its english version??

Regards,
jis
It's easy, you can use google translate. Then the C code is C language, no need translation.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top