PortB = PortBnewdata & $FE ' Will this only change the values on bits 1 to 7
This will leave all <7:1> as is BUT it will clear bit0
Assuming PortBnedata=$FF - AND with $FE give... $FE
If you want set set a bit, you'll need to use -OR-
Portb = PortBnewdata | $1
You can use windows calc in scientific mode if you want. From the link you have posted, looked at the one i've posted about boolean operations/theory.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks