Author |
Message |
Topic: have an problem with unsigned integer division |
mthornton
Replies: 2
Views: 4259
|
Forum: General CCS C Discussion Posted: Tue Sep 02, 2008 7:44 am Subject: have an problem with unsigned integer division |
Compiler version : PCM 3.241
didn't use a printf statements, as the output is the signal out
I found the problem, which was my misunderstanding of the type conversion in the routine used to create ... |
Topic: have an problem with unsigned integer division |
mthornton
Replies: 2
Views: 4259
|
Forum: General CCS C Discussion Posted: Fri Aug 29, 2008 10:54 pm Subject: have an problem with unsigned integer division |
I have an issue with unsigned integer division, using a 16F88, job is a frequency generator.
problems with the result in half_period
frequency is a value from 1-1000, determined from a scan of bcd ... |
Topic: Filters (long) |
mthornton
Replies: 9
Views: 98571
|
Forum: Code Library Posted: Thu Feb 21, 2008 5:26 pm Subject: integer version of above averaging method |
Value += FilterK * (newValue - Value);
where FilterK <1
this works great, but requires floating point variables & math
------------------------------------------------------------------- ... |
Topic: DS18S20 & DS18B20 Codes |
mthornton
Replies: 54
Views: 648040
|
Forum: Code Library Posted: Thu Feb 21, 2008 3:56 pm Subject: DS18S20 & DS18B20 Codes |
The above ds18s20 code is nice & light & works, but I avoided the floating variables by integer-multiplying the result by 5 instead of dividing by 2 or 16. So my result is in DegC x 10. No pro ... |
|