??? 02/14/05 17:13 Read: times |
#87396 - Swap and Mask Responding to: ???'s previous message |
If I understand what you want to do correctly....
You could read P3, and then mask the low bits (p3.3-p3.0) by ANDing it with 0F0H, then swapping the nibbles, so for example, You have 10011000 on P3. AND with 0F0h gives 10010000 Swap nibbles gives 00001001 (9h) which is what you had on p3.7-4 Hope that makes sense. |
Topic | Author | Date |
4 bit binary input | 01/01/70 00:00 | |
Swap and Mask | 01/01/70 00:00 | |
as I read your post | 01/01/70 00:00 | |
FAO Eric the Great. | 01/01/70 00:00 | |
oops | 01/01/70 00:00 | |
Updated profile | 01/01/70 00:00 | |
It is useful! | 01/01/70 00:00 | |
already shown | 01/01/70 00:00 | |
Reformatted Code for readability | 01/01/70 00:00 | |
Neat | 01/01/70 00:00 | |
re:neat | 01/01/70 00:00 | |
risque business | 01/01/70 00:00 | |
Strobe | 01/01/70 00:00 | |
Strobe valid? | 01/01/70 00:00 | |
For any pinout![]() | 01/01/70 00:00 |