Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 5th April 2008, 04:46 PM   (permalink)
Experienced Member
raviram87 is a jewel in the roughraviram87 is a jewel in the rough
Default PWM feature doubt

i was working on producing a carrier wave using the PWM feature of the PIC16f877a...

however i have few doubts on this.... i have used the PWM calculator provided by http://www.micro-examples.com for calculating the values to be loaded on to various registers....

i obtained the values and verified that they are correct using the formulas given in the datasheet... however i noticed the follwing written...

ENSURE THAT THE PWM PIN IS CONFIGURED AS DIGITAL OUTPUT...

what is the meaning of this statement? i will be taking the PWM output from pin number 17(CCP1)... do i have to include any specific statement in my code to do the above??
raviram87 is offline   Reply With Quote
Old 5th April 2008, 04:47 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

You have to set the TRIS on that pin to 0 (zero)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 6th April 2008, 03:09 AM   (permalink)
Experienced Member
raviram87 is a jewel in the roughraviram87 is a jewel in the rough
Default

many thanks...

i will be using this carrier generated at CCP1 pin to modulate few data pulses i will be producing at pin number 21 (RD2) of the 16f877a....

in that case should i configure that pin (#21) as digital output also?

when i am using CCP1 pin... what should be done with the CCP2 pin (#16)...
raviram87 is offline   Reply With Quote
Old 6th April 2008, 03:56 AM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

Unless you set CCP2 to run as a second PWM channel you can just treat it like any other I/O pin.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
PWM Period & CCPR1L Questions Suraj143 Micro Controllers 9 26th March 2008 12:06 PM
PWM signal problem iznalgnaij Robotics Chat 4 25th March 2008 12:40 PM
PWM algo fusian Micro Controllers 1 18th March 2008 03:41 AM
PIC PWM outputs? Andy1845c Micro Controllers 33 30th November 2007 03:06 AM
PWM using software AtoD jeremygaughan Micro Controllers 11 27th November 2007 11:11 PM



All times are GMT. The time now is 03:02 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.