
Originally Posted by
Eng4444
all my work is that i am getting Power. It is given as you know by:
P = V x I x Cos alpha.
And out of this silly task you are able to make such a lot of dust ?
P=V*I 16 Bit
X=COS(Alpha*255/360) 8 Bit 2-komplement
Minus=X.7
P=P*(X and %01111111) 32 Bit !!!
P=Div32 127
It's quick-n-dirty, maybe there is an error inside....
And all the way without using this boring 0,xxx, only integers !
Ha, the good old times are back, where programmers must understand what they are doing and counting the bits...
Just USE YOUR BRAIN, not your mouth !
Hello Mel,
Yes, I ruin you prices and your time....
but I inserted 1 mistake, so this code will not work right. But some postings ago, there was the right hint. Maybe we could train his brain....
Last edited by BigWumpus; - 7th May 2006 at 22:21.
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Bookmarks