|
|
View previous topic :: View next topic |
Author |
Message |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sun Jan 11, 2009 2:55 pm |
|
|
Quote: | Isn't that supposed to reset the "sample" variable, too? | No, it isn't. With CCS C you have to use either a global #zero_ram instruction or an individual initialisation of variables, when needed. In many applications, it may be a feature to have non-volatile variables across a reset. |
|
|
Felipe S.
Joined: 23 Oct 2008 Posts: 10 Location: Vina del Mar, Chile
|
|
Posted: Sun Jan 11, 2009 3:12 pm |
|
|
FvM wrote: | Quote: | Isn't that supposed to reset the "sample" variable, too? | No, it isn't. With CCS C you have to use either a global #zero_ram instruction or an individual initialisation of variables, when needed. In many applications, it may be a feature to have non-volatile variables across a reset. |
Oh, I see. Then, giving "sample" a value of '0' before the conversion should also do the trick.
Also, I suppose that "cleaning" the variable before the conversion would avoid the absurd values I talked about previously, which may very well be some junk data. I'll try this tomorrow. Thanks for your help. |
|
|
|
|
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
|