Stamp and USB
nv-bob
Posts: 5
Has anyone ever used a stamp to communicate with a USB device?
I want to save data on a USB memory Stick.
Any help is appreciated.
Bob
I want to save data on a USB memory Stick.
Any help is appreciated.
Bob
Comments
·
I would·also like to know how to do this and if it is possible. I have a couple of ideas where large amounts of portable data would be useful and I have responded to this string so that if anyone posts a solution, I will also be notified.
·
I will also share my limited knowledge of USB protocol.
·
I went to a Microchip·presentation on using PICs as slaves on the USB bus (a 3 hour presentation doesn't make me an authority!). It seems that each USB device needs both a manufacturer code and a device code. You would need to find the Flash Ram’s codes.
·
The USB master continuously polls the bus at the minimum speed at station 0 on the bus to determine if any new hardware has been added. The added slave device then responds to the poll and tells the master its code and which station it is on and what speed it operates at. You also have various levels of priority on the bus and various levels of data integrity.
·
After all this, you have all the communications and operational software.
·
This is way beyond my “see input on pin 0, switch output on pin 8” type of programming.
·
Kind Regards for Kwa Dukuza
·
John Bond
A USB memory stick is a USB 'slave' device. So I think you are out of luck.
There do exist FlashCard interfaces for the BS2, you might try that approach.
Can you please tell me where I can find more information about the FlashCard interface?· I'll consider using any type of removeable media.
Thanks
Bob
BiPom sells a board which supports an MMC card and also has a DS1307 real time clock on board: www.bipom.com/periph_boards.shtm. I just got one a couple days ago, but forgot the breadboarding cable. Oh well.
Dealing with the card should be pretty easy. You just talk SPI to it. They have sample a sample application for it written for the BS2.
Jim
Thanks again for your advice and assistance. I never cease to be amazed by the collective knowledge of the people reading this forum.
Kind regards from Kwa Dukuza
John Bond
I'd forgotten about the Sparkfun one. I'd looked at it but decided on the BiPom so that I could focus on the software data reading and writing side initially instead of integrating the hardware. The MMC cards are 3.3 vdc devices so you then add voltage regulating and level shift buffers into the mix. I'll have to do it for myself down the road. But for me it was a walk first, run second affair. (Well, maybe crawl first, walk second.)
Jim
Basically the serial out (MISO) is fed directly into the stamp with the stamp input set to TTL (I dunno if you can do this with a stamp, Jim could help you here), but TTL's high voltage is a minimum of 2.0V or a healthy 1.3V margin, CMOS is 2.5V or a .8V margin, both will work, but if your in a noisey electrical environment CMOS might cause problems.
And the Serial In (MOSI), Serial Clock (SCLK) and Chip Select (CS) use a 1.8k/3.3k resistor voltage divider, you can just tie CS to ground if its the only SPI device your using and save two resistors. Then get a 3.3V fixed regulator to supply power to the card and your all set (well hardware-wize).
As I understand the stamp, it is TTL level... period. Anything above 1.6 vdc is considered a logic true. So the actual headroom for a logical true is 1.7 vdc.
I just did a quick scan through the MMC spec and agree with Paul. It appears that with only one MMC card being dealt with, and using SPI exclusively, the CS line can be tied low. But, again, I emphasize that I am just learning this stuff so I may have missed a subtlety.
Jim
Post Edited (Paul Baker) : 2/5/2005 5:43:12 AM GMT