Maker Pro
Maker Pro

whether possible for a microcontroller (in a separate pcb) to read from pen drive?

psram

Mar 23, 2013
2
Joined
Mar 23, 2013
Messages
2
Dear members

I am doing some work in embedding systems. I want to know the possiblity of reading a database from a pen drive by a microcontroller. Actually the microcontroller is in a separate pcb. Can we program the microcontroller to read the database and work according to it? Give me suggestions please.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
NOTE: The first part of this response talks about an approach with SD cards.

It all depends on what the microcontroller is and what the database is.

If the uC has quite a bit of program memory and ram, you may be able to use something to read FAT files. From there, if the file is stored with a simple structure, the uC should be able to parse it (the less parsing the better).

Alternatively, you can write to the card as a raw device, imposing your own data structure on it. This will reduce the complexity to the uC, but make it a lot harder to access from another device (maybe you can have another uC that provides that interface via USB?)

Oh, pen drive... I was thinking SD card. Different USB sticks tend to have different drivers under windows, so they may have to be handled differently at a low level. That may be a burden for the uC. Also you now need a host port, and I have no experience with them (in a uC environment)

If you can get by with an SD card in an SD to USB enclosure, then you can talk directly to the SD card from the uC (which is relatively easy) and via USB (by placing it in the adapter) to talk to a PC.

Sorry if this isn't a lot of help.
 

psram

Mar 23, 2013
2
Joined
Mar 23, 2013
Messages
2
NOTE: The first part of this response talks about an approach with SD cards.

It all depends on what the microcontroller is and what the database is.

If the uC has quite a bit of program memory and ram, you may be able to use something to read FAT files. From there, if the file is stored with a simple structure, the uC should be able to parse it (the less parsing the better).

Alternatively, you can write to the card as a raw device, imposing your own data structure on it. This will reduce the complexity to the uC, but make it a lot harder to access from another device (maybe you can have another uC that provides that interface via USB?)

Oh, pen drive... I was thinking SD card. Different USB sticks tend to have different drivers under windows, so they may have to be handled differently at a low level. That may be a burden for the uC. Also you now need a host port, and I have no experience with them (in a uC environment)

If you can get by with an SD card in an SD to USB enclosure, then you can talk directly to the SD card from the uC (which is relatively easy) and via USB (by placing it in the adapter) to talk to a PC.

Sorry if this isn't a lot of help.



Thanks

I will try with memory card / sd card

But I need more about the best Software to write the program in uC and software for PCB with simulation, etc
 

dpenelob

Mar 27, 2013
15
Joined
Mar 27, 2013
Messages
15
Hi psram,

another approach of that problem would be to use an ARM Cortex-M3 µC
which has imho a USB host connector. There are development boards on eBay
that should help you out.

The ARM should also be able to access the database in a meaningful way.

Best regards,
dpenelob
 
Top