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 55 matches
CCS Forum Index
Author Message
  Topic: frequency measure update rate
nuno12345

Replies: 21
Views: 22701

PostForum: General CCS C Discussion   Posted: Mon Oct 01, 2012 1:35 pm   Subject: frequency measure update rate
thank you pcm

I had already found that post here on the forums but I it works the same way get_timer does, at least I tried changing time and the frequency gets affected.
  Topic: frequency measure update rate
nuno12345

Replies: 21
Views: 22701

PostForum: General CCS C Discussion   Posted: Sat Sep 29, 2012 4:58 pm   Subject: frequency measure update rate
any way to do it without ccp1? I really want to test this on 12F675 before the 16f88 arrives Smile
  Topic: frequency measure update rate
nuno12345

Replies: 21
Views: 22701

PostForum: General CCS C Discussion   Posted: Fri Sep 28, 2012 12:26 pm   Subject: frequency measure update rate
One thing to be careful of with the "reciprocal" version - depending on the engine you might get strange results for RPM - my old Buick V-6 was basically a V-8 engine with 2 cylinders remove ...
  Topic: frequency measure update rate
nuno12345

Replies: 21
Views: 22701

PostForum: General CCS C Discussion   Posted: Fri Sep 28, 2012 12:15 pm   Subject: frequency measure update rate
You guys must be teachers.

So back to code (sorry for the bad coding :P)

Slow counting method:
set_timer1(0);
delay_ms(1000);
freq=get_timer1();

Reciprocal method: ...
  Topic: frequency measure update rate
nuno12345

Replies: 21
Views: 22701

PostForum: General CCS C Discussion   Posted: Wed Sep 26, 2012 12:35 pm   Subject: frequency measure update rate
First of all thank you all for your help.

So, as I understand what you guys say is to do a loop, cycling for the most possible frequency thatIi want to read?
I saw some code here in the forums and ...
  Topic: frequency measure update rate
nuno12345

Replies: 21
Views: 22701

PostForum: General CCS C Discussion   Posted: Tue Sep 25, 2012 7:47 pm   Subject: frequency measure update rate
Thank you for your answer.

My frequencies are from 20hz to 300hz.

I think the edges are pretty sharp, its from a distributor hall sensor (12v).
  Topic: frequency measure update rate
nuno12345

Replies: 21
Views: 22701

PostForum: General CCS C Discussion   Posted: Tue Sep 25, 2012 2:27 pm   Subject: frequency measure update rate
Hello, I've build a rpm/freq meter, but since frequency is measured over a second my update rate is very low, stucking the program until 1s has passed.

I'm using the following code:

set_timer1&# ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Tue Aug 23, 2011 3:04 pm   Subject: serial can't compare char
OK since I like to simplify it all.

#include <16F628A.h>
#fuses INTRC_IO, NOWDT, NOPUT, NOBROWNOUT, NOMCLR, NOLVP, NOPROTECT
#use delay (clock=4000000)

#use rs232(baud=1200,r ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Tue Aug 23, 2011 2:53 pm   Subject: serial can't compare char
OMG PCM it worked just with the simplest code.

#include <16F628A.h>
#fuses INTRC_IO, NOWDT, NOPUT, NOBROWNOUT, NOMCLR, NOLVP, NOPROTECT
#use delay (clock=4000000)

#use rs232( ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Tue Aug 23, 2011 1:06 am   Subject: serial can't compare char
Remember at the beginning i had no LEDS but ok.. Since i hate using resistors ill remove all the LEDs and just printf something instead.

About the quotes I tryed to make different ways of comparing ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Sun Aug 21, 2011 6:35 pm   Subject: serial can't compare char
Receiver code:
#include <16F628A.h>
#fuses INTRC_IO, NOWDT, NOPUT, NOBROWNOUT, NOMCLR, NOLVP, NOPROTECT
#use delay (clock=4000000)

//#use rs232(baud=2400,xmit=PIN_B5, rcv=PIN_B ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Sun Aug 21, 2011 4:35 pm   Subject: serial can't compare char
Ttelmah I had the max just disconnected it and used INVERT for testing. I also made a small PCB with max232 and caps.

PCM I had the 0x00 being add in the TX code but removed it since i did not noti ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Sun Aug 21, 2011 12:13 pm   Subject: serial can't compare char
Thought on strcmp ill try it when i get home.

I changed the program to:

int data[1];
data[0]=getc();

printf("data: %s\n", data);

My output ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Sun Aug 21, 2011 7:23 am   Subject: serial can't compare char
Tried, no luck.

I think my problem is that data is getting more characters then just the U, I can't compare it because it tries to compare the whole string.

I think my solution is store it in a ...
  Topic: serial can't compare char
nuno12345

Replies: 21
Views: 26890

PostForum: General CCS C Discussion   Posted: Sat Aug 20, 2011 7:45 pm   Subject: serial can't compare char
PIC is 16F628A, I would do it in 16F88 which I think it has a better support for rs232 communications, but looks like my programmer (JDM) can't get the right voltages trough serial port causing my des ...
 
Page 1 of 4 Goto page 1, 2, 3, 4  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group