| ??? 12/10/09 09:16 Read: times |
#171541 - PSW Responding to: ???'s previous message |
You may think that your program isn't using the PSW just because you can't see such a name.
But every conditional jump depends on the state of the flags. And if you ever need to work with 16-bit arithmetic and to add-with-carry, you need your carry to survive an interrupt. Source code becomes absolutely impossible to read if you can't trust that the flag register is always valid. |
| Topic | Author | Date |
| Problem using Timer2 in 89S52! | 01/01/70 00:00 | |
| not a very useful suggestion from 'Plz' | 01/01/70 00:00 | |
| further suggestion | 01/01/70 00:00 | |
| Message & Readable code is here... | 01/01/70 00:00 | |
| look in the assembler manual | 01/01/70 00:00 | |
| New Code, hope it helps! | 01/01/70 00:00 | |
| what You are trying to make ? | 01/01/70 00:00 | |
| mov T2MOD,#4 | 01/01/70 00:00 | |
| sorry | 01/01/70 00:00 | |
t2mod=0 ; t2con=4 (tr2=1) It worked! | 01/01/70 00:00 | |
| PSW | 01/01/70 00:00 | |
| that is not a comment! | 01/01/70 00:00 | |
| Comments OR Explaination!!! | 01/01/70 00:00 | |
| Comments are mainly for YOU | 01/01/70 00:00 | |
| WRONG! | 01/01/70 00:00 | |
| Answer the "why" in your comments. | 01/01/70 00:00 | |
| I got (I)T2 working !!! | 01/01/70 00:00 | |
| Clear TF2 in your service routine | 01/01/70 00:00 | |
| Clearing TF2 in ISR | 01/01/70 00:00 |



