Shop OBEX P1 Docs P2 Docs Learn Events
BS2SX Serin 9600/8/N/1 gobbleygook — Parallax Forums

BS2SX Serin 9600/8/N/1 gobbleygook

IdtatIdtat Posts: 7
edited 2006-04-15 05:16 in BASIC Stamp
Hi All,
I am trying to use the BS2SX to recieve and parse some incoming RS-232 char strings from an ANI (radio ID number decoder, Automatic Number Identifier) then reformat the string and send it (RS-232) to a video char generator. This will recieve the radio ID number of a transmitting portable, format it, and overlay the ID number on a CCTV monitor (video).

I have coded a VB6 program to simulate the RS-232 ANI decoder output, 9600/8/N/1 eg "0712 14:22:35 04/14/06" radio ID, time, date, as now that the Deputies have the decoder in the control center they won't let me have it to do any testing or prototyping.
Hyperterm receives this fine when testing the VB6 code but I am having issues getting the BS2SX to see the string.

I have done some Serial Com with the BS2 and BS2SX in the past but can't find my notes.

All I get is trash from the debug window with the following code, any help with what I am missing would be great!!!!

DB9 pin3 and pin5 from ANI or VB6 laptop to BS2SX P8(pin13) and gnd.


'***BS2SX CODE***

ani var word

testloop
serin 8,16624,[noparse][[/noparse]ani] '***have tried many modes but not all
'pause 250*** cant remember if this helped in past code............ dosent make it work this time...............
debug ani

goto testloop
end
'***END OF CODE***

Thanks to any and all who have a comment or suggestion.

Aaron

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-04-15 04:27
    Aaron -

    How much of this data string are you trying to capture?

    /code

    ·Field···· Field····· Field
    ··· 1·········2··········3
    "0712 14:22:35 04/14/06"
    ·xxxx· nn nn nn· nn nn nn

    code/

    Do you need "0712" or will "712" do, in the radio ID field?

    Is there some reason why you're using an inverted baudmode? If not, I'd try using 240 rather than 16624, if you're getting nothing but garbage

    I'm just slightly surprised there is no lead-in character (* or # or ! or something like that). That would be helpful in firing off the SERIN command at the appropriate time.

    Regards,

    Bruce Bates


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • IdtatIdtat Posts: 7
    edited 2006-04-15 05:16
    Hi Bruce,

    I would like to capture the entire string, including the "EMER" message that comes through when the officer activates the "MAN DOWN" button. I would then parse the string and reformat it for the video char gen with its reqired formating string.

    I have tried several of the baud modes with no luck.

    The lead in char is currently a "0" but if we start using four digit ID numbers is would be lost, I will try the WAIT argument in the morning.

    Thanks for the reply,

    Aaron
    IDTAT, (It Does This And That), what I tell my wife when I make an engineering thingy in the garage shop..........
Sign In or Register to comment.