************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I've tried to do something like that before. If I remember right, the fact that i.3 is a bit didn't work well with the << 6. It ended up shifting itself out into nowhere and always ended up being a '0'.
Maybe that was back in the day, in an older version of PBP or something. It just seems to me like that didn't work very well.
Hi,
I did at test on the breadboard this morning ...
Everything fine ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
This is the winner:I've tried both in MPLAB SIM butCode:portb = (portb & %00011111 ) | ( ( i rev 3 ) << 5 ) portc = (portc & %10111111 ) | ( i.3 << 6 )
doesn't mask the port right.Code:portc = (portc & %10111111 ) | ( i << 3 )
THANK YOU. Problem solved
Good news !
Just for the fun ...
How many boards saved ???
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
uhm .. one
I'll post the code in the apropriate section when it's done. It's for a Li-Ion Battery Management System (BMS)/Balancer
Last edited by Castor; - 16th May 2008 at 11:59.
Hi, Castor
What is your device for ??? Modelling purposes ?
By the way, I realized a voltage warning device for transmitters ( for a Nicad to LiPo conversion ), some times ago, and, by the way noticed there's a not negligible tempco with those batts ...
doesn't simplify the measurements !!!
Regards from ... an ex Tegel " blue uniform " temporary citizen.
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks