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.

[Moved] SD Memory with AT89s8252

Status
Not open for further replies.

devraj1

Newbie level 4
Joined
May 22, 2015
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
27
I wants to interface sandisk 4gb sd memory with at89s8252 mcu using spi.
so, any body can help me for initialization process with sample code.
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
523
Trophy points
1,393
Activity points
0
You can use petit Fatfs library for SD Card.
 

devraj1

Newbie level 4
Joined
May 22, 2015
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
27
can you help me with sample code?
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
523
Trophy points
1,393
Activity points
0
Just check the petit Fatfs website. I thik it has an example of using the library.
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
523
Trophy points
1,393
Activity points
0
If you use PIC or AVR then I can help you. 89S52 diesn't have hardware SPI. You have to write software SPI routines. Instead can you use PIC or AVR. I can give you FAT16 or FAT32 code for PIC or AVR.

Sorry, AT89S52 has hardware SPI. You have to write SPI initialization code for your chip.

I use mikroC PRO 8051 Compiler. For you 8252 chip there is hardware SPI library in mikroC. I will see if Fatfs can be implemented for your chip.
 
Last edited:

devraj1

Newbie level 4
Joined
May 22, 2015
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
27
Yes, I can use PIC. So, pls help me with sample code
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
523
Trophy points
1,393
Activity points
0
If you use PIC then I will write a FAT32 code but using mikroC FAT32 library for reading and writing files and for opening directories. You have to use PIC18F46K22. Is this ok for you. There will be sno code for the FAT32 library as it is a pre compiled library but it will work in hardware. You can't test FAT32 in Proteus.
 

devraj1

Newbie level 4
Joined
May 22, 2015
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
27
It,s Ok send me the code by which I can test
 

devraj1

Newbie level 4
Joined
May 22, 2015
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
27
can i know, what is the use of CD PIN of SD memory in spi mode.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top