Shop OBEX P1 Docs P2 Docs Learn Events
SX28 Keypad used as a slave to a BS2px ? — Parallax Forums

SX28 Keypad used as a slave to a BS2px ?

T&E EngineerT&E Engineer Posts: 1,396
edited 2006-01-11 14:53 in General Discussion
In the Help section of the SX-Key editor v3.1 software, there is an example program showing how to use an SX-28 with a 4x4 matrix keypad. I would like to use this as a modified program (no 7 seg display needed as my current design will use a serial LCD anyway).

What I want to do is use the SX28 as a driver IC or slave to a BS2px being the master.

Has anyone done this?

I take it that I will have to use SEROUT and SERIN commands to a pin on the SX-28 and BS2px to receive the keypad strokes on the BS2px.

Comments?

Thanks,

Timothy Gilmore

Post Edited (tdg8934) : 1/5/2006 9:22:42 PM GMT

Comments

  • RsadeikaRsadeika Posts: 3,862
    edited 2006-01-05 21:31
    Timothy,

    I just did a connection between an SX28 and an SX52. You may want to go through my thread, SX to SX communication SX/B. I have a couple of very basic programs, if you have any questions about it I could try to help.

    Ray
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-05 22:16
    What I would do is use a simple serial protocol (use open baud mode, just one wire) to have the BASIC Stamp ask for a keyscan, let the SX do that, then send back the result on the serial connection. This is one you could knock out in an afternoon.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-05 23:48
    Jon,

    What does "Open Baud Mode" mean?

    19.2K ?

    Timothy Gilmore
  • MacGeek117MacGeek117 Posts: 747
    edited 2006-01-06 00:34
    Look at the help file in the BASIC Stamp Editor under SERIN/SEROUT.
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are·3 kinds of people in the world,

    the dreamers, the do-ers, and the "Oh, what's this button do"-ers.
    Formerly bugg.
    www.parallax.com
    www.goldmine-elec.com
    www.expresspcb.com
    www.startrek.com
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-06 00:48
    In open baud modes the serial line is only driven in one direction (state of a "1" bit) -- the idle state is allowed to float and is handled by a pull-up (open true) or pull-down (open inverted).· I typically use open true and a 4.7K pull-up on the serial line.

    This is an old article but will give you an idea: http://www.parallax.com/dl/docs/cols/nv/vol5/col/nv116.pdf

    The article will show you how to user serial commands with an external device; just ignore the old SX/B syntax -- we've come quite a long way with SX/B since I wrote this column.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-06 00:51
    In fact, here's a piece of Parallax production code for a an EFX group product called the RC-4 -- so you see, even we use SX/B in our products.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-06 01:29
    That's great information Jon!

    Thanks for the clarification.

    Timothy Gilmore
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-07 01:07
    Jon,

    I learned from the RC-4 code and the NV article to correctly interface the SX-Key Help (SX-28 matrix keyboard example) to my BS2px.

    It works great using Open Baud "True" 9600.

    I went from using 10 BS2px pins for individual pushbuttons to 1 BS2px pin as a serial input for the SX28 matrix Keypad driver circuit.

    When my matrix keypad comes in next week, I will be able to truely test it (other than using some wires and resistors for the time being).

    You are a wealth of knowlege and resources.

    Thanks so much!

    Timothy Gilmore

    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-11 14:53
    My matrix keypad came in last night and I wired it up as in the SX KEY help file suggests and it works great. As stated earlier, the SX28 is a slave serially to my BS2px and it works well. More info later as my project progresses.

    Thanks.
Sign In or Register to comment.