| ??? 03/11/03 14:52 Read: times |
#41278 - RE: Serial ISR problems Responding to: ???'s previous message |
Jeff,
I agree with Michael, you need to initialize R0 and R7. What is most likely happening is that R0 is writing to the stack area and then when the interrupt routine returns, it doesn't know where to go since you just over wrote the address to where it was supposed to return. I also agree that using external memory is a better option, but if assume that you don't have external memory, then a possible scheme would be to initialize R0 to 80H and then use 80h - FFh as your serial buffer. Also don't use ljmp to go to your serial routine use lcall. Also you should push the PSW and the ACC onto the stack at the beginning of you interrupt routine and then pop them off the stack just before you exit your interrupt routine. Also you must test R0 to see if if has reached FFh so that you can then set it to 80h. Otherwise you will again be writing to the stack area. I generally leave 00h - 2Fh as the stack area. |
| Topic | Author | Date |
| Serial ISR problems | 01/01/70 00:00 | |
| RE: Serial ISR problems | 01/01/70 00:00 | |
| RE: Serial ISR problems | 01/01/70 00:00 | |
| RE: Serial ISR problems | 01/01/70 00:00 | |
RE: Serial ISR problems | 01/01/70 00:00 |



