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

Guitar tuner project
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Jan 11, 2009 2:55 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jan 11, 2009 3:12 pm     Reply with quote

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. Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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