Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 18th August 2006, 07:01 PM   (permalink)
New Member
sahilgore is on a distinguished road
Default Write into Flash Memory thru Micro

I need to interface a micro with a mass storage device. There are many USB compatible microcontrollers available (eg: The 16 bit AMD AM186CU). I want to know if such a micro can directly write into a USB flash drive, or will I need some driver ICs in between. Also, how will the micro address the memory locations of the flash drive, or detect with of those are free. Can the micro also read the memory of the drive?

Any alternative suggestion would also be helpful. Basically, I'm using the micro for 24hr monitoring and data logging from 6 diff sensors. Just need to store the data in a user friendly, portable device to transfer to a PC after a finite time. On-chip memory and a RS232 connection to PC is not an option as the system (micro circuit) has to stay in the field and cannot be brought in.
sahilgore is offline   Reply With Quote
Old 18th August 2006, 07:08 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

I suggest you dump the USB idea! - check FLASH memory cards instead, there are plenty of FLASH memory card projects around using micro-controllers.

You might try searching here for all the other threads about it!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 18th August 2006, 07:43 PM   (permalink)
Experienced Member
 
freeskier89 is on a distinguished road
Default

If you really want to, you could use a SD card and then when you want the data you take the SD card out of the device and plug it into a card reader. Doing this manually in assembly would be rather time consuming because you would have to write your own fat file system format libraries.

A solution is you could buy mikroC which has a SD interface built right into it. The downside is it is $250.
freeskier89 is offline   Reply With Quote
Old 19th August 2006, 02:49 AM   (permalink)
Experienced Member
upand_at_them is on a distinguished road
Default

Quote:
Originally Posted by freeskier89
A solution is you could buy mikroC which has a SD interface built right into it. The downside is it is $250.
Then how about $38?
http://www.comfiletech.com/index.asp...PROD&ProdID=79

Mike
upand_at_them is offline   Reply With Quote
Old 19th August 2006, 02:52 AM   (permalink)
Experienced Member
 
freeskier89 is on a distinguished road
Default

That does look nice, especially at that price. It looks a bit bulkier than it needs to be, but all in all, it would be great for prototyping.
freeskier89 is offline   Reply With Quote
Old 21st August 2006, 05:56 PM   (permalink)
Paul Obrien
Guest
Default

CompactFlash is IDE compatible so if an IDE interface is included in the circuit you read and write to the flash card with reasonably simple commands.
  Reply With Quote
Old 21st August 2006, 08:02 PM   (permalink)
Experienced Member
 
Oznog is just really niceOznog is just really niceOznog is just really nice
Send a message via AIM to Oznog
Default

SD cards have a SPI interface, which is very simple and many PICs have as a hardware module. It is also easy to bit-bang.

I think the SD card may have somewhat large block size that requires significant PIC RAM to buffer, but I'm not sure.

There are a bunch of projects on the web where they've interfaced the SD card with the PIC.

You can buy SD card sockets for under $1 from Digikey/Mouser. It's very simple. Power and a few data wires. I seem to recall the interface may be 3.3v though, if that's true you'd either need to add some level converting components or use a low voltage PIC with a 3.3v supply.
__________________
I thought what I'd do was I'd pretend I was one of those deaf-mutes.
Oznog is offline   Reply With Quote
Old 24th August 2006, 07:16 PM   (permalink)
New Member
sahilgore is on a distinguished road
Default Thanks, shall try out an SD card interface.

Hey, thanks guys. Will try out the SD card idea, although I'm not too keen on using a PIC. Have worked with the 8051 CPU before. Atmel has come out with a new chip 89C51SND2C which supports SD and MMC cards. It also has flash memory read/write capabilities. Would like to explore that first, as I'm more comfortable with the C51 architecture and instruction set.

Does anyone feel a PIC would be a better option? If yes, why?
sahilgore is offline   Reply With Quote
Old 24th August 2006, 07:44 PM   (permalink)
New Member
sahilgore is on a distinguished road
Default

Found an SD card reader with USB interface.

http://insidecomputer.stores.yahoo.n...b20sicar1.html

$10 is not bad. Saw a few cards available for the same price. Suits me need perfectly. Need to interface a micro thru SPI to write into the card now. I read on the net (and on some other threads) about SD interfacing, and it seemed like a lot of people were have problems with it. Is it as bad as it sounds? Wikipedia also says that SD card specifications are not freely avilable yet.
sahilgore is offline   Reply With Quote
Old 24th August 2006, 08:03 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by sahilgore
Hey, thanks guys. Will try out the SD card idea, although I'm not too keen on using a PIC. Have worked with the 8051 CPU before. Atmel has come out with a new chip 89C51SND2C which supports SD and MMC cards. It also has flash memory read/write capabilities. Would like to explore that first, as I'm more comfortable with the C51 architecture and instruction set.

Does anyone feel a PIC would be a better option? If yes, why?
They aren't really any better or worse, just that a PIC has become a generic name for a micro-controller - use whichever processor you're comfortable with!. If Atmel have a processor that supports the cards, and you're already familiar with Atmel devices, then go for that - it would be stupid to change to a PIC when you're already using Atmel ones.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 25th August 2006, 10:42 PM   (permalink)
Experienced Member
 
freeskier89 is on a distinguished road
Default

Quote:
Originally Posted by sahilgore
Found an SD card reader with USB interface.

http://insidecomputer.stores.yahoo.n...b20sicar1.html

$10 is not bad. Saw a few cards available for the same price. Suits me need perfectly. Need to interface a micro thru SPI to write into the card now. I read on the net (and on some other threads) about SD interfacing, and it seemed like a lot of people were have problems with it. Is it as bad as it sounds? Wikipedia also says that SD card specifications are not freely avilable yet.
You can get a set of general specs (still like 100+ pages long) from sdcard.org I believe. If you are using a mcu with support for reading and writing files in FAT format you should not have any troubles. If you aren't however, then you will have to spend quite some time getting it to work.
freeskier89 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 05:40 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.