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.

SD Card interface with PIC18F46K20

Status
Not open for further replies.

eng_ibrahim

Member level 1
Joined
Nov 21, 2012
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,555
hello ,
I use PIC18F46K20 uc to interface spi with Micro SD Storage Board that founded in this link
https://www.ebay.com/itm/Micro-SD-S...y-Shield-Module-SPI-For-Arduino-/200958993125
and I use the SDcard Library that attached and using MPLAB configuration to configure the PIC18F46K20
like this video
https://www.youtube.com/watch?v=4b3vXYBXhSQ&t=8s
but the problem it didn't work and i try to debug using led output I founded that it didn't initialize or execute the program of SD card in the main.c that in SDcard Library that attached before so any one have solution

thanks .
 

Attachments

  • picSD-master.zip
    16.8 KB · Views: 36

please show your code.
Do you have a valid crystal settings?

also, your pic is 3.3V? is your sd card module for 3.3 v as well?
 

also, your pic is 3.3V? is your sd card module for 3.3 v as well?

I was wondering about that as well, the board has a 3.3V regulator on it for the Arduino which uses 5V. If you have put the 3.3V to the SD card module then the voltage to the SD card will be to low, also the board has logic level changing for the 5V Arduino which is not needed for the PIC18F46K20 and if used must be connected to 5V tolerant pins on the PIC. You should show the circuit of the SD card module and how you have connected it up to your PIC.
 

I use the module 5 v and the pic 3.3 v also i tried to use this module https://www.sparkfun.com/products/544 and also not work


what the hell is with that module? 4$ just for a piece of PCB and SD card connector? You can get one for free from scrap....


anyway... do you have some kind of schematic? Are you connecting all the pins?

is your SD card working?
 

At the main.c file, the code that could somehow help you to debug the SDcard (uart_puts) is commented, although the function which performs the UART settings is not disabled ( uart_init ). Once you did not show any schematic so far, we just can guess that you are based on the original project, so just use it. In addition, there are several functions in the sdcard.c library that make generous use of the serial port to inform in detail exactly what is happening.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top