| ??? 08/23/05 08:17 Read: times |
#99883 - More problems Responding to: ???'s previous message |
Jeroen, your code has many problems. Firstly you alter the A reg in the interrupt service routine without saving it, you probably alter the PSW register also. As you expand your code, this will cause weird problems. clr TR0 mov TH0, #48h ; set for 20 ms mov TL0, #00 ; setb TR0 push a push psw mov a,tcount ;use ram instead of a register - makes to code easier to expand jz,xx1 dec tcount sjmp xx2 xx1 mov tcount,#250 mov a,#'C' mov SBUF,a clr TI xx2 pop psw pop a reti You don't need to clear TF0 - the interrupt hardware does this for you. |
| Topic | Author | Date |
| Timer miscounts? | 01/01/70 00:00 | |
| Counter counts upwards | 01/01/70 00:00 | |
| solved | 01/01/70 00:00 | |
| More problems | 01/01/70 00:00 | |
| further optimisation | 01/01/70 00:00 | |
| Right here: | 01/01/70 00:00 | |
| Bible time... | 01/01/70 00:00 | |
| you are right | 01/01/70 00:00 | |
| Thinking time | 01/01/70 00:00 | |
| how precise "bibles" are | 01/01/70 00:00 | |
| Actually, PSW IS affected | 01/01/70 00:00 | |
| bible time again and again | 01/01/70 00:00 | |
| Not there??????? | 01/01/70 00:00 | |
| wilbers.asm updates | 01/01/70 00:00 | |
| The shame of it all! | 01/01/70 00:00 | |
| I am sorry | 01/01/70 00:00 | |
| old farts make mistakes too | 01/01/70 00:00 | |
| No offense taken | 01/01/70 00:00 | |
wow what a replies | 01/01/70 00:00 |



