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 CCS Technical Support

Search found 15 matches
CCS Forum Index
Author Message
  Topic: what is 18F4431 timer1's highest frequency?
Briany

Replies: 9
Views: 8175

PostForum: General CCS C Discussion   Posted: Tue Feb 03, 2009 8:00 am   Subject: what is 18F4431 timer1's highest frequency?
thx a lot. I've got it working now!

I do have to increase my crystal frequency from 20MHz to 40MHz though. For some reason, my 40MHz isn't giving me 40MHz on the CRO, but rather, 13.6MHz. So I'm ...
  Topic: what is 18F4431 timer1's highest frequency?
Briany

Replies: 9
Views: 8175

PostForum: General CCS C Discussion   Posted: Sun Feb 01, 2009 6:26 pm   Subject: what is 18F4431 timer1's highest frequency?
polling an interrupt flag without enabling it?

do you mean, I can poll it by creating a tight loop checking for the interrupt flag bit toggling? I've never thought of this method but it's definite ...
  Topic: what is 18F4431 timer1's highest frequency?
Briany

Replies: 9
Views: 8175

PostForum: General CCS C Discussion   Posted: Sun Feb 01, 2009 6:52 am   Subject: what is 18F4431 timer1's highest frequency?
woah Ttelmah,

thanks a lot for the reply.

I think your calculation of the instruction cycle is correct but the crystal is fine. 38.3 Hz is the frequency of the complete square pulse that the ti ...
  Topic: what is 18F4431 timer1's highest frequency?
Briany

Replies: 9
Views: 8175

PostForum: General CCS C Discussion   Posted: Sun Feb 01, 2009 2:44 am   Subject: what is 18F4431 timer1's highest frequency?
sorry, I didn't clear my test program enough for you guys. Being lazy is perfectly fine. Everyone should be lazy. :P

I've updated the program above, removed garbage etc.

anyway, I tested the ...
  Topic: what is 18F4431 timer1's highest frequency?
Briany

Replies: 9
Views: 8175

PostForum: General CCS C Discussion   Posted: Fri Jan 30, 2009 6:13 am   Subject: what is 18F4431 timer1's highest frequency?
I've been scratching my head for ages and hair's everywhere... What's the highest frequency for this damn timer?

for 18F4431, timer1 is a 16bit timer. The highest I've got is 22.5KHz... My 16F88 ...
  Topic: PIC18F4431 & QuadratureEncoderInterface Module on PCWH 4
Briany

Replies: 34
Views: 49565

PostForum: General CCS C Discussion   Posted: Fri Jan 30, 2009 6:00 am   Subject: PIC18F4431 & QuadratureEncoderInterface Module on PCWH 4
put this to your 18F4431.h file



//setting QEI

#define DISABLE_VELOCITY 0x80
#define QEI_OFF 0x00
#define QEI_2XINDX 0x04
#define QEI_2XPER ...
  Topic: use timer0 to gen 400KHz - need help
Briany

Replies: 6
Views: 5555

PostForum: General CCS C Discussion   Posted: Wed Jan 28, 2009 10:18 pm   Subject: use timer0 to gen 400KHz - need help
thanks a lot RLScott!

I have one last question.

is it possible to set up the hardware PWM off of a 18F4431 and set it to single shot mode to do that?

I've encountered problems with the single ...
  Topic: 18F4431 Power PWM single shot mode for data transmission
Briany

Replies: 0
Views: 2370

PostForum: General CCS C Discussion   Posted: Wed Jan 28, 2009 5:38 am   Subject: 18F4431 Power PWM single shot mode for data transmission
How do you setup the PWM single shot function to do data transmission?

I figured I've to use the int_PWMTB interrupt, but how do I re-enable the function and have it fire again?

I'm trying to op ...
  Topic: two quadrature encoders, one 18f4431, is it possible?
Briany

Replies: 9
Views: 6422

PostForum: General CCS C Discussion   Posted: Wed Jan 28, 2009 4:10 am   Subject: Re: ccp
hello briany
You mean one for up and other for down counting
regards
satish

no, I mean both on rising edge counting. but CCP1 for signal A, and CCP2 for signal B.
  Topic: two quadrature encoders, one 18f4431, is it possible?
Briany

Replies: 9
Views: 6422

PostForum: General CCS C Discussion   Posted: Wed Jan 28, 2009 3:25 am   Subject: two quadrature encoders, one 18f4431, is it possible?
I've never tried it, but the idea's been in my head for a bit.

What I was thinking is:

since quad encoders rely on the phase diff to differentiate the direction, you can have signal A connected ...
  Topic: use timer0 to gen 400KHz - need help
Briany

Replies: 6
Views: 5555

PostForum: General CCS C Discussion   Posted: Wed Jan 28, 2009 3:11 am   Subject: use timer0 to gen 400KHz - need help
He didn't mean switch to Timer2. He meant you should use the PWM
module in the PIC.

See this thread for the PWM frequency formula and code to setup
the PWM controller.
http://www.ccsinfo.com ...
  Topic: use timer0 to gen 400KHz - need help
Briany

Replies: 6
Views: 5555

PostForum: General CCS C Discussion   Posted: Tue Jan 27, 2009 11:09 pm   Subject: Re: use timer0 to gen 400KHz - need help
Setting Timer 0 has nothing to do with the frequency with which Timer 0 interrupts occur. You call set_timer0() just once during setup. From that point on, Timer 0 counts up and overflows from 0xff ...
  Topic: two quadrature encoders, one 18f4431, is it possible?
Briany

Replies: 9
Views: 6422

PostForum: General CCS C Discussion   Posted: Tue Jan 27, 2009 10:44 pm   Subject: two quadrature encoders, one 18f4431, is it possible?
I think you can.

1 using the QEI function, and the other one using CCP1 and CCP2.

then I think you have to write the code for the CCP part.
  Topic: convert float value to hex value...
Briany

Replies: 11
Views: 10471

PostForum: General CCS C Discussion   Posted: Tue Jan 27, 2009 10:41 pm   Subject: convert float value to hex value...


int round(float fl)
{
float r = fl - floor(fl);
if (r >= 0.5)
return((int)ceil(fl));
else
return((int)floor& ...
  Topic: use timer0 to gen 400KHz - need help
Briany

Replies: 6
Views: 5555

PostForum: General CCS C Discussion   Posted: Tue Jan 27, 2009 10:33 pm   Subject: use timer0 to gen 400KHz - need help
hi all,

I'm trying to create a PPM ultrasonic pulse at 200KHz using timer0. So, what it's in my mind is:

- provide a character
- use timer0 as a counter to toggle a pin high and low until t ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group