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 97 matches
CCS Forum Index
Author Message
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Tue Aug 28, 2012 7:57 am   Subject: CCP1 question
Thank you.

For the reason of minimizing the hardware, keeping the designed circuit board as small as possible as well as minimizing the costs, I do not want to add an external oscillator or crystal ...
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Mon Aug 27, 2012 8:06 pm   Subject: CCP1 question
My pulses are between 1ms and 2ms. It is a standard RC receiver output.

The minimum pulse is not an issue, the incoming pulse never goes under 7-800us and the maximum never goes above 22-2300us.
...
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Mon Aug 27, 2012 5:11 pm   Subject: CCP1 question
I am happy with the resolution the 4Mhz provides.

So what is the maximum value I am looking for?
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Mon Aug 27, 2012 4:54 pm   Subject: CCP1 question
Thank you, no offense but that sounds like chinese to me SmileSmileSmile

So that all said the clock overflows at 65535.

I do not have a preset timer, I am assuming that would mean:

set_timer1(0xfffe) ...
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Mon Aug 27, 2012 4:19 pm   Subject: CCP1 question
Thank you,

so what is the value the timer 1 overflows at? The compiler says it will overflow every 13.1ms, which would be 13100 micro s.

S if I out an IF statement there to check the value of th ...
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Mon Aug 27, 2012 1:27 pm   Subject: CCP1 question
Thank you.

So my Timer 1 is defined as:


setup_timer_1(T1_INTERNAL|T1_DIV_BY_1); //13.1 ms overflow


and the oscillator is set to internal, 4Mhz:


setup_oscillator ...
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Mon Aug 27, 2012 10:02 am   Subject: CCP1 question
Thank you,

so this is the code I came up with based on your reply:


#int_CCP1
void CCP1_isr(void)
{
If (!ccpflag){
rise = CCP_1;
ccpflag = ...
  Topic: CCP1 question
oxxyfx

Replies: 17
Views: 29798

PostForum: General CCS C Discussion   Posted: Mon Aug 27, 2012 9:05 am   Subject: CCP1 question
Hello,

I am working on a project where I have to accurately measure the width of an incoming pulse. I chose the PIC12F1840 for this project, it seems quite a versatile little PIC.

My compiler ve ...
  Topic: CCP question
oxxyfx

Replies: 3
Views: 5678

PostForum: General CCS C Discussion   Posted: Fri May 20, 2011 6:58 pm   Subject: CCP question
Hello,

Thank you, that's what I thought, but that was not clarified in the CCS C Compiler Help file. Indeed the program example clears it - but the help file is confusing.

The Pulse I am measuri ...
  Topic: CCP question
oxxyfx

Replies: 3
Views: 5678

PostForum: General CCS C Discussion   Posted: Fri May 20, 2011 2:08 pm   Subject: CCP question
Hello,

I am working with a PIC16F886 and trying to capture a set of pulses. I am looking at the help on the CCP and I see this:


Example Code:


#int_ccp1


void isr()
...
  Topic: How much time does writing to UART require?
oxxyfx

Replies: 2
Views: 4893

PostForum: General CCS C Discussion   Posted: Wed Feb 09, 2011 1:20 pm   Subject: How much time does writing to UART require?
Hello

My project requires me to send 8-10 strings to the UART port of my PIC16F886 every 20ms.

Measuring the values requires about 10-12ms. Betwen 2 sets of values there is a sync period of 10ms ...
  Topic: Composite PPM to UART
oxxyfx

Replies: 18
Views: 28004

PostForum: General CCS C Discussion   Posted: Thu Nov 11, 2010 6:22 pm   Subject: Composite PPM to UART
Yes, I knew that. However the blinking led is before the code gets to read the getc(). The getc() is in the while loop and the blinking code is before that. I think it should be executed before the co ...
  Topic: Composite PPM to UART
oxxyfx

Replies: 18
Views: 28004

PostForum: General CCS C Discussion   Posted: Thu Nov 11, 2010 4:43 pm   Subject: Composite PPM to UART
Thank you. Now, the interesting part. If I put the 2 programs together first blinking the LED's and then run the RS232 test the led's will never blink but the characters I type will be echoed back on ...
  Topic: Composite PPM to UART
oxxyfx

Replies: 18
Views: 28004

PostForum: General CCS C Discussion   Posted: Thu Nov 11, 2010 3:53 pm   Subject: Composite PPM to UART
Well that works on it's own as well. Only one thing to be noted though - if I try to change the baud rate to 38400 I get an error when I try to compile it:

Baud out of range

Why is that?
  Topic: Composite PPM to UART
oxxyfx

Replies: 18
Views: 28004

PostForum: General CCS C Discussion   Posted: Thu Nov 11, 2010 6:34 am   Subject: Composite PPM to UART
Well I tried that. However as soon as I start adding other lines of code - or as a matter of fact just simply enabling the RS232 - it stops again. IS it possible something is wrong with this chip?
 
Page 1 of 7 Goto page 1, 2, 3, 4, 5, 6, 7  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group