This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using internal XRAM

My project involves using Serial I/O
port. The code written was working fine when
there was EXTERNAL XRAM on board. We have been using Winbond 78E516 cpu.

Now the
EXTERNAL XRAM was removed from the design.
I have tried to utilize the INTERNAL XRAM
in replace of EXTERNAL RAM, and the code
does not working at all. Using the scope
to monitor the TX or RX pin of the CPU, I
did not see anything. I have tried all the options: USE ON_CHIP XRAM checked, USE ON-CHIP ROM checked .... but no luck !!

I even added the STARUP file to the project
by including: setting sfr CHPCON bit4 ..
still no luck.

Does anybody in the forum experience such problem.

Parents
  • Hi Jimmy,

    I've solved that problem before. According to the data sheet of Winbond 78E516, you can set it up to use the on-chip XRAM as PDATA or simply use it as XDATA.

    My suggestion is adding the following code in the startup.a51 before you clear the on-chip XRAM:

    	MOV	CHPENR,#87H
    	MOV	CHPENR,#59H
    	ORL	CHPCON,#00010000B	; enable AUX-RAM
    	MOV	CHPENR,#00H
    

    BTW, don't forget P2 is also need to be set if you use PDATA instead of XDATA.

    If it still doesn't work, I think you have to take out your ICE to have a memory check on your board to see what's going on there.

    Cheer up

    Frank

Reply
  • Hi Jimmy,

    I've solved that problem before. According to the data sheet of Winbond 78E516, you can set it up to use the on-chip XRAM as PDATA or simply use it as XDATA.

    My suggestion is adding the following code in the startup.a51 before you clear the on-chip XRAM:

    	MOV	CHPENR,#87H
    	MOV	CHPENR,#59H
    	ORL	CHPCON,#00010000B	; enable AUX-RAM
    	MOV	CHPENR,#00H
    

    BTW, don't forget P2 is also need to be set if you use PDATA instead of XDATA.

    If it still doesn't work, I think you have to take out your ICE to have a memory check on your board to see what's going on there.

    Cheer up

    Frank

Children
No data