Shop OBEX P1 Docs P2 Docs Learn Events
Serial ports — Parallax Forums

Serial ports

NewzedNewzed Posts: 2,503
edited 2004-09-19 23:47 in BASIC Stamp
I have a situation where the PC is talking to a peripheral using Visual Basic.
The data the PC receives must be passed to a Stamp.· If I connect the Stamp to a USB port can both ports be used simultaneously?· Does the Stamp receive the VB data from the PC as serin 16.......?
Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Try the Stamp Tester

http://hometown.aol.com/newzed/index.html
·

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-18 15:44
    A USB port is justa another type of serial port so yes, you can get data from on port and then send it out another. Just remember that the BASIC Stamp programming port echoes everything it receives, so VB will have to filter that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • K de JongK de Jong Posts: 154
    edited 2004-09-18 17:51
    Hi Sid,

    I have the feeling that I do not really understand what you mean. Do you have an USB to serial adapter to feed your Stamp or are you using a serial connection from PC to the Stamp? Or do you use your USB cable just to power your Stamp.

    Lots of questions as you can see. Can you point out a little more what you are doing??

    Regards,

    Klaus
  • NewzedNewzed Posts: 2,503
    edited 2004-09-18 18:11
    Hi, Klaus - hoe bent u?

    Jon Williams answered by question - the PC is using the serial port to communicate with a peripheral device.· The Stamp is using the USB port to communicate with the PC via a USB to serial adapter.



    Sid
  • K de JongK de Jong Posts: 154
    edited 2004-09-18 19:41
    Hi Sid,

    OK, now it is clear to me (takes a while sometimes wink.gif.

    Does this USB to serial adapter give the power for the Stamp as well?

    Klaus



    PS Hi, Klaus - hoe bent u?

    In Holland we say: "how is it going" smile.gif.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-18 19:51
    Check our web site on Monday for our new USB BOE. Just note, however, that it does not take power from the USB connection (since we have no idea what someone will connect to it, and what other load is placed on your USB port power supply).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • NewzedNewzed Posts: 2,503
    edited 2004-09-18 20:27
    Sorry about that, Klaus.· Ik·spreek·zeer·goed geen Holland [noparse]:)[/noparse])

    No, no power from the USB.

    Sid
  • K de JongK de Jong Posts: 154
    edited 2004-09-18 21:45
    You speak a Dutch that I can understand, Sid !!

    The only thing I wanted to point out is that Dutch people and American people sometimes say the same things in a different way.

    I actually have a datalogger running here on USB power, it draws 40 to 140 mA. It is not a problem for the stability of my datalogger but if I ad other loads (ie 'real' USB devices) to the same port voltage drops from 4.8 to 4.3 Volts. Lucky enough when designing my datalogger I have put in a compensation for supply voltage changes.

    I like to power small devices (up to say 150 mA) with USB, mainly because there is a USB hub with free ports on my desk. It's so easy.....

    Klaus
  • NewzedNewzed Posts: 2,503
    edited 2004-09-18 21:55
    I noticed the same thing, Klaus.· My USB Stamp runs great up to a total current draw of about 150ma.· Once you start drawing 200ma or more with peripherals, like and LCD with back lighting, the voltage starts dropping off.
    The dropoff doesn't seem to affect the Stamp but it does affect the LCD.

    Even so, I think the USB-powered Stamp board·is still a very good thing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Try the Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-19 04:35
    Since you have the power portion worked out, maybe you could experiment with the FTDI chips (we carry them) so that you can program your board through the same connection.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • ecourtecourt Posts: 13
    edited 2004-09-19 07:31
    To Newzed
    You can solve a lot of USB power problems if you use a powered hub.
    The power does not come from the PC but from a separate power brick (2A for 4 USB ports)
  • K de JongK de Jong Posts: 154
    edited 2004-09-19 11:32
    Yes ecourt, your totally right. A powered hub will give less voltage drop but on my system it also gives a voltage of over 5.5 Volts at the USB power pins.

    So, USB is NOT really 5 Volt, it is more or less between 4.5 and 5.5 Volts which is not as good as a LM7805 by far smile.gif.

    Regards, Klaus
  • K de JongK de Jong Posts: 154
    edited 2004-09-19 20:55
    Jon,

    Thanks for the tip on the FTDI chips. They may give my project a major impuls as it is devellopping.

    There is only one thing I could not figure out yet, I will need suitable prototyping boards for 32 pins on 30 mil spacing and I did not find them here in Europe until now. Does Parallax stock them as well?

    Thanks again, this is a good tip !!

    Klaus
  • NewzedNewzed Posts: 2,503
    edited 2004-09-19 20:59
    Klaus, you can't have pins on 30 mil spacing.· Did you mean 300 mil spacing?· Are you talking a 32-pin DIP?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Try the Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • K de JongK de Jong Posts: 154
    edited 2004-09-19 21:16
    Hi Sid,

    For a DIP you are totally right.

    This is for the FTDI chip Jon mentioned earlier in this thread and the pakage is called LQFP-32. It is a square chip of 7x7 mm with 8 pins on each side. This makes the pin spacing 0.8 mm or 30 mil.

    So, in case I go on with this and start soldering these miniature pins there will be no beer and no coffee for a couple of days in order to get my hands stable enough smile.gif)))).

    Klaus
  • NewzedNewzed Posts: 2,503
    edited 2004-09-19 21:27
    Those chips are very difficult to solder, Klaus.· I hope you have solder paste in a syringe and micro-tip iron.· Those chips don't have fingers - the connections·are like little rings that wrap around the edge of the chip.· The only area you have to solder is where the ring touches the pad on your PC board.

    I think you can buy adapter sockets for them - not sure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Try the Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • K de JongK de Jong Posts: 154
    edited 2004-09-19 22:00
    Yes, I know Sid,

    The smalles size I did until now was 50 mil, but that was before I got my glasses and my magnifieing lamp. I have a miniature soldering Iron and 0.5 mm soldering wire for these things.

    Unless I find a better way I may have to go this road.

    But this FDTI chip is very interesting, you get not only USB power supply but also USB data transfer. I like it !!

    Klaus
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2004-09-19 22:20
    Klaus -

    Here are some prototyping adapters from the LQFP-32 format to DIP format which may be helpful: http://www.epboard.com/eproducts/protoadapter1.htm . Just too bad they're so expensive!

    Regards,

    Bruce Bates
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-19 22:38
    Klaus is right: the parts are small and not terribly easy to deal with from a prototyping standpoint -- we went through a couple sets of boards until we were happy with the USB-to-TTL serial conversion (which will also be available soon as a separate module so you can use any TTL serial output from your BASIC Stamp or Javelin Stamp to talk with a USB port).· You can see how small the FTDI chip is in the attached image.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • K de JongK de Jong Posts: 154
    edited 2004-09-19 22:53
    The chip is on the left side of the board, just below the USB connector at the level of pin1 and pin2 of the Basic Stamp and it is black.

    I just tell you, otherwise some people might miss it, it is only 0.28x0.28".

    I'll find a way, this tip from Bruce should work for a prototype but it will give me a 32 pin DIP connector, which is a fairly large shoe for such a small chip.

    Klaus
  • Buck RogersBuck Rogers Posts: 2,175
    edited 2004-09-19 23:47
    Hello from Buck Rogers

    One of the firms that sells FTDI parts, (see their website, no I don't remember it.), sells premade boards. Your choice of either serial I/O, or parallel. But I appllaud Parallax for selling the FTDI parts, they need another dealer. The only ones that FTDI had chosen, until Parallax were a bit odd.





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buck Rogers

    www.gregg.levine.name
Sign In or Register to comment.