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 14 matches
CCS Forum Index
Author Message
  Topic: Finding frequency
Aayush13

Replies: 8
Views: 14597

PostForum: General CCS C Discussion   Posted: Wed Jan 04, 2017 8:17 am   Subject: Finding frequency
I'll assume he's measuring line frequency as his acquisition loop is about 33ms.

Just thinking about a simple way with current data...

One somewhat inaccurate method to get a rough frequency wou ...
  Topic: Finding frequency
Aayush13

Replies: 8
Views: 14597

PostForum: General CCS C Discussion   Posted: Tue Jan 03, 2017 8:50 pm   Subject: Finding frequency
I have hooked up a function generator to pin A1 to get the various values for the sinewave. I have found the amplitude and the RMS value already. I want to write code to find the frequency of the sine ...
  Topic: Generate a sine wave using a PIC microcontroller
Aayush13

Replies: 19
Views: 41516

PostForum: General CCS C Discussion   Posted: Fri Dec 23, 2016 11:41 am   Subject: Generate a sine wave using a PIC microcontroller
How much harmonic purity do you need?
How much frequency accuracy?
How much jitter can you stand?
Is this a school assignment " i did it" project
or for a " real thing" ?
...
  Topic: Generate a sine wave using a PIC microcontroller
Aayush13

Replies: 19
Views: 41516

PostForum: General CCS C Discussion   Posted: Fri Dec 23, 2016 11:34 am   Subject: Generate a sine wave using a PIC microcontroller
Do you have to use that PIC ? It doesn't have a built-in DAC. If you use
the 18F46K22, it has a DAC with 32 levels.

Yeah I have to use that PIC for this :/
  Topic: Generate a sine wave using a PIC microcontroller
Aayush13

Replies: 19
Views: 41516

PostForum: General CCS C Discussion   Posted: Thu Dec 22, 2016 1:44 pm   Subject: Generate a sine wave using a PIC microcontroller
I am using a PIC18f6722 microcontroller and I want to generate a sine wave at 60Hz. The complier I am using is CCS C. I have the PIC hooked up to a function generator so I can see the sine wave on the ...
  Topic: Conversion between ASCII and float.
Aayush13

Replies: 11
Views: 21763

PostForum: General CCS C Discussion   Posted: Thu Aug 18, 2016 8:24 am   Subject: Conversion between ASCII and float.
Maybe it's a Labview problem?

try disconnecting the PIC from the PC, see what happens when you enter 65 ..

try a terminal program like RealTerm ,see what happens...

what's the hardware betwee ...
  Topic: Conversion between ASCII and float.
Aayush13

Replies: 11
Views: 21763

PostForum: General CCS C Discussion   Posted: Thu Aug 18, 2016 7:29 am   Subject: Conversion between ASCII and float.

Thanks! It works! If I wanted to input numbers from LabView instead of
use "125" would I need to do get_float() instead of "125"?
get_float() requires that the incoming ASCII ...
  Topic: Conversion between ASCII and float.
Aayush13

Replies: 11
Views: 21763

PostForum: General CCS C Discussion   Posted: Wed Aug 17, 2016 2:05 pm   Subject: Conversion between ASCII and float.
The following program compiles and runs in MPLAB vs. 8.92 simulator.
It displays the following output, and it's correct (25 * 25) / 125 = 5
5.000
It doesn't do any keyboard input, but that's easi ...
  Topic: Conversion between ASCII and float.
Aayush13

Replies: 11
Views: 21763

PostForum: General CCS C Discussion   Posted: Wed Aug 17, 2016 11:22 am   Subject: Conversion between ASCII and float.
Post the complete test program, not just the code in main(). Post the
#include line for the PIC, #fuses, #use delay(), #use rs232(), any other
#include lines, and global variables, and then the ma ...
  Topic: Conversion between ASCII and float.
Aayush13

Replies: 11
Views: 21763

PostForum: General CCS C Discussion   Posted: Wed Aug 17, 2016 8:42 am   Subject: Conversion between ASCII and float.
Er.


strcpy(arr, "125"); //The array 'arr' in memory is now '1' '2' '5' '\0'
P = atof(arr); //P now =125.0

//P = (V*V)/(c); //You now throw away P!... ...
  Topic: Conversion between ASCII and float.
Aayush13

Replies: 11
Views: 21763

PostForum: General CCS C Discussion   Posted: Wed Aug 17, 2016 8:11 am   Subject: Conversion between ASCII and float.
Hey guys, I am trying to convert an array of characters to float, do a calculation and then convert that back into chars and then print out the result. I am inputting the resistor value on LabView and ...
  Topic: Undefined Identifier EOF
Aayush13

Replies: 2
Views: 8731

PostForum: General CCS C Discussion   Posted: Tue Aug 16, 2016 9:40 am   Subject: Undefined Identifier EOF
Hey guys, I am trying to put getc() in a array and convert the string to a floating point number. So far, I have this:

void main() {
int c;
int count;
char arr[5 ...
  Topic: Communication between LabView and CCS.
Aayush13

Replies: 2
Views: 7607

PostForum: General CCS C Discussion   Posted: Fri Aug 12, 2016 12:17 pm   Subject: Communication between LabView and CCS.
Basic C. Get a textbook!...

You need to read a sequence of characters, decode these to a number, and then do the maths.

gets, rather than getc, and then look at atof and it's other derivatives. ...
  Topic: Communication between LabView and CCS.
Aayush13

Replies: 2
Views: 7607

PostForum: General CCS C Discussion   Posted: Fri Aug 12, 2016 9:42 am   Subject: Communication between LabView and CCS.
Hey guys, I am trying to get a floating point number from labview to calculate power. However, my program in labview only accepts chars and strings. Here is my code in CCS so far:

void main( ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group