| ??? 07/03/00 07:24 Read: times |
#3522 - RE: Saving p2 |
Hi Erik,
on using external code execution, you can never read back P2. Please use a function, executed from the internal code space, to read back P2. If no internal code space available: 1. everytime, if you modify P2, store the same value to a byte in the internal RAM (= shadow register). 2. use DPTR instead of P2 3. you can read back P2 bitwise with using the JBC instruction (see 8051 manual for details): mov a, #0FFh jbc P2.0, tb0 clr acc.0 tb0: jbc P2.1, tb1 ... tb6: jbc P2.7, tb7 clr acc.7 tb7: Peter |
| Topic | Author | Date |
| Saving p2 | 01/01/70 00:00 | |
| RE: Saving p2 | 01/01/70 00:00 | |
| RE: Saving p2 | 01/01/70 00:00 | |
| RE: Saving p2 | 01/01/70 00:00 | |
RE: Saving p2 | 01/01/70 00:00 |



