Quantcast
Channel: Multiply by a Fraction in dsPIC ?
Browsing all 4 articles
Browse latest View live

Multiply by a Fraction in dsPIC ? (PickerRoy)

 // Pressure sensor is for 600bar in 0to 5V out - so to get a decimal place I am using 6000 ! PressureinBarWithOneDeciPlace=((((((unsigned long)ADCResultofPSensor*2)+1) *6000) +1024)...

View Article



Re: Multiply by a Fraction in dsPIC ? (MBedder)

N * 2.2698 =~ (N * 9297UL) / 4096 = (N * 9297UL) >>12. The point is to perform the relatively slow divisions only by powers of 2 which causes just a fast shift operation instead. Avoid using...

View Article

Multiply by a Fraction in dsPIC ? (Serpent)

 // Pressure sensor is for 600bar in 0to 5V out - so to get a decimal place I am using 6000 ! PressureinBarWithOneDeciPlace=((((((unsigned long)ADCResultofPSensor*2)+1) *6000) +1024)...

View Article

Re: Multiply by a Fraction in dsPIC ? (MBedder)

N * 2.2698 =~ (N * 9297UL) / 4096 = (N * 9297UL) >>12. The point is to perform the relatively slow divisions only by powers of 2 which causes just a fast shift operation instead. Avoid using...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images