CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

A question about ECCP[Solved]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lokken



Joined: 21 Feb 2010
Posts: 17

View user's profile Send private message

A question about ECCP[Solved]
PostPosted: Mon Jan 31, 2011 2:25 am     Reply with quote

Does PWM frequency reduce in ECCP mode?
I calculated the PWM frequency as 20 Khz.
I wrote this code shown below. But I get 5khz signal at the output of the P1D. Is it normal?
My codes; (My compiler version is 4.114)
Code:

#include <18f14k50.h>
#include <PIC18f14k50_registers.h>
#FUSES NOWDT,INTRC_IO,NOPUT,NOBROWNOUT,NOLVP,NOCPD,NOMCLR,NODEBUG                 
#use delay(clock=4000000)

void main()
{
   TRISC=0b00000010;
   PORTC=0;
   t2con=0b00000100;
   ccp1con=0b00001100;
   pstrcon=0b00001000;
   pr2=50;
   CCPR1L=10;
   while(true){}
   }
   

Thanks


Last edited by lokken on Wed Feb 02, 2011 9:52 am; edited 1 time in total
lokken



Joined: 21 Feb 2010
Posts: 17

View user's profile Send private message

PostPosted: Wed Feb 02, 2011 8:12 am     Reply with quote

Is there anyone to answer my question?
temtronic



Joined: 01 Jul 2010
Posts: 9204
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Feb 02, 2011 9:00 am     Reply with quote

1) Is this a real chip with a 'scope looking at the signal or a simulation(proteus ?)?

2) you should use the CCS functions for setting peripherals up, I doubt many will want to take the time to figure out what ,for example...ccp1con=0b00001100 translates to.
lokken



Joined: 21 Feb 2010
Posts: 17

View user's profile Send private message

PostPosted: Wed Feb 02, 2011 9:52 am     Reply with quote

Ok I solved. It is all about my PIC programmer. Thanks for consideration.
chungtn



Joined: 25 Jun 2010
Posts: 3

View user's profile Send private message

How to setup ECCP modul of 16f716
PostPosted: Thu Aug 18, 2011 12:55 am     Reply with quote

I don't know how to setup ECCP module.
Can you give me a sample program or help me setup this?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 18, 2011 1:53 pm     Reply with quote

1. What ECCP mode do you want ? Full-Bridge, or Half-Bridge, or what ?

2. What is your CCS compiler version ?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group