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 ArticleRe: 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 ArticleMultiply 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 ArticleRe: 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
More Pages to Explore .....