Hi all
I am using PIC18F4620 to measure frequency. My frequency reading vary a lot -randomly , so I thought of rounding these values to nearest 100. How can I possibly do that in code ? Thanks
Im using C18 for PIC18F4620. Is there any inbuilt "rounding function" ?
Frequency Output:
13341
13379
13419
13326
13368
13408
13448
13357
13392
13427
Want to round it to nearest 100 :
13300
13300
13400...
Cheers
ps : Is it possible to round it to nearest 50 ?
I am using PIC18F4620 to measure frequency. My frequency reading vary a lot -randomly , so I thought of rounding these values to nearest 100. How can I possibly do that in code ? Thanks
Im using C18 for PIC18F4620. Is there any inbuilt "rounding function" ?
Frequency Output:
13341
13379
13419
13326
13368
13408
13448
13357
13392
13427
Want to round it to nearest 100 :
13300
13300
13400...
Cheers
ps : Is it possible to round it to nearest 50 ?