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
 
LinkBack Thread Tools Display Modes
Old 6th August 2006, 04:54 AM   (permalink)
Default sample source code

Dear frinds

I want to conect the PIC16c745 to USB flash disk with USB port on PIC
that i can write the file on flash disk and then read this file by PIC or PC
How I can do this?

please introduce to me a sample project with PIC source code

Thanks very much
Mark1980 is offline  
Old 6th August 2006, 09:16 AM   (permalink)
Default

2 things...

1. PIC16C745 should be considered as obsolete, they are really old and useless now. Consider a 18F2550, 18F4550 or anything else in the 18F serie

2. A pic can't host a USB device.
__________________
Steve
mister_e is offline  
Old 6th August 2006, 10:32 AM   (permalink)
Default Why

Dear Steve

Thank you very much

Yes, they are useless but I can not provide the 18F series.

About section two why the PIC with USB port can not host the USB device we know that both of them have USB port. Would you explain your reason?
Mark1980 is offline  
Old 6th August 2006, 11:35 AM   (permalink)
Default

Hi Mark,

USB is quite complex and supports many different transfer modes. I did a quick scan of the datasheets and I think the USB hardware in those PIC's is limited to supporting slow speed interrupt transfers, and they are designed as endpoint devices only.

To connect to a USB disk you would need to make a USB host, this is quite different from an endpoint device, and it would have to support bulk transfer mode.

Even if you managed to write a cut-down host controller in software you would also need to implement one of several possible mid-level protocols such as SCSI, ATAPI, RBC, UFI etc.. the choice of which one would be dependant on the make model of flash disk you were using as not all flash disks use the same protocol, and some are not even publicly available standards.

Then there is the filesystem to consider. I suspect you want the flash disk to be readable by a PC ? If so you are going to need some code to handle this. e.g a FAT driver.

I've thought about a project like this in passing, seems to be quite a lot of work to do IMO. I don't want to discourage you tho!
StopGo is offline  
Old 6th August 2006, 04:23 PM   (permalink)
Default

what you need to use... to reduce pain, is a piece of hardware like that
http://www.crownhill.co.uk/product.php?prod=1577

Never use it as now.. but it suppose to do the job.
__________________
Steve
mister_e is offline  
Old 6th August 2006, 04:36 PM   (permalink)
Default

Quote:
Originally Posted by mister_e
what you need to use... to reduce pain, is a piece of hardware like that
http://www.crownhill.co.uk/product.php?prod=1577

Never use it as now.. but it suppose to do the job.
Looks pretty impressive!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 6th August 2006, 05:04 PM   (permalink)
Default

i agree. Also you could have only the IC... mmm
http://www.crownhill.co.uk/product.php?prod=1578

And the builder of..
http://www.ghielectronics.com/
__________________
Steve
mister_e is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 10:26 PM.


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

eXTReMe Tracker