Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何同时打开引脚 13 和 12?
ldi r18,0x20 ; bit 5 (pin 13) = high out 5,r18 ; output to port B ldi r18,0x10 ; bit 4 (pin 12) = high out 5,r18 ; output to port B
只需将值按位或一起设置即可;
ldi r18,0x30 ; 0x20 (bit 5) OR 0x10 (bit 4) = 0x30 sets bit 4 and 5 high out 5,r18 ; output to port B