SDFileSystem Version 4.0.9
Moderators: David Barker, Jerry Messina
The pull-ups on PORTC did the trick, thanks. I tried 5 different cards from 128MB to 4GB and got WRITE times of 32-38 seconds and READ times of 21-29 seconds (except for a SimpleTech 512MB card where the WRITE time was 108 seconds). FAT16 or FAT32 did not seem to affect the timings in any significant way.
Would running at 40MHz (instead of 20MHz) pretty much halve the timings?
Would running at 40MHz (instead of 20MHz) pretty much halve the timings?
SD Card Testing with SDFile System Version 4.0.9
Hi Steven, I sure appreciate you sharing your hard work done on the SD File system module. I'm looking forward to including it in the application I'm working on.
I'm in a bit of a pickle and hope you have a minute to point me in the right direction. I'm trying to verify a pcb design that includes a SD card connected to a Pic 18F8722 and am having little to no luck (we're going to build 60 boards next week and I need to be sure the SD card is going to work). I've downloaded your SDFile System Version 4.0.9 and am using it along with your "Sample Code 1 - Demo of most commands in module "
The program runs and I get the menu but doing a dir command or disk size command , it returns without having done anything. I've tried INIT and the program then just hangs up. I'm not sure I'm all that clear on how to use your module yet. do I need to do an INIT to begin with?
Is there any chance that you have a simple routine that might work for me to just check that the SD hardware is working?
If you need any more info from me to help with this please let me know
thanks
Bryan
ps:
-changed the #options to use port D on the 18F8722 for SD connections
-added Memcom=$80 to make port D act as I/O (not memory bus)
-changed - #option USART_BRG16=false (not available in 18F8722)
-used voltage divider resistor arrangement on CS, SDI and SCK as 18F8722 is 5 Vdc and SD Card is 3.3Vdc
I'm in a bit of a pickle and hope you have a minute to point me in the right direction. I'm trying to verify a pcb design that includes a SD card connected to a Pic 18F8722 and am having little to no luck (we're going to build 60 boards next week and I need to be sure the SD card is going to work). I've downloaded your SDFile System Version 4.0.9 and am using it along with your "Sample Code 1 - Demo of most commands in module "
The program runs and I get the menu but doing a dir command or disk size command , it returns without having done anything. I've tried INIT and the program then just hangs up. I'm not sure I'm all that clear on how to use your module yet. do I need to do an INIT to begin with?
Is there any chance that you have a simple routine that might work for me to just check that the SD hardware is working?
If you need any more info from me to help with this please let me know
thanks
Bryan
ps:
-changed the #options to use port D on the 18F8722 for SD connections
-added Memcom=$80 to make port D act as I/O (not memory bus)
-changed - #option USART_BRG16=false (not available in 18F8722)
-used voltage divider resistor arrangement on CS, SDI and SCK as 18F8722 is 5 Vdc and SD Card is 3.3Vdc
SDFileSystem Version 4.0.9
Hi Ryan, thanks for your interest and your input to my problem, you've got me thinking. I thought that because the 18F8722 had two hardware MSSP modules both supporting SPI that either one would work fine. Is there an issue with the software that I'm not considering?
Thanks
Bryan
Thanks
Bryan
Hi Bryan,
Thanks Ryan for spotting the issue with the second MSSP port. The SD module was written to use the first MSSP if two were available. However, I've just added an option to use the second MSSP - use #option SD_MSSP = 2. You will have to download the latest version from the wiki (now version 4.1.4).
This is an untested change to the module, so I'd be grateful if you let me know how it works.
Thanks Ryan for spotting the issue with the second MSSP port. The SD module was written to use the first MSSP if two were available. However, I've just added an option to use the second MSSP - use #option SD_MSSP = 2. You will have to download the latest version from the wiki (now version 4.1.4).
This is an untested change to the module, so I'd be grateful if you let me know how it works.
SDFileSystem Version 4.0.9
Thank you Steven, I'll download the new version and give it a try first thing tomorrow morning.
I'll let you know how I make out with it.
Bryan
I'll let you know how I make out with it.
Bryan
SDFileSystem Version 4.0.9 to 4.1.4
eureka it works !! Thank you Steven for such a quick fix to the SD File System software and Ryan also for your help. I haven't tried all the SD Card functions yet Steven but Init, dir, mkdir, new file, rename file, serial # all work so I think I can safely say that the circuitry on the prototype PCB is OK.
Thanks again
regards
Bryan
Thanks again
regards
Bryan
-
- Posts: 2
- Joined: Fri Feb 27, 2009 5:13 pm
- Location: Ecuador
version 4.1.4
hi, i'm new in the forum,i'm from Ecuador. i'm trying to read a text from the sd memory and view it on a nokia 6100 lcd this is my code. It`s not copleted yet but it has a problem with the compiler. when i tried to compile it, an error happened with the library. it says: SDFileSystem.bas(190): Constant expression expected, and point atSteven wrote:Hi Bryan,
Thanks Ryan for spotting the issue with the second MSSP port. The SD module was written to use the first MSSP if two were available. However, I've just added an option to use the second MSSP - use #option SD_MSSP = 2. You will have to download the latest version from the wiki (now version 4.1.4).
This is an untested change to the module, so I'd be grateful if you let me know how it works.
#if SD_MSSP = 1 on the module
can you help me?
thanks for your help and your time
Code: Select all
Device = 18F4550
Clock = 20
#option GLCD_RESET = PORTC.6 // reset pin
#option GLCD_DATA = PORTC.7 // data pin
#option GLCD_CLK = PORTB.1 // clock pin
#option GLCD_CS = PORTC.1 // CS pin
#option SD_SPI= SW
#option SD_CS = PORTD.2 'SPI CS to SD CS (SD pin 1)
#option SD_DI = PORTD.5 'SPI DO to SD DI (SD Pin 2)
#option SD_CLK = PORTD.3 'SPI CLK to SD CLK (SD Pin 5)
#option SD_DO = PORTD.4
// controlador del GLCD
#option GLCD_MODEL = S1D15G00 //controlador del nokia 6225
Include "GLCD.bas" //módulo de lcd gráfico
Include "Graphics.bas" //módulo de estilos de gráfico
Include "Convert.bas" // módulo para conversión de variables
Include "Verdana.bas" //módulo para el tipo de letra
Include "SDFileSystem.bas"
'Dim response As Byte
GoTo inicio
// inicio del programa
inicio:
Cls // limpia la pantalla
Brush.Style = bsClear // tipo de claro
SetFont(Verdana) // inicializa el tipo de letra
TextAlign = taCenter // alineación del texto
WriteStr(64,12,"prueba texto") //escritura
WriteStr(64,24,"memoria sd") //escritura
WriteStr(64,36,"nokia 6225")
DelayMS(2000)
Cls
WriteStr(64, 12, "inserte sd") //escritura
'Repeat
'response=SD.Init()
'Until response=0
DelayMS(2000)
Cls
WriteStr(64,12,"memoria leída")
DelayMS(2000)
End
Hi again,
I've now tried compiling your example and it works OK for me, even with the SD code uncommented. Are you using the latest version of the SD module from the wiki (http://www.sfcompiler.co.uk/wiki/pmwiki ... temVersion)? You will need to place this in the Swordfish user library folder if not.
Steve
I've now tried compiling your example and it works OK for me, even with the SD code uncommented. Are you using the latest version of the SD module from the wiki (http://www.sfcompiler.co.uk/wiki/pmwiki ... temVersion)? You will need to place this in the Swordfish user library folder if not.
Steve
-
- Posts: 2
- Joined: Fri Feb 27, 2009 5:13 pm
- Location: Ecuador