Shop OBEX P1 Docs P2 Docs Learn Events
Can you help me? — Parallax Forums

Can you help me?

JeffreyJeffrey Posts: 9
edited 2005-03-15 13:37 in BASIC Stamp
How can I get the Basic Stamp to talk to a USB Device?

Post Edited (Jeffrey) : 3/14/2005 7:05:59 AM GMT

Comments

  • GadgetmanGadgetman Posts: 2,436
    edited 2005-03-14 11:20
    The general consensus is that the Basic Stamp can't talk to any USB device.

    It just isn't capable of handling the amounts of data needed for the most minute operations, or the timing to execute them correctly.

    Yes, I know there are USB BOE boards, or whatever, out there, but they get past this limitation by having an USB-Serial adapter IC aboard.
    The USB interface is a strict Master/Slave system, and the chip is only capable of being a Slave device, and cannot be used to control other slave devices like Mice, memory-sticks, or whatever.

    But... What is it you want to accomplish?
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-14 16:07
    You need a PC to be a 'USB Master' device. The BS2 can be a 'USB Slave' device using the FTDI chip-set, or a USB to Serial adapter (which is also a 'USB Slave' device).

    The BS2 cannot be a 'USB Master' device, therefore cannot use USB drives, USB mice, or USB joysticks.
    If you put a PC in the middle to be the 'Master', then you can write code for the PC to read from the BS2, and write to other USB devices for you. Of course, once you put the PC in the middle, you kind of lose the low-power stand-alone nature of the BS2 -- you might as well just write the PC program without the BS2.

    What device did you want the BS2 to talk to?
  • JeffreyJeffrey Posts: 9
    edited 2005-03-14 18:25
    A USB Card reader.
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-14 20:25
    Ahh, yes, a USB Card reader IS a 'USB slave' device. You'll need a PC between the Card Reader and the BS2. Sorry about that. Now, if you had an RS232 based Card Reader, the BS2 could talk to it. Even then, though, the BS2 has very limited memory, it might not work.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-14 20:36
    If you just need to read one type of card, you can just interface it to the stamp directly, MMC/SD is particularly well suited for this, CompactFlash is a bit more difficult but still do'able.
  • JeffreyJeffrey Posts: 9
    edited 2005-03-14 21:28
    How can I interfacs to a SD card?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-14 21:37
    SD has a SPI compatibility mode, www.sparkfun.com has a breakout board and some links to the specification of communicating with them and some people who have interfaced microcontrollers with them, I dont think anyone linked to used a stamp, but you may want to google "stamp SD" and "stamp MMC" to see if anyone has posted code to do it.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-14 21:43
    Ok I couldn't find anything, you may want to talk with Jim McCorison, I know he bought an interface board, and I believe he will be interfacing it with a stamp.
  • JeffreyJeffrey Posts: 9
    edited 2005-03-14 21:53
    Ok.

    Thanks for the help Paul,·Gadgetman·and allanlane5.

    Post Edited (Jeffrey) : 3/14/2005 10:12:52 PM GMT
  • JeffreyJeffrey Posts: 9
    edited 2005-03-14 22:06
    How can I interfacs it to a CompactFlash card?
  • SPENCESPENCE Posts: 204
    edited 2005-03-14 22:49
    HERE IS ANOTHER THAT I HAVE MENTIONED BEFORE AND IS MORE VERSATILE.

    http://www.ghielectronics.com/ALFAT-SD.htm

    http://www.ghielectronics.com/ALFAT DEV.htm

    THEY ALSO HAVE THE DEV BOARD WHICH APPARENTLY WILL INTERFACE TO IDE DEVICES AS WELL. I/O IS SPI AND RS-232 AS I RECALL.


    73
    SPENCE
    K4KEP
  • JeffreyJeffrey Posts: 9
    edited 2005-03-14 23:12
    Ok.

    I like the ALFAT DEV but not the price.
    I like the ALFAT-SD and I like the price.

    Thanks for the help SPENCE.
  • SPENCESPENCE Posts: 204
    edited 2005-03-14 23:34
    Jeffrey

    i am going for the dev board because.

    1. Rs-232 or spi
    2. Interface to cf or sd or ide hard drive or maybe even a
    ide zip 250 or 750!!!!!!!!!!!!!!!!!!!!

    Also it will accept machjine level commands or ascii commands if you were using a program that would send a file of data to a or a lt hard drive with the additions of a or receive data and send to a other file system.
    Ie yapp.com.

    Another thing. Since it puts the data on the ide device in proper fat format, you should be able to load a small hard drive or a lt 2.5" hard drive with the addition of a starttech.com ide4044 cable adapter from compusa for about $5.00 and hook the mini hd to the big system on your desk directly. No reformating of your data required.
    And you can move the data the other direction if you wish..

    73 spence
    k4kep
  • JeffreyJeffrey Posts: 9
    edited 2005-03-15 00:11
    Yes I like the ALFAT DEV because of it can do SD/MMC CF and a HD.

    You can go to this page: http://www.saelig.com/Suppliers/ghi/alfat.htm

    Post Edited (Jeffrey) : 3/15/2005 12:22:08 AM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-15 13:37
    Darn, what a nice device! Brand new (the SD won't be released till April).
    SPI and RS232 interface. FAT file support. Very nice.
Sign In or Register to comment.