??? 09/15/05 07:05 Read: times |
#101076 - how? Responding to: ???'s previous message |
hi,
Slobodan Mandaric said:
Instead of loading any value to that part of the register, just OR the accumulator with such a mask, where ones stand on the places of the input pins.
How can you determine which pins are input ones? Imagine that some pins of P1.4...7 may be used as input then as output ones depend on task in main(). Example: P1.5 is bi-direction pin for 1-Wire I-button device like DS1990. In such case to trace current mode of each pin from ISR we need with additional byte which keeps pins` modes. There is much more elegant way to do it. Find it! Regards, Oleg |
Topic | Author | Date |
Week puzzle IV | 01/01/70 00:00 | |
In my opinion | 01/01/70 00:00 | |
no | 01/01/70 00:00 | |
Bufff!! then TRB | 01/01/70 00:00 | |
Me and my shadow, walking down the aven | 01/01/70 00:00 | |
You & your shadow | 01/01/70 00:00 | |
http://www.coleporter.org/ | 01/01/70 00:00 | |
it's a hint | 01/01/70 00:00 | |
Well | 01/01/70 00:00 | |
you got it | 01/01/70 00:00 | |
Just OR with ones | 01/01/70 00:00 | |
how? | 01/01/70 00:00 | |
a simple solution: | 01/01/70 00:00 | |
not atomic | 01/01/70 00:00 | |
atomic not possible in general !![]() | 01/01/70 00:00 | |
My solution! | 01/01/70 00:00 | |
Wrong | 01/01/70 00:00 | |
not atomic | 01/01/70 00:00 | |
Ok, here is the shadow | 01/01/70 00:00 | |
only four bits | 01/01/70 00:00 | |
2 Hints! | 01/01/70 00:00 | |
Oh boy, do you need some bible time | 01/01/70 00:00 | |
re: 2 Hints! | 01/01/70 00:00 |