Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp and Transceiver Integration: Need Help Please — Parallax Forums

Basic Stamp and Transceiver Integration: Need Help Please

NightOWLNightOWL Posts: 8
edited 2007-03-23 20:43 in BASIC Stamp
I am pretty new to both BASIC Stamps and RF modules.· Me and a few friends are working on a project.·

We have the BS2-p24 stamp module, and the Aerocomm AC4490-200.· We are not using a development board of any time as we are soldering onto a pc board.

Now, if i correctly understand, i need to interface the transceiver to the "serial connection" of the basic stamp. so id only be connecting the transceiver to pins 1-4 mimicing the PC Serial Port connection given in the BS2-p24 module schematic.

First off, am i right with this?

Second, if this is the right interface for these modules.. can someone help me out with the programming to utilize it?· Like i said, I am new to this stuff. And all the help would be appreciated.

Sorry for more info; a temperature sensor gives data to the stamp and the stamp sends that data to the transceiver to be sent out.· The sensor acquires data every 5 seconds.

Post Edited (NightOWL) : 3/19/2007 6:42:52 PM GMT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-03-19 20:05
    You use serin and serout to send data to a pin. you need to know what the other device is looking to receive and format your output to comply. What form is the temperature sensor giving it's info and what does the transceiver want to see from the stamp?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-19 20:16
    Hello,

    Pins 1 – 4 represent the BASIC Stamp Programming pins. Unless the RF Modules are RS-232 level and require inverted data you would not use these pins. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • NightOWLNightOWL Posts: 8
    edited 2007-03-19 23:28
    yes, the RF module is RS-232 level.. as it uses TxD, RxD and such.. right? well it says its a 20-pin asynchronous TTL interface.

    and in regards to the sensor data.. the sensor is analog data.. which the stamp cant read, right? so we need to ADC it.. to input it into the stamp.. then from there i have to send it to the transceiver..

    below are the pins

    Pin Name
    1 GO0
    2 TXD
    3 RXD
    4 GI0
    5,16 GND
    6 Hop Frame
    7 CTS
    8 RTS
    9 GO1
    10,11 VCC
    12 9600_BAUD
    13 RSSI
    14 GI1
    15 UP_RESET
    17 Command/Data
    18 AD In
    19 DA Out
    20 IN_RANGE

    Post Edited (NightOWL) : 3/19/2007 11:50:29 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-20 03:21
    NightOWL,

    TTL is not RS-232…TTL levels would be found at the standard I/O pins so you would not connect to pins 1 through 4 but rather any standard I/O pins.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • NightOWLNightOWL Posts: 8
    edited 2007-03-20 18:48
    note taken, but..

    in the transceiver's manual.. it lists:

    When Interfacing the AC4490 to a DCE (Data Communications Equipment):
    DCE Pin/Name - Direction(Tranceiver) - AC4490 Pin/Name
    1 DCD - IN - 14 GI1
    2 RXD - IN - 3 RXD
    3 TXD - OUT - 2 TXD
    4 DTR - OUT - 1 GO0
    5 GND - - 5 GND
    6 DSR - IN - 17 CMD/Data
    7 RTS - OUT - 7 CTS
    8 CTS - IN - 8 RTS
    9 RI - IN - 4 GI0

    AND

    When Interfacing the AC4490 to a DTE (Data Terminal Equipment):
    DCE Pin/Name - Direction(Tranceiver) - AC4490 Pin/Name
    1 DCD - OUT - 1 GO0
    2 RXD - OUT - 2 TXD
    3 TXD - IN - 3 RXD
    4 DTR - IN - 4 GI0
    5 GND - - 5 GND
    6 DSR - OUT - 6 Hop Frame
    7 RTS - IN - 8 RTS
    8 CTS - OUT - 7 CTS
    9 RI - OUT - 9 GO1

    and i took it as the stamp would be DCE equipment

    either way, anyone have any suggestions on how to hook it up if my primary thought was wrong, using the pins i gave before?
  • BobNBobN Posts: 11
    edited 2007-03-20 20:25
    I've used the AC4490 to communicate with Stamps.

    Here are the transceiver connections I've used:

    pin 2 - TXD - data out of transceiver
    pin 3 - RXD - data into transceiver
    pin 7 - CTS - output from transmitter
    pins 10, 11 - VCC
    pins 5, 16 - GND
    Use Stamp port pins P0 - P15 to·connect to transceiver pins 2, 3, and 7 (if you want flow control).

    Then use serin with pin 2 of the transceiver and serout with pins 3 and 7 of the transceiver

    Transceiver signals are TTL so they can be directly connected to the Stamp pins.

    Good luck,

    - Bob -
    ·
  • NightOWLNightOWL Posts: 8
    edited 2007-03-20 22:18
    hey BobN, thanks for the informations. You wouldnt happen to have any demo code or such that i can use to look at.. to see how the transceiver / basic stamp interface to work with transmitting and receiving data?

    im really really new to rf modules, not to mention Pbasic.
  • NightOWLNightOWL Posts: 8
    edited 2007-03-21 16:19
    can anyone help me with some program code?
  • BobNBobN Posts: 11
    edited 2007-03-21 16:31
    I don't have my code here so I wrote something up from memory.· Please take a look at the serin and serout statements in the manual.· I used BS2p at 9600 baud for the example.· There are a lot of examples in the Nuts and Volts articles found on the main parallax.com website under the Download section.· Take a look.

    'On the transmit side:

    BS2p
    TXpin con 1······ ··· ' use P1 for transmit pin
    FLOpin con 2···· ··· ·' use P2 for flow control
    N9600 con $40F0··· ' baud rate is 9600
    idata VAR byte

    SEROUT TXpin, FLOpin, N9600, [noparse][[/noparse]idata]

    ' NOTE: flow control is not necessary unless you are close to exceeding the amount of input buffer of the transceiver.

    ' connect pins 3 and 7 of the transceiver to P1 and P2 of the Stamp


    'On the receive side:

    BS2p
    RXpin con 0············ ' use P0 for receive pin
    N9600 con $40F0····· ' baud rate is 9600
    idata VAR byte

    SERIN RXpin, N9600, [noparse][[/noparse]idata]

    'connect pin 2 of the transceiver to P0 of the Stamp


    - Bob-
    ·
  • NightOWLNightOWL Posts: 8
    edited 2007-03-22 00:05
    this is how the system is, mainly anyway..

    CLIENT
    ac4490 (transceiver)
    basic stamp
    sensor

    SERVER
    cl4490 (transceiver)
    pc


    the client side.. gets sensor data every 5 seconds.. which is stored in the stamp.. which is then sent to transceiver to be sent and received by the transceiver on the server side. the server might every now and then send commands and/or data back to the client.

    i need to figure out how to set up the client side of things. mainly the pbasic code
  • NightOWLNightOWL Posts: 8
    edited 2007-03-22 04:42
    i need the program to do both, send every 5 secs, but also look to receive commands

    can someone help me write or write me a demo code that uses test data to send? i have the ground station transceiver set up to receive signals
  • NightOWLNightOWL Posts: 8
    edited 2007-03-23 18:42
    Hey BobN, how did you connect the pins of the transceiver to the basic stamp?.. i cant find a connector to fit on those small pins
  • BobNBobN Posts: 11
    edited 2007-03-23 20:43
    From the data sheet on page 47:
    Interface Connector – 20 pin OEM interface connector (Samtec TMM-110-01-L-D-SM, mates with Samtec SMM-110-02-S-D)

    I bought several from either Avnet or Arrow I believe.

    - Bob -
Sign In or Register to comment.