??? 05/21/08 13:12 Read: times |
#155010 - check value of r0 Responding to: ???'s previous message |
Dear Chico,
Have you checked value of R0. What I believe is you have posted only serial ISR, isnt it? If my understanding is correct, you are initialising R0 in say Nth occurance of ISR & using it in (N+1)th occurance of ISR. but in between the 2 occurances, your code is getting executed at some other location. Now this execution may disturb the value of R0. To overcome this problem, use different BANK for the ISR. make sure this bank or direct address of register is not used in any part of your code To do this modify your code little bit like this SERI: push acc push psw mov psw, #08 ;selecting bank 1 jb RI,LER (remaining part of your code as it is till before MidiEnd) MidiEnd: pop psw pop acc reti Try this out and reply. Note: make sure you are not using R0 of BANK1 anywhere else in code. Also make sure you are not manipulating content of memory address 0x08 directly or indirectly Regards, Mahesh |
Topic | Author | Date |
Indirect addressing trouble (with midi) | 01/01/70 00:00 | |
Not sure I understand | 01/01/70 00:00 | |
Midi | 01/01/70 00:00 | |
CJNE | 01/01/70 00:00 | |
90H is Midi Note ON command | 01/01/70 00:00 | |
Yes, appears bad | 01/01/70 00:00 | |
Very Strange!!! | 01/01/70 00:00 | |
Not strange | 01/01/70 00:00 | |
But is indirect address!? | 01/01/70 00:00 | |
You are right | 01/01/70 00:00 | |
It seems that 8052 is bad! | 01/01/70 00:00 | |
Some suggestions | 01/01/70 00:00 | |
Excuse me! But I dont agree | 01/01/70 00:00 | |
Don't blame the processor! | 01/01/70 00:00 | |
From time to time it happens... | 01/01/70 00:00 | |
check value of r0 | 01/01/70 00:00 | |
Problem Solved! | 01/01/70 00:00 | |
full 'name' please![]() | 01/01/70 00:00 |