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

PIC18LF4525

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



Joined: 22 Dec 2004
Posts: 78

View user's profile Send private message

PIC18LF4525
PostPosted: Mon May 23, 2005 4:38 pm     Reply with quote

Hi...

My program that calculates the input frequency using CCP2 i.e RC1 PIN
on PIC18F4525 works fine. But if we use PIC18LF4525 then it is showing
wrong frequency. Yes, I have set configuration bit for RC1 to be used as
CCP2.

Is there any different thing, we have to do to work with PIC18LF4525.
The Vdd we used is same for both no change in any voltage level.

Thanks.....
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon May 23, 2005 5:31 pm     Reply with quote

You didn't tell us much. What voltage is the LF PIC running at ?
What crystal frequency is used for the LF PIC ?
prayami



Joined: 22 Dec 2004
Posts: 78

View user's profile Send private message

PostPosted: Mon May 23, 2005 5:36 pm     Reply with quote

I used 5V supply voltage. And 10Mhz crystal with PLL so 40MHz clock
freq. I used same for both circuit.

Thanks...
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon May 23, 2005 5:49 pm     Reply with quote

Maybe it doesn't have anything to do with LF vs F but maybe it has to do with the rev of silicon. Read the errata on microchip's website. That's about all I can offer since you didn't post a test program.
prayami



Joined: 22 Dec 2004
Posts: 78

View user's profile Send private message

PostPosted: Mon May 23, 2005 6:47 pm     Reply with quote

Here is the program that I have just tested to check output waveform
on PIN C5. What I find here, There is no output on PIC18LF4525. But On
PIC18F4525, it is fine.

Is there something differ in configuration bits..?

Quote:


#CASE
#include <18F4525.h>
#fuses H4,NOWDT,NOPROTECT,NOLVP,BROWNOUT,PUT,NOPBADEN,NOXINST,NOMCLR
#use delay(clock=40000000)

int1 HighPulse=0;
unsigned int8 x;

#int_ccp2
void ccp2_isr()
{

if(HighPulse==0)
{
output_high(PIN_C5);

HighPulse=1;
}
else
{
output_low(PIN_C5);
HighPulse=0;
}//if(HighPulse==1)


}//#int_ccp2


void main() {


set_tris_c(0x9F); //C5-C6 output

setup_ccp2(CCP_CAPTURE_RE); //For AFM Module

enable_interrupts(INT_CCP2);
enable_interrupts(GLOBAL);




while(TRUE) {

x=10;

}//while(TRUE)

}//main
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