Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/12/03 03:10
Read: times


 
#52463 - RE: update pins on a port on the byte level
Responding to: ???'s previous message
unsigned char new_data; // new port bits
unsigned char chg_mask; // 1's for bits to change
...
...
// in C
P1 = (P1 & ~chg_mask) | (new_data & chg_mask);

; in assembler
MOV A, chg_mask
CPL A
ANL A, P1
MOV B, A
MOV A, chg_mask
ANL A, new_data
ORL A, B
MOV P1, A


MICHAEL KARAS

List of 11 messages in thread
TopicAuthorDate
update pins on a port on the byte level            01/01/70 00:00      
   RE: update pins on a port on the byte level            01/01/70 00:00      
   RE: update pins on a port on the byte level            01/01/70 00:00      
      RE: update pins on a port on the byte level            01/01/70 00:00      
      RE: update pins on a port on the byte level            01/01/70 00:00      
         RE: update pins on a port on the byte level            01/01/70 00:00      
            RE: update pins on a port on the byte level            01/01/70 00:00      
               RE: update pins on a port on the byte level            01/01/70 00:00      
   RE: update pins on a port on the byte level            01/01/70 00:00      
   RE: update pins on a port on the byte level            01/01/70 00:00      
   RE: update pins on a port on the byte level            01/01/70 00:00      

Back to Subject List