??? 08/18/05 07:14 Read: times |
#99623 - I doubt Responding to: ???'s previous message |
Oleg Sergeev said:
hi,
Pranav R. Phatak said:
1. Since running from flah /EA is not pulled low.
To execute program from internal flash /EA must be tied to Vcc. If you pull /EA low then MCU starts to fetch all instructions from external memory which is absent for addresses 0x0000-0x7FFF. From original MSC-51 documentation:External program Memory is accessed under two conditions: 1. Whenever signal /EA is active low or 2. Whenever the program counter (PC) contains a number that is larger than the memory size. So PSEN won't go low.
Why??? From original MSC-51 documentation: The read strobe for external fetches is /PSEN. /PSEN is not activated for internal fetches. When the CPU is accessing external Program Memory, /PSEN is activated twice every cycle (except during a MOVX instruction) whether or not the byte fetched is actually needed for the current instruction. ------------------------------------------------- Point is valid. But i took this as a possibility and continued. It could be some other reason. 2. When code is fetched from 8000h it should read contents of P0 so bytes read would be 0x0,0x1,0x2 as no memory is putting data on bus.
Why not 0xFF? Why do you assume that if no external program memory presents then the low byte of address fetch is read back as instruction byte? Indeed, it may be so due capacity of open-drain P0 pins, but it may be 0xFF, 0x00 or any other value as well. ------------------------------------------------ I have seen this happen on the derivative i worked on with a similar setup. Try reading a unconnected RAM and it returns address LSB 5.Thus next read write tests take place at nonexitant RAM location and so fail. code jumps to ERROR and you get the error LED on as well.
But I did not find in your description why LED_OK lights as well? ------------------------------------------------- The OK light has already been turned on in initial pass. In next execution out or location 8000H the code should return to Flash with effect i mentioned in previous mail. If it indeed happens that way the code shall enter ERROR and the second LED is lit up as well. regards Pranav Regards, Oleg |
Topic | Author | Date |
week puzzle III | 01/01/70 00:00 | |
Not getting into details... | 01/01/70 00:00 | |
you do | 01/01/70 00:00 | |
see this | 01/01/70 00:00 | |
Well. . . | 01/01/70 00:00 | |
let me try | 01/01/70 00:00 | |
eh? | 01/01/70 00:00 | |
I`m confused with A15 | 01/01/70 00:00 | |
Whooops | 01/01/70 00:00 | |
and I thought that was "the puzzle" | 01/01/70 00:00 | |
sorry | 01/01/70 00:00 | |
and I thought that was "the puzzle" | 01/01/70 00:00 | |
another trouble | 01/01/70 00:00 | |
And what's wrong with /CS? | 01/01/70 00:00 | |
sorry, my mistake | 01/01/70 00:00 | |
what does not happend? | 01/01/70 00:00 | |
And...? | 01/01/70 00:00 | |
explain | 01/01/70 00:00 | |
And...? | 01/01/70 00:00 | |
Answer for puzzle | 01/01/70 00:00 | |
I doubt? | 01/01/70 00:00 | |
I doubt | 01/01/70 00:00 | |
I agree here | 01/01/70 00:00 | |
I wonder | 01/01/70 00:00 | |
autodetect | 01/01/70 00:00 | |
/PSEN | 01/01/70 00:00 | |
there is also flaw in the reasoning | 01/01/70 00:00 | |
Lost inverter | 01/01/70 00:00 | |
errta | 01/01/70 00:00 | |
Questions | 01/01/70 00:00 | |
answers to questions | 01/01/70 00:00 | |
Timings | 01/01/70 00:00 | |
Ex[plain A bit more please | 01/01/70 00:00 | |
intel app note says | 01/01/70 00:00 | |
I do | 01/01/70 00:00 | |
re:EA | 01/01/70 00:00 | |
yes no doubt about it | 01/01/70 00:00 | |
reset device | 01/01/70 00:00 | |
three legged | 01/01/70 00:00 | |
The solution![]() | 01/01/70 00:00 |