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.

SD Card Project

Status
Not open for further replies.
Since the 4620 is out till sep 16 cant i get the "PIC18F4525"
You can get whatever you want. :D Ya, the 4525 is a fine chip. Very similar to the 4620 (same datasheet). Same amount of RAM. I think the only difference might be 48K of Flash instead of the 4620's 64K.

Sorry i have been working too much this week and haven't had time to actually do this.
Tell me about it. Starting early July the amount of work I had ramped up from fairly slow to insane-in-the-brain-busy. I'd work seven days a week, but it would kill me (need one day to recover a bit - I'm not so young anymore) so I work six days a week. When I'm busy like this I don't always have time for hobbies.
 
Last edited:
OK i should have my pics in about 2-3 days. While i wait. I wanted to know if this looked ok. I made it for a 16mbit chip i have its the AT45DB161D (ATMEL) its SPI and i wanted to know if i should be good if i connect it like this with voltage dividers. Would this work? The TO PIC MICRO header is there to signify connections to a pic like SDO, SDI, SCK and other pins that may be used from pic to chip and chip to pic.

at45db161d-jpg.22024
 

Attachments

  • at45db161d.jpg
    at45db161d.jpg
    93.4 KB · Views: 928
Would this work? The TO PIC MICRO header is there to signify connections to a pic like SDO, SDI, SCK and other pins that may be used from pic to chip and chip to pic.
U1 is the SD card? SI is CMD and SO is DAT0?

What is RESET then? Should be no such line required to the SD.

SD needs 3.3V, GND, CD (CS - chip select), CMD (data in), DAT0 (data out), and CLK (clock). The card-detect and write-protect lines are optional.

Pullups (to the 3.3V VDD) are required on all data & clock lines to the SD (and write-protect/card-detect as well, I think).

I assume you've done the math for those voltage divider resistors? I'm too lazy to check. :p
 
futz please re-read my post lol that was for

"16mbit chip i have its the AT45DB161D (ATMEL) its SPI "

Since im waiting for the micros. I thought id study spi in another form. But this still requires 512byte buffer.

I wanted to know if a connection like that is possible? Im not sure you can tell but they are pulled up.

when you send a 0 then the line is 0 since 0v & GND doesnt make a voltage. When its a 1 the line is 3.x volts. Since 5v and 2 resistors(voltage dividers) to gnd = a high voltage.
 
how about R1= 33k & R2= 17k
That should be a exact 3.3 Volts @ about 100ma

OR

R1 = 12K
R2 = 6K
Would make 3.3 Volts @ 277ma

I have on hand many resistors but none exact. Like i have a 12k & 5.6K which would make it 3.40 Volts @ 284ma
 
Last edited:
futz please re-read my post lol that was for

"16mbit chip i have its the AT45DB161D (ATMEL) its SPI "
Ahh! I see! Never mind :p Should have read more carefully, but Sunday is foggy-brain day for me. :D

Its a holiday here and i still have to work lol
Me too. Sucks, but I'm SO far behind... And there's nobody on the site to bug me and get in my way on a holiday Monday. :D
 
Last edited:
ok so now i ask again lol does this seem like it would work? like if i connect it like that schem i should not have a hardware or wiring issue right?
 
ok please read the following quote

"DO NOT WORRY ABOUT RESISTOR VALUES THIS IS JUST A EXAMPLE OF LAYOUT"

ok with that said how does this look? I know the divider resistor values to use 12k & 5.6k what should the pullup resistor values be?

Also how does it look overall so far? notice-able issues?

16mbit2-jpg.22047


EDIT: NOTE:
NOTICED a error in vcc pullups need to be to the vcc of the main divider.
 

Attachments

  • 16mbit2.jpg
    16mbit2.jpg
    115.9 KB · Views: 669
Last edited:
Why not run the pic at 3.3V too and throw out the level shifting. 5V PICs run on 3.3V , but it cant work at its max clock rate (There is a graph of max clock vs supply voltage in the datasheet), but mostly half the max speed is fine.

Or you might also consider getting one or two of the dsPIC33F, They run off 3.3V and run up to 160Mhz from that.That might be useful if you are doing some more advanced projects with it and need some extra processing power.
 
i dont want to have to always run away from a issue. At the moment i have 5v pics only and would like to use then. This is something need to learn anyway. Especially if i cant avoid it in the future.
 
Yeah i know. I had to do level shifting too cause i used a 5V PIC and i wanted to run it at full speed. At first i just used half the speed and ran it all at 3.3V just to firstly get the card working.

These days its mostly best to run more complicated projects on 3.3V since almost all modern ICs work from 1,8V to 3.3V. This is mainly because ICs use less power at 3.3V also means lower voltage baterys (or getting rid of DC-DCs) Also 3.3V pics have 5V compatible I/O, its a very useful feature if you end up with a IC or two in your design that cant work on 3.3V
 
The thing im scared mostly about is using a 3v pic and needing 5 volts output on a pin. Then i would have to use transistors to switch them which means more parts which can malfunction. You understand? I know i can type a good run-on sentence lol. The good news is i should be getting a few Low Voltage chips in such as:

x = QTY

PIC18LF4620 x 1

and normal chips i ordered:

dsPIC30F4013 x 2
PIC18F4525 x 2
PIC18F2455 x 1

I will try to run the normal (5v) pics from 3.4v to see if it runs good. How can i calculate voltage needed for speed in MHz? Like whats a good voltage for 8mhz and a good minimum voltage for 20 mhz?
 
the datasheet for the 18F4550 recommends to go max 16 Mhz at 3V, While the dsPIC30F4013 recommends to stay under 60Mhz for 3,0 to 3.6V operation.

Well when i was using 3.3V i used 64Mhz (4Mhz xtal + 16x PLL) but it works fine, however i tried to do the full 120Mhz but the PIC just hangs. Altho when running on 5V i once put in a wrong crystal and ran it at 160Mhz it seamed to run on that no problem. So for fun i tryed 200Mhz but then it hangs.PICs generally run pretty fine when overclocked. Seen people run a 20Mhz pic at 35Mhz no porb. But overclock a pic only if you really need the extra bit of juice out of it. And as a general rule use about half the max speed when running it 3.3V
 
Yup. This stuff is all under Electrical Characteristics over in the last pages of the datasheet. They also tell you the current consumption for each configuration and clock rate and other stuff like what currents are allowed for what pins etc
 
ok im using a LF4620 now and i can even read sector 0. The same data on sector 0 is what i can dump when i connect card to pc and manually check it.

Some links on how to handle the data in MBR?

That: **broken link removed**

Isnt really informational. Any other links on Fat16 or Fat32. Anything. Thanks!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top