Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Code in ROM( AT28c256) doesn't work in 80c51 board.

Status
Not open for further replies.

Dan Kwon

New Member
Hello, Everyone.

I recently have started the 8051 microcontroller.
I am using the training board with 80c51, At28c256, 62256 , 74hc573 and gal16V8.
When I use the monitor program(terminal in PC, send the code to the board by RS-232 cable) which is starting in 4000H, the code works fine.
But when I burn the rom with rom writer, it doesn't work..just doesn't do anything.

Do I need to add some code in Keil C compiler or do something other then "off-chip code 0x0000" in Keil C compiler?

Please help me.

Thanks.
 
Thank you for your time on replying, Ian.

Yes, the EA is grounded.

Originally, the ROM contains the monitor program code. I try to start the program after power on instead of using the monitor program. some reason, when I put the other ROM with the simple code which has the access of 82C55, it won’t work.
The simple code is working fine when I use the monitor programmed ROM which runs in 4000H address of RAM(62256).

Strangely, when the code which controls the internal timer, the monitor program won’t work on 4000H address. when I put the ROM with the code(controls the internal timer) works fine after reset/power on.

If you have any idea, please advise.

Thanks.

Best Regards, Dan Kwon
 
I cant really advise, I used Phillips P89c664 chips with tons of rom so I never needed to use external..

One thing I don't understand.. Why are you using address &H4000?? Both ROM and RAM start at address 0!
There is a Ram pointer and a ROM pointer... If you want to run a program at &H4000 you need to compile for relocatable code. Also you may have to change the build option there are several.. Compact , small, large and huge.. This is just a way to optimize which pointer to use... If you need to jump to &H4000 I should imagine you'll need at least the Large model..
 
Thanks, Ian ;

My training board has the starting address at 4000H in RAM. somehow, the author of Korean book designed this board to work this way.
As soon as, the board downloads the Hex code (Keil setup also needs to be 0x4000 for off-code memory) from the PC , I need to run the board at 4000h by typing "R" on the terminal of PC.
The original ROM contains the original monitor code inside which makes the communication, executing and monitoring through the pc terminal window.

What I tried to do was, just replacing the original ROM with another ROM which contains the hex code executable at 0x0000 without the monitor program's assist.
I thought in this way, the board runs as soon as it powered on.

I will try with Large model tonight.

Best Regards, Dan Kwon
 

Attachments

  • combined A.gif
    combined A.gif
    74.3 KB · Views: 314
Last edited:
Okay.. Now I see what's happening.... ROM starts at &H0 External RAM is at &H4000..

Like I said in my last post, You may need to change you memory model in the compiler settings...

Your code will start at &H00 ( or after reserved reset vectors )

BTW.. I have never seen anyone else use a GAL to decode the high address before...
 
Thank you, Ian.

I will let you know tonight for memory model change.

For the GAL ; I believe this is the Korean way of the decoding method to reduce TTL ics.
20 years ago, I had to make the GAL programmer ( http://elm-chan.org/works/pgal/report_e.html ) for this board.
After 20 years, I suddenly opened the treasure box in the basement and review it now...what a young shiny old days.
Since I have majored and have worked as a Mechanical Engineer, this field is quite adventure for every learning steps.

Best Regards, Dan Kwon
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top