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

CCS C and Fuzzytech

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



Joined: 09 Feb 2005
Posts: 48

View user's profile Send private message

CCS C and Fuzzytech
PostPosted: Fri Apr 08, 2005 12:09 am     Reply with quote

I use CCS C and Fuzzytech.I create my project on Fuzzytech. Then I want to use file created by Fuzzytech in c language. But Fuzzytech using bit pointer CCS C do not support it. What can I do? If you want I can gives the sample code.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 08, 2005 12:33 am     Reply with quote

Sure. Post a small section of code that shows how they use the pointer
and also post the variable declarations.
sraiderk



Joined: 09 Feb 2005
Posts: 48

View user's profile Send private message

PostPosted: Fri Apr 08, 2005 3:56 am     Reply with quote

in my created file
typedef unsigned short FUZZY;
FLAGS myproj(FUZZY lv0_In1, FUZZY lv1_In2, FUZZY *lv2_Out1);

in include file


typedef unsigned short FTCRTU16;
#ifdef FTLIBC16
typedef FTCRTU16 FUZZY;
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 08, 2005 11:03 am     Reply with quote

How do you know that FuzzyTech is using bit pointers ?

Normally (in most compilers) a "short" is not a bit.
Defining a "short" as a bit is an invention of CCS.

So I doubt that FuzzyTech really intends to use bit pointers.

My suggestion is that wherever FuzzyTech uses a "short",
you should change it to "int8".

It's possible that it needs to be "int16", but I can't tell from
the code that you posted.
Guest








PostPosted: Mon Apr 11, 2005 12:21 am     Reply with quote

You are really correct. I looks code. It uses int16. Result is perfect with CCS C. Thank you very much...
mickey231bhq



Joined: 06 Apr 2005
Posts: 19
Location: Formosa

View user's profile Send private message

PostPosted: Thu Nov 17, 2005 3:33 am     Reply with quote

can you post success code ~~pls~tks.
ftlibc.h ---->repair for ccs compiler~~~
sraiderk



Joined: 09 Feb 2005
Posts: 48

View user's profile Send private message

PostPosted: Fri Nov 18, 2005 3:15 pm     Reply with quote

OK. No problem I changed some definition of variables in FuzzyTech. It gives perfect result with using of 2 tools(CCS C and FuzzyTech).
mickey231bhq



Joined: 06 Apr 2005
Posts: 19
Location: Formosa

View user's profile Send private message

PostPosted: Sun Nov 20, 2005 4:09 am     Reply with quote

can you send *.h and *.c to me..please..
[email protected]
thanks.
turok_gt



Joined: 21 Apr 2010
Posts: 2

View user's profile Send private message

fuzzytech CCS help
PostPosted: Wed Apr 21, 2010 1:48 pm     Reply with quote

sraiderk wrote:
OK. No problem I changed some definition of variables in FuzzyTech. It gives perfect result with using of 2 tools(CCS C and FuzzyTech).

Hi, can you send me the ftlibc.h for CCS compiler? Or any example? I need to use the *.c generated by fuzzytech in CCS compiler for use with the PIC18f2550. Thanks for your help!

My email is: [email protected], or can you post here, help for all.
alireza121



Joined: 09 Dec 2010
Posts: 9

View user's profile Send private message

PostPosted: Wed Dec 29, 2010 1:05 am     Reply with quote

Hello everybody

Is anybody to help me :

I want to control temperature and humidity by Fuzzy logic. I wrote rule base in Fuzzytech and LabVIEW software and simulated. I got good results. Now I want to implement my fuzzy project by PIC18F452 and want to write the code by CCS. Is anybody that wrote the code by CCS in a project like my project by fuzzy before?

Please send me the code or guide me. How can I write fuzzy in CCS?

Many thanks in advance,

Alireza121
temtronic



Joined: 01 Jul 2010
Posts: 9250
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Dec 29, 2010 3:21 pm     Reply with quote

Man I thought Fuzzy 'logic' died years ago !!

It's real easy to port to C, just use a few 'case statement' as fuzzy is really just a bunch of if-then-else type code.
alireza121



Joined: 09 Dec 2010
Posts: 9

View user's profile Send private message

Fuzzy logic
PostPosted: Thu Dec 30, 2010 1:42 am     Reply with quote

Hi dear

I know C language and also I know fuzzy logic is bunch of if-then rules,my problem is not this,my main problem is about how to define membership functions(rectangular,triangular,...) in CCS compiler?

Please guide me how to write code of membership functions in CCS compiler?

Looking forward to your kind reply,

Many thanks and merry Christmas,

Alireza121
temtronic



Joined: 01 Jul 2010
Posts: 9250
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Dec 30, 2010 9:38 am     Reply with quote

There's tons of code on the Web (google...fuzzy code in C)
but I'm bored so ..
Ok, I'll take a stab at it
Code:

given x=0 to 20...
given y 0..5

rectangular..
 if(x>10) and (x<20) y=5

triangular
 if(x>14) and (x<16) y=5
 if(x>13) and (x(17) y=4
 if (x>12) and (x<18) y=3
 if(x>11) and(x(x<19) y=2

Obviously not in C, but you should get the pattern.

x is the input parameter
y is the output parameter

The 'sharpness' of the function( rect,tri,...) is dependent on how you code the if...statements.
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