Anonymous
Not applicable
Oct 15, 2010
09:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 15, 2010
09:52 AM
int hdata,hdataprev;
char factor = 0x03
if(hdata > (hdataprev + (int)factor)){
do A
}else{
do B
}
if hdata is like 0xFF0A and hdataprev like 0xFF00 , then everything is OK - code A is executed
BUT
when hdata is 0x00AA and hdataprev like above(0xFF00) then code B is executed instead of code A (Positive 0x00AA is greater than negative 0xFF00).
Isn't it?
Robert
Labels
- Labels:
-
PSoC 1
0 Replies