Shop OBEX P1 Docs P2 Docs Learn Events
Need help--how can I use BS2 to control Kitsrus K108 I/O module......SEROUT? — Parallax Forums

Need help--how can I use BS2 to control Kitsrus K108 I/O module......SEROUT?

ChrisOChrisO Posts: 10
edited 2005-01-30 22:39 in BASIC Stamp
Hello-

I have an 8-relay serial I/O controller board I would like to use in a project (Kitsrus Model K108). This unit was designed to run off a PC via the serial port, and control the relays via simple text commands (ie "N1" for relay 1 on, "F1" for relay 1 off, and so on). It is not stand-alone programmable.

I recently began working with the BS2, and would like to use it, as an embedded controller hooked up to the K108 I/O board in a project to control a series of 100W floodlights.

I have been trying to use the SEROUT command, with a straight through cable connected from the BOE 9-pin, to the 9-pin on the K108. I set the parameter in my BS2 program to output to 'pin 16'--the serial port--and entered the number for the proper baud rate, etc, and put N1, CR in brackets (the K108 docs says a CR must be received before the command is executed), PAUSE 500, and then F1, CR.

My program loaded successfully into the BS2, and when its running still hooked to my laptop, I can see the light on my USB-to-Serial adaptor, flashing.....so I know the BS2 is putting the output out it's port.....but when I hook the BS2 to my K108, nothing--no relay activity, no Data LED flashing on it, at all.

Has anyone out there, used this I/O unit with the BS2 before? Basically, it's just a ULN2803 Darlington array, hooked to the relays, and controlled by a pre-programmed AT89C2051 microcontroller (reading numbers off the ICs). It's just a nicely-built module, I'd really like to use since I have it.

Any ideas or help would be GREATLY appreciated. My project is due Feb. 10th. [noparse]:)[/noparse] Thanks!

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-27 04:34
    That should be easy. I'm betting that your baud rate setting is not correct. Use the attached template for your tests -- it allows you to set the baud rate based on the BASIC Stamp module that you're using; it also allows you to select True (which is what you need, I believe) or Inverted very easily.

    Using this template you should have a Baud definition like this:

    Baud    CON    T9600
    


    If I'm wrong and you need inverted mode, change the definition to this:

    Baud     CON     T9600 + Inverted
    




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-30 22:26
    RandyAz -- I think you can.· I looked at the specs and it control of that box is quite straightforward.· The design is setup to allow a terminal program to control the 108, so the BASIC Stamp will have no problem with it.· I've attached the document that I'm referring to -- perhaps we're not talking about the same device.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • randyazrandyaz Posts: 61
    edited 2005-01-30 22:39
    ugghh... you beat me to it...I went back to take a look and yes it will work...

    Sorry ChrisO... hope you share a project "how-to" with us...
Sign In or Register to comment.