View previous topic :: View next topic |
Author |
Message |
PaulKTM
Joined: 28 Feb 2008 Posts: 20 Location: Huntsville, AL
|
Posted: Sun May 10, 2009 4:03 pm Post subject: SD interface to M128 |
|
|
I have a mini board from Futurlec.
http://www.futurlec.com/Mini_SC.shtml
How would this connect (pins) to a M128? Not sure how this works. I will use the AVR-DOS latest (5.5) and BASCOM.
Thanks,Paul |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Tue May 12, 2009 6:23 am Post subject: |
|
|
If you look in the Config_MMC.bas file supplied with AVR-DOS you will find the pin connections for the card and for the M128.
For mini SD cards, the pin names are the same.
On the card connector the pins are:
1 CD Slave select
2 DI MOSI
3 Vss1 Gnd
4 Vdd +3.3 volt
5 Clk SCK
6 Vss2 Gnd
7 DO MISO
Pins 8,9,10,11 are not connected.
It is by far preferable to use the assigned hardware SPI bus pins on the processor.
Note that the card runs at 3.3 volt, so you need this supply for the processor as well, else you should use a level converter on the SPI signal lines. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
PaulKTM
Joined: 28 Feb 2008 Posts: 20 Location: Huntsville, AL
|
Posted: Tue May 12, 2009 12:20 pm Post subject: |
|
|
Thanks AdrianJ, I have done this already but did not explain it in my first post. After some digging it appears the Futurlec board also has 10K resistors on the SPI lines. I do not think these are required and I could bypass them. I do have a 3.3 v supply to the card and a voltage divider setup on the SPI lines to put them in the 3.3 v range also. I get an error #255 from the Initfilesystem(1) function. Thanks for the reply. |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Tue May 12, 2009 10:56 pm Post subject: |
|
|
You should not need resistors on the SPI lines, they are driven hi/lo actively by either the processor ( SS,SCK,MOSI ) or the card ( MISO ).
But voltage dividers on the lines as level shifters may not work. The signals are high speed, and resistors ( and the associated capacitance ) will slow down the risetimes to the point where it may not work. Far better to use something like a 74HCT04 on the SS,SCK,MOSI lines from the processor to the card. Use a 3.3 volt supply for the '04. You dont need anything in the MISO line from the card to the processor, it will accept 3 volt signals correctly. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
PaulKTM
Joined: 28 Feb 2008 Posts: 20 Location: Huntsville, AL
|
Posted: Wed May 13, 2009 12:27 pm Post subject: |
|
|
I will try a 74HCT04 and see what gives. I'm sure this will work, just have to work at it more. Thanks for the advise! _________________ Paul Traufler |
|
Back to top |
|
|
mpe
Joined: 31 Jul 2007 Posts: 13
|
Posted: Mon Jul 06, 2009 10:43 am Post subject: Dual power supply |
|
|
74HCT04 will perhaps work, but it is intended to work with a power supply of at least 4.5 V. Maybe 74HC04 can be used.
But I think SN74CB3T1G125 is a better solution. This fet-switch is intended to do voltage translation, is bi-directional and fast. I have tested it with SD-cards and it work very well. You can also get an 8-unit version called SN74CB3T3245PW. |
|
Back to top |
|
|
|