Shop OBEX P1 Docs P2 Docs Learn Events
Baud rate question..... — Parallax Forums

Baud rate question.....

AdamLAdamL Posts: 30
edited 2010-07-12 20:41 in BASIC Stamp
Another question for ya.....

I'm having trouble getting requested data from a conected unit.· The device runs at 10400 baud, b-bit, no parity, non-inverted (supposedly, tho they aren't sure on the last one).· From the help file, I calculated a value of 76 (assuming it's non-inverted) or 16460 (assuming that it's inverted).· But I'm getting nothing.· I've run it with and without a 22k-ohm resistor on the Input leg, and there's no difference.· Any ideas?

Thanks again,

Adam Lambertus

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-11 20:43
    Interesting...10,400 bps and how many bits?· You said b-bits.· What is the device?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • AdamLAdamL Posts: 30
    edited 2005-11-11 20:52
    Whoops. I meant to say 8-bits. The device is an interface board for a back-up sensor in a car. We are tapping into the diagnostic link, which runs under ISO-9141 configuration #5 (bi-directional K line without inclusion of L line)
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-11 21:12
    So it's not RS232....

    You have to do some creative things, me thinks, to get it to read.

    Parallax sells their CANBUS controller that, I THINK, covers ISo-9141.

    I picked up an ODB2 Interface IC from these guys www.elmelectronics.com/
    Sadly, I was only able to interface to it from the pc end...but never did have the time to connect it to my jeep to get some readings.

    They have some Circuits in their PDF wrt connecting their IC to it.
    I think the IC you want to look at is the ELM323.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • AdamLAdamL Posts: 30
    edited 2005-11-11 21:17
    Supposedly, I'm connected to an interface board that IS RS-232. And before anyone asks, yes, common ground is connected. But the baud rate being 10400 is interesting......
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-11 21:25
    Well, ODB2 is 'special' if not unique! haha

    I've recently bought a MAC and don't have my Parallax stuff on it yet!

    I mean, if you know its baudrate and it's parameters (N81..etc..) then calculating for TRUE or Inverted is no big deal, you would just flip the numbers if you weren't getting anything.

    have you tried connecting to the rs232 converter thing with a terminal program first? Hyperterm or Procomm?

    Are you running the converters TX pin in to the right Stamp input pin (or PC RX pin?)?

    OH...and DO keep that 22kohm resistor in there to be sure you don't kill the stamp pin.
    Are you sure that the levels coming out of the converter are RS232 levels? or are they dumbed down 5volt levels?
    If you have 5volt levels, then the 22kohm resistor wouldn't be needed, and just might prevent a proper data path!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • AdamLAdamL Posts: 30
    edited 2005-11-11 22:11
    When I throw my voltmeter on the pin coming into the Stamp module, I get a -8volts. After the resistor, it's down to -.536Volts. So it looks like something, but I'm not sure what.

    Soooo.....I'm guessing that I need to recalculate the resistor used, so as to bring it to 5volts.....but that -8volts bugs me......

    Can the board use a -8 (or -5) volt signal???
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-11 23:17
    Don't worry about the -8....RS232 voltage levels are typically -12V to +12V (or -/+10 OR -/+8 OR -/+5...depends on the gear)....
    -12V on the Tx line is usually the voltage level that it sits at while it's idle.
    -12 corresponds to a logic 1 (which is usually a +5volt level which is why we say that rs232 is inverted in the baudmode)
    +12 corresponds to a logic 0 (which is usually a 0volt level.....).
    The stamp pin only sees things above and below the threshold level (I think it's around 2.25volts, but someone can correct me)...
    so if the stamp sees a voltage on its pin that is over the threshold, it assigns it as a logic 1 (or high)....if it sees a voltage below the threshold, it assigns it as a logic 0 (or low).
    Again, these voltage levels are opposite when comparing TTL and rs232 (so TRUE and Inverted).

    The stamp should see the -8 as a logic 0 and it would see a +8 as a logic 1.
    The resistor is there to limit the amount of current going to the stamp so it doesn't fry...there are built in clamping diodes on the stamp (to each pin) that will clip the voltage to 5volts....so with the 22kohm resistor you should be just fine!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • ForrestForrest Posts: 1,341
    edited 2005-11-12 00:36
    Get you acronyms correct:
    MAC stands for Media Access Controller - a network interface
    Mac stands for Apple Macintosh
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-12 05:23
    Maybe I was referring to a Big Mac!?

    Never heard of someone buying a new MAC address....agreed, the format of the word may be off, but maybe I assume too much that people will read it in context!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • FranklinFranklin Posts: 4,747
    edited 2010-07-11 05:16
    Frohman, You need to start your own post if you have a question not "hijack" someone elses post. You will get answers faster and be able to know when people are responding to your post and not the original.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • FrohmanFrohman Posts: 10
    edited 2010-07-12 20:41
    srry
Sign In or Register to comment.