> I'm waiting for a new micro sd card to arrive I'll be waiting... There is one more issue I have. I am not able to use the 2x256 byte arrays for sector reads. If I define any two 256 byte arrays before including my usb_msd library, the files appear to be bad on the drive! If I remove the arrays, all is good again. Any idea's in the mean time? With the arrays, It compiles with 959 bytes out of 3808 ram. I don't see how this could affect USB. I need this to improve speed.
At the moment, It works well enough that I can play a mp3 from the "sd card reader" circuit. Although I haven't read anything, maybe the PC changed some setting on your card. It's the only possible reason why your sd card would not work since hardware and software are the same. Matt. On Nov 9, 2:49 pm, Sebastien Lelong <[email protected]> wrote: > Hi Matt, > > I can't the read card either... It used to work but not anymore. It seems > like it's as though the card wasn't here. I'm not sure if this test is > relevant but, whether I plug the card or not, the result is absolutely the > same... > , I'll report results > (hopefully ok). > > Thanks > seb > > 2011/11/7 mattschinkel <[email protected]> > > > > > > > > > > > Can you read the card? > > > This sounds like the problem some others have had, but I have not and > > so I couldn't fix it. > > > Matt. > > > On Nov 6, 8:20 am, Sebastien Lelong <[email protected]> > > wrote: > > > Interestingly, results are the same with or without a sd-card... > > > > Seb > > > > 2011/11/6 Sebastien Lelong <[email protected]> > > > > > Hi Joep, Matt, > > > > > I tried several other block number, no success... > > > > About SD_DELAY_AFTER_WRITE = true, I'm already using it (and tried > > false), > > > > and I understand it's used on sd_write_stop(), that is, before the > > problem > > > > occurs. > > > > > Thanks, > > > > Seb > > > > > 2011/11/6 mattschinkel <[email protected]> > > > > >> Try changing the value of > > > >> const bit SD_DELAY_AFTER_WRITE > > > > >> Is there a write lock switch on the side of your card? Most likely not > > > >> since your using micro sd. > > > > >> My MSD still needs work, but I'm getting closer. still not working so > > > >> well at the moment. I thought I was getting somewhere, but there have > > > >> been setbacks. If you do get SD card working, I'll give you my latest > > > >> MSD code. It doesn't support writes yet anyways. > > > > >> Matt. > > > > >> On Nov 6, 4:31 am, Sebastien Lelong <[email protected]> > > > >> wrote: > > > >> > Hi Matt, guys, > > > > >> > I'm having a really weird problem with SD-card on my jaluino bee > > > >> board.It > > > >> > used to work but not anymore, though same hardware and same software > > > >> > (backup HEX file that was working). > > > > >> > Here's the story... > > > > >> > I built a new Bee board, using 18f25K22 instead of 18F27J53. When I > > > >> tried > > > >> > to test sd card it didn't work. Note I programmed 25K22 using > > pickit2, > > > >> with > > > >> > SD-card plugged, while Vpp = 11/12V (IIRC). 27J53 uses 3V3 as Vpp, > > no > > > >> harm > > > >> > to the card can be done... My try didn't work, can't write/read to > > > >> Sd-Card. > > > > >> > I tried back on the Bee board, on which I knew it was working. Now > > it > > > >> > didn't work at all. I thought I damaged the card with bad voltage, > > but > > > >> > Windows is happy use it, format it, read and write to it. So I'm not > > > >> sure > > > >> > it's actually damaged. > > > > >> > Still, using the exact same hardware (I rechecked connection just in > > > >> case: > > > >> > OK), the exact same software (HEX I preciously saved), no luck > > > >> anymore... > > > > >> > I tried to track down where it fails. It seems it can't > > terminate/close > > > >> a > > > >> > SD sector. The calling code is the following: > > > > >> > sd_start_write(20) -- get sd card ready for write at > > sector > > > >> 20 > > > >> > for 512 + 256 loop -- loop 1 sector + 1 half sector (512 > > + > > > >> 256 > > > >> > bytes) > > > > >> > print_string(serial_hw_data,writing) > > > >> > print_byte_dec(serial_hw_data,counter) > > > > >> > sd_data_byte = counter -- write 1 bytes of data > > > > >> > print_string(serial_hw_data,written) > > > >> > print_crlf(serial_hw_data) > > > > >> > counter = counter + 1 > > > >> > end loop > > > > >> > It actually says it's writing, until the 512th byte, that is, end > > of SD > > > >> > card sector. On the last failing call, sd_data_byte'put gets stuck > > in > > > >> the > > > >> > following while loop: > > > > >> > procedure sd_data_byte'put(byte in data_byte) is > > > > >> > [...] > > > > >> > if sd_byte_count == SD_BYTE_PER_SECTOR then -- end of sector write > > > >> > serial_hw_data = "s" > > > >> > sd_byte_count = 0 > > > >> > sd_sector_count = sd_sector_count + 1 -- increment sector > > count > > > > >> > spi_master = 0xFF -- send junk crc, crc is disabled > > > >> > spi_master = 0xFF -- send junk crc, crc is disabled > > > > >> > x = spi_master -- wait for a response > > > > >> > while x == 0 loop > > > >> > serial_hw_data = "." > > > >> > x = spi_master > > > >> > end loop > > > > >> > It just prints "." indefinitely... > > > > >> > Do you guys have any idea of the current problem ? Could the card be > > > >> > damaged and still Windows being to use it ? > > > >> > I'm afraid I don't have another card to test... > > > > >> > TIA > > > >> > Cheers, > > > >> > Seb > > > > >> -- > > > >> You received this message because you are subscribed to the Google > > Groups > > > >> "jallib" group. > > > >> To post to this group, send email to [email protected]. > > > >> To unsubscribe from this group, send email to > > > >> [email protected]. > > > >> For more options, visit this group at > > > >>http://groups.google.com/group/jallib?hl=en. > > > > > -- > > > > Sébastien Lelong > > > > -- > > > Sébastien Lelong- Hide quoted text - > > > > - Show quoted text - > > > -- > > You received this message because you are subscribed to the Google Groups > > "jallib" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/jallib?hl=en. > > -- > Sébastien Lelong -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
