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.

problem with sd card video door phone using 8051

Status
Not open for further replies.

ultrasonic.1991

Member level 3
Member level 3
Joined
Nov 6, 2015
Messages
60
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
554
hi I'm working on the code of a video door phone and I'm trying to improve it. with 16 GB SD card the pictures that the camera takes can be seen on the LCD but when I connect the SD card to pc using a SD card adaptor it shows nothing is in the drive. with 2 Gb SD cards it only shows the last taken picture and when I click to see the next photo a black page appears. the core microcontroller is a M8051W named BIT1802 i used standard commands provided by spec sheets for MMC and SDSC . can someone give me a hint about what the problem might be ?
 

If you are using FAT16 formatting, there is indeed restriction above 2GB - or 4GB depending on the library.
 

If you are using FAT16 formatting, there is indeed restriction above 2GB - or 4GB depending on the library.
i'm not using predefined libraries i wrote my own library i attached it here. it should be compatible with both fat16 and fat32
 

Attachments

  • file.txt
    39.6 KB · Views: 161
  • sd card.txt
    27.2 KB · Views: 167

SD card to pc using a SD card adaptor it shows nothing is in the drive.

What type of adapter? Is the card physically small therefore it needs an adapter to fit a large slot in your computer?

Or does the adapter change format to USB? The usb driver in your computer must be compatible with the incoming data. Its method of reading the chip must interpret the layout of clusters, or tracks, sectors, etc.... Most likely you're familiar with the technical side of it.

The capability of your equipment depends on the year it was manufactured. Does any piece of your equipment use the protocol SDHC, an upgrade from SD?

This web discussion might be pertinent:

superuser.com/questions/1281776/why-do-some-usb-readers-have-issues-to-read-large-capacity-sd-cards/
 

What type of adapter? Is the card physically small therefore it needs an adapter to fit a large slot in your computer?

Or does the adapter change format to USB? The usb driver in your computer must be compatible with the incoming data. Its method of reading the chip must interpret the layout of clusters, or tracks, sectors, etc.... Most likely you're familiar with the technical side of it.

The capability of your equipment depends on the year it was manufactured. Does any piece of your equipment use the protocol SDHC, an upgrade from SD?

This web discussion might be pertinent:

superuser.com/questions/1281776/why-do-some-usb-readers-have-issues-to-read-large-capacity-sd-cards/
it is a USB adapter. yes the card is small. i used both SDHC and SDSC protocols for supporting SDHC cards and SDSC cards.i think maybe the page you introduced doesn't have anything to do with what's going on here because my main problem is in the code. another thing which is noteworthy to mention is that the company i work for has 1000 2 GB micro SD cards so being able to use 2 GB SD cards is more important for me right now.
 

A reply at the superuser.com discussion states:

USB card readers implement the USB Mass Storage protocol, which presents the SD card as an unorganized sequence of sectors. The USB host (i.e. the PC) has to interpret those, and typically that's done by the OS. The OS will contain a FAT driver, exFAT diver, etc.

Disks are organized but not USB card reader mass storage protocol? I suppose It's an effort to distribute wear evenly across the flash memory (which has a limited lifetime of read/write cycles).
Anyway your computer expects to see a certain storage format.
Your card adapter expects to see a certain format.
All software routines along the path expect to see a certain format.

There's another reply in the superuser.com discussion which brings up speed compatibility. Too fast a rate or too slow a rate can result in dropped connections.

Is your own software routine designed to accommodate the lowest common denominator in your equipment?

Can you find a way to uncover status messages at each step of reading a card? Create a verbose report?

Suppose you format a card under DOS? And select a capacity of 1.9 GB (so there's no question of exceeding the 2GB limit)?
Verify all bytes are good via chkdsk command?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top