Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing 8051 with external EEPROM And SRAM

Status
Not open for further replies.

vinash

Member level 2
Joined
Nov 3, 2005
Messages
45
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,999
Hi,
I am trying to interface an 8051 microcontroller with an external EEPROM and SRAM, I am not very sure how to go about doing it. Could someone please give some inputs or are there any books or websites, i could refer to. Thank you.
 

hi vinash,
have alook at this book,
is good for interfacing and basics of 8051 also



regards
Sam
 

HI,
Thanks for the links, but the codes in the links are all in assembly language, are there any links that does the interfacing in C? Thank you.
 

Connecting external code and data memories to 8051-core microcontroller via 8051's multiplexed bus is a hardware issue and has hardly anything to do with programming language ..
If EA pin is connected to 0V 8051 executes codes from external code memory starting from address 0000h; if EA is connected to +5V or left unconnected, 8051 executes codes from internal program memory, and above this address area, executes codes from external program memory ..

As far as external SRAM is concerned, 8051 uses pointers to communicate with SRAM: see " Using pointers, arrays, structures and unions in 8051 C compilers"
https://www.esacademy.com/faq/docs/cpointers/pointers.htm

Here are examples on how to use assembly within C (address=xxxxH, data=xxH):
- data read from SRAM:
#asem
MOV DPTR, #address
MOVX A, @DPTR
#endasm
- data write to SRAM:
#asm
MOV A, #data
MOV DPTR, #address
MOVX @DPTR, A
#endasm

Regards,
IanP
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top