Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

How to connectl PIC16F876 and 1024Kx8 SRAM

Status
Not open for further replies.

salamander

Member level 2
Joined
Jun 12, 2002
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
847
PIC + SRAM

Hallo,
I want to connect my pic (16f876) to a huge 1024Kx8 Nonvolatile SRAM(Dallas: DS1270y-100), but I really don't know, how i could manage this both on hardware(-> how to wire, ?external devices nedded?) and software(-> I mean my c code).

thanks a lot
salamander
 

cube007

Full Member level 6
Joined
Mar 12, 2002
Messages
386
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,298
Location
Australia
Activity points
3,477
Hi salamander,

you have interface it parallel to your PIC.

1 pin for write
1 pin for read
1 pin for cs (not necessary)
8 pins for data
20 pins (2^20 = 1024) for address pins

I think that you do not have so much pins on the pic. So you have to use a extra device (latch).
How much pins are left for the connection to your SRAM?

by,
cube007
 

salamander

Member level 2
Joined
Jun 12, 2002
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
847
Ok, we have enough pins for direct connection :)

...but can you also tell me, how I can use the memory in c then? > assuming no file-system, just a big stream....

thanks a lot for your help
salamander
 

cube007

Full Member level 6
Joined
Mar 12, 2002
Messages
386
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,298
Location
Australia
Activity points
3,477
As far as I know:

You have to program your own access to the SRAM.

For example to read something:

1. cs = low
2. address pins to the desired address
3. rd = low
4. read out the data pins (complete 8-bit port)
5. next address
6. etc.

by,
cube007
 

salamander

Member level 2
Joined
Jun 12, 2002
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
847
Ok thanks a lot,
i will go this way.... - its an relative easy job for my project

thanks again
salamander
 

cube007

Full Member level 6
Joined
Mar 12, 2002
Messages
386
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,298
Location
Australia
Activity points
3,477
Hello salamander,

are you sure that you have enough pin on the PIC16F876. For a direct parallel connection you will need at least 29 pins!!! But the 876 is in an 28 pin package. Perhaps you should use the 877.

best regards,
cube007
 

dainis

Advanced Member level 4
Joined
May 15, 2001
Messages
1,126
Helped
53
Reputation
106
Reaction score
9
Trophy points
1,318
Activity points
9,271
It is right only for address pins, but you need 8 data pins, CS, OE and WR pins ....
 

mrcube_ns

Advanced Member level 1
Joined
Apr 10, 2002
Messages
452
Helped
48
Reputation
96
Reaction score
34
Trophy points
1,308
Location
Europe
Activity points
3,814
dainis said:
It is right only for address pins, but you need 8 data pins, CS, OE and WR pins ....
Ok, I agree!
My replay is only for math problem in those post.

Mr.Cube
 

salamander

Member level 2
Joined
Jun 12, 2002
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
847
Ok thanks,
I will solve my problem on this way....

regards
salamander
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top