Jump to content
Sign in to follow this  
juani_c

Recommended Posts

Have you specified all your variable types?

 

Like, if you're using an integer, did you define it like

int variable_name;

?

 

That's the only thing I can think of without seeing the code.

 

Oh, and glad I could help :P

Share this post


Link to post
Share on other sites

i am using IAR an the code is from parts of other codes. It has a lot of comments to make it easier to understand. the problem came up when i put this line;

void tmp175_Config(Address, Config_Register, 0xE1);

 

I know that i migth be making some silly mistake with the definitions, the variables types or something like that, but well i can not see it... :oops:

 

by the way, this "library" is faaaaaaarrrrr from finished, and i dont

TMP175.rar

Share this post


Link to post
Share on other sites

I can't see anything wrong with your code, aside from a non-traditional use of the USIIFG flag to force an interrupt.

 

I'unno. Just one of those weird things, I guess. If you could post the code you were trying to use when the error is thrown, I might be able to help a bit more, but as of now, I'm stumped.

Share this post


Link to post
Share on other sites

Yeah, and from looking at the code you provided, I can't see any reason why it would do that. However, if you were calling your own function in an incorrect way (strange, but it happens), that might cause it. Any way you could post your main.c? Or PM it to me if you don't want to share it?

Share this post


Link to post
Share on other sites

Oh, wait!

 

In the file launchpad.c that you attached, the following code snippet is wrong.

 

void main{
void tmp175_Init(); 
}

 

You missed the parentheses after main. They are required, even if there is no parameter to be passed in.

Share this post


Link to post
Share on other sites

well, i said that it would be some stupid mistake, thats what i get for copy and paste, thanks bluehash!! now i'm getting another error, but i think this one will be on my own...

Share this post


Link to post
Share on other sites

I fix it!!! one of the functions works (at list the simulation), for the other one i will have to change the state machine, I took that part of the code from other file and instead of making me the things easier it turn the code a mess. I'll give it a shot in a couple of days ( I've had enough for today), the thing is that if i try to implement other functions it will be getting worst and worst...

So my choices are:

to use the same structure with the state machine, starting from scratch with my own code(the hard way, it will take a while)

or use the TI I2C library(the easy way)

 

thank you all for the help

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...