View previous topic :: View next topic |
Author |
Message |
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
Posted: Tue Jun 04, 2013 8:58 am Post subject: Read text files from pen drive usb |
|
|
Hi,
you may, kindly, give me an example on how to read a text file stored on a USB pen drive?
I can do it with an ATmega8?
thanks
(BASCOM-AVR version : 2.0.7.6 ) |
|
Back to top |
|
|
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Tue Jun 04, 2013 10:27 pm Post subject: |
|
|
I note you started two topics almost identical for this.
USB is way too complicated to implement in small AVRs.
See the very long thread about how it can be done: http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=7537
My suggestion would be SD or microSD card and AVR-DOS.
SD card is gross overkill for the storage required, but the cards are cheap, and so are the connectors. You could do the same with a small eeprom, but it would have to be mounted in a holder of some sort, and a matching connector. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Tue Jun 04, 2013 10:41 pm Post subject: |
|
|
As a further off-the-wall thought. Create a PCB with a matrix of X-Y connections, say about 8 * 8 wires. Provide the AVR with a 16 way connector, 8 pins to each of two ports. Use a different connection matrix on each PCB issued - just solder bridges across some of the junctions. That gives you 256 possible different patterns. Then scan the matrix like a keyboard to recover the connection pattern. Issue one to each person. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
StigOE
Joined: 16 Oct 2007 Posts: 41
|
Posted: Wed Jun 05, 2013 1:25 pm Post subject: |
|
|
I didn't quite understand what your need actually is, but if you need to give something to your customers which you can later verify to make sure they are 'genuine', how about Dallas/Maxim 1-wire buttons? They're easy to read and each have a unique serial number. |
|
Back to top |
|
|
JC
Joined: 15 Dec 2007 Posts: 584 Location: Cleveland, OH
|
|
Back to top |
|
|
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
Posted: Thu Jun 06, 2013 7:25 am Post subject: |
|
|
Hi,
@edit by MOD ........
I must, of necessity, use a PenDriveUSB, formatted FAT32 ...
I need to read only 6 numbers ...
Please I need a valid way to follow ...
Thank you. |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Thu Jun 06, 2013 7:56 am Post subject: |
|
|
@Edit by MOD.....
I believe you expect some pre-made copy/paste code - but that's expected wrong.
Quote: | I must, of necessity, use a PenDriveUSB, formatted FAT32 ...
Please I need a valid way to follow ... |
A definite way to get exactly what you want, is to use a Vinculum VNC1L, it implements an USB-host, and that's what's needed to connect an USB-stick to an µC.
The VNC1 can do file-management on the stick, create files, rename, all that stuff.
Create a file with a 6 number file name, or create a file that holds said 6 numbers, maybe encrypted in some way, and you're done.
But no pre-made code there either, and that's the moment where you'd need a clue, read data sheets, implement the protocol, all that sort of stuff.
In two words: forget it. |
|
Back to top |
|
|
kimmi
Joined: 24 Feb 2006 Posts: 1922 Location: Denmark
|
Posted: Thu Jun 06, 2013 9:15 am Post subject: |
|
|
In the Italian BASCOM-AVR forum
You got all most same answers as here , _________________ / Kim |
|
Back to top |
|
|
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Thu Jun 06, 2013 10:37 am Post subject: |
|
|
Use it as a start. |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Thu Jun 06, 2013 10:45 am Post subject: |
|
|
atmega64 wrote: |
I have to write and read a 5-digit number on a support to be given to various people ...
|
What about a dallas (maxim) 1wire button?
It's robust, easy to implant and cheap.
_________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Thu Jun 06, 2013 11:34 pm Post subject: |
|
|
I have this really bright shiny new shovel, and its really good at digging holes, and I really like it, and lots of other people have them too. But I want to dig a hole 4 miles wide and 6 miles deep, please tell me how to do that !
In my opinion you are trying to use the wrong tool for the job. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
Posted: Fri Jun 07, 2013 7:27 am Post subject: |
|
|
I will work on VNC1 and let you know ...
PS: Thanks to serious and humble are always managed to reach my goal .... later in life you always meet the professors cock! ... but you just do not consider them! |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Fri Jun 07, 2013 8:12 am Post subject: |
|
|
atmega64 wrote: | PS: Thanks to serious and humble are always managed to reach my goal .... |
To be proactive would also help, there's not always somebody waiting to feed you with pap. And the internet is a great source for such information.
Quote: | later in life you always meet the professors cock! ... but you just do not consider them! |
Huh? Is this sentence an ill-mutated result of google translate? LOL |
|
Back to top |
|
|
|