| ??? 05/12/99 23:17 Read: times |
#416 - RE: port reading |
Hello Dimitrij,
the databook says the following about reading a Port: Read-Modify-Write - Feature: Some instructions that read a port read the latch and others read the pin. REad.Modify-Write instructions read the latch rather then the pin, and these instructions read a value, possibly change it,and the rewrite it to the latch. When the destination operand is a port, or a port bit, the Read-Modify-Write instructions given the followinf table read the latch rather then the pin: Mnemonic Example ANL ANL P!,A ORL ORL P2.A XRL XRL P2,A JBC JBC P1.1,Label CPL CPL P3.0 INC INC P2 DEC DEC P2 DJNZ DJNZ P3,Label MOV Px.y,C Move carry Bit to bit y of Port x CLR Px.x Clear bit y of port x SET Px.y set bit y of port x The last three instructions in this lsit are Read-Modify-Write instructions..... Source for this information is the atmeldatabook (1995),page 2-44. Bye, Dieter. |
| Topic | Author | Date |
| port reading | 01/01/70 00:00 | |
RE: port reading | 01/01/70 00:00 |



