We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm trying to simulate a simple design (written in assembler), in uVision4, that has a few memory mapped peripherals and uses P2 for GPIO. In "options for target" I set "Off-chip Ddata memory" to: Start: 0x0000 Size: 0x0100 When I run the simulator, external memory access is being done using P2, which causes problems when the value of P2 changes for GPIO. While searching the forum posts I found some mention of P2 addressing being the default for PDATA access, but found nothing about how to disable this for the simulator. Perhaps a parameter passed to S8051? Any ideas or insight would be appreciated.
This is a simulator configuration question. I'm trying to find out if there is a way to configure the S8051 module so that P2 is not used for external memory addressing, since in my design (and many others I suspect) only the address lines supplied by P0 give a more than sufficient address space, and GPIO pins are at a premium.
I know of no '51 processor that will toggle !R/!W without loading 'something' on P2. Thus it is not the simulator, but your 'design' that is faulty.
Erik
Really?
Aren't there some processors that only support an 8-bit external address?
There's nothing wrong with the design. It works quite well. All access to external memory is done with movx a,@R0 or movx @R0,a So the only values on P2 are the reset value or what was written on the last GPIO access. External memory on the Intel 8052AH is off chip. The designers of S8051 module made an assumption about how the external memory would be connected to the MCU. Their assumption doesn't match my configuration. I'm asking if there is anyway to change the configuration so that the value on P2 isn't used to address external memory in the simulator.
So you're talking about the simulator taking the value from P2 - is that it?
movx @R0,a So the only values on P2 are the reset value or what was written sorry, if the P2 stuff can handle rewrites, you are right
External memory on the Intel 8052AH is off chip where did you find that antique
Correct. It seems setting PPAGEENABLE equ 1 might do what I want but I'm not quite grocking the documentation. It seems there are a few things that have to be changed in sync to make this work...
Late '80's CNC equipment:)
Customer wants changes to existing hardware, no source code. Oh the things we do for money.