Shop OBEX P1 Docs P2 Docs Learn Events
interface with an Aerocomm AC4490 module — Parallax Forums

interface with an Aerocomm AC4490 module

millersamsrmillersamsr Posts: 3
edited 2006-11-04 15:33 in BASIC Stamp
I'm trying to interface with an Aerocomm AC4490 module.· I can transmit with no problems.· Receiving is the issue.· I have the BS2 using SERIN per the snippet below.· My problem is a strange one.· It just waits at the serin and times out.· If I disconnect the wire from RX(Pin 15) on the BS2 side it continues to hang.· If I disconnect on the Aerocomm side, it runs as expected returning a '0' for rfdata.
Can you shed any light?· I'm certain it's some sort of interference, but I'm inexperienced in this area.·

Thanks,
Sam

RXRTS CON 3
RX··· CON 15
Again:
LOW RXRTS ' Takes RXRTS low to empty transciever rx Buffer into serin
··· SERIN RX, 84, Bad_Data, 5000, No_Data, [noparse][[/noparse]rfdata]
··· DEBUG ? rfData
··· HIGH RXRTS
goto again:
Bad_Data:
· DEBUG· "Parity error"
· STOP
No_Data:
· DEBUG CLS, "Timed out",CR
· GOTO Again
End

Post Edited By Moderator (Chris Savage (Parallax)) : 11/4/2006 8:23:45 PM GMT

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-11-04 13:44
    millersamsr -

    Which BASIC Stamp are you using, what is the expected baud rate from the RF transmittter, and is there anything between the RF receiver and the Basic Stamp Pin Port 15 (MAX-232 or equivalent)?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • millersamsrmillersamsr Posts: 3
    edited 2006-11-04 14:12
    Bruce,

    Thanks for replying.· I currently have the circuit set up on a homework board using the BS2.· I tried both ways, with and without the Max232.· Currently I have one in there.· I'm sending the data from the receiver into pin 12 (Rout1) and out of pin 13 (Rin1) in line with what the Aerocomm Development Board does.

    I had it working yesterday, I'm thinking it's some sort of capacitance/interference problem.· It makes no sense to me that with the pin unhooked nothing happens, but if I plug in a 4" piece of wire to open air, it works.



    Thanks for your help!

    Sam
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-11-04 14:48
    Sam -

    Pehaps we're not communicating here (you and I) but which Basic Stamp pin is connected to the receiver?

    Although you didn't answer my baud rate question, I'll have to presume for now that you expect the incoming data to be transmitted at 9600 baud. Here are the BAUDMODE parameters WHICH MUST BE CHANGED based on whether or not you have inserted a MAX-232 in the circuit:

    9600 baud, 8 bit, no parity -
    TRUE 84
    INVERTED 16384

    Additionally, if you can, try starting your test data with the following HEX value:

    0x55

    Often this will help to "prime the pump" at higher baud rates. If that fails, try dropping the baud rate some, until you get rteliable communications. Once you have that, move it back up, until you find the highest acceptable rate. 9600 baud MAY be too fast for the BS-2. It's NOT too fast for any of the other BS-2 Stamp models.

    Communications from this TX/RX pair isn't full duplex, is it? If so, it's not going to work no mattter what you do, as is. The Stamp has no hardware UART which is necessary for full duplex communications.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • millersamsrmillersamsr Posts: 3
    edited 2006-11-04 15:33
    Bruce,

    I'm sorry I didn't answer all of your questions.· It was kind of a late night and an early morning...bad combination!

    Pin 15 is connected to the reciever.· I am running at 9600.· I'll try slowing it down to see if this makes a difference.

    It's not full duplex.· I have Aerocomm's development board and I'm able to succesfully transmit from a Stamp to their board and recieve the data into their software.· For right now all I am transmitting is an "A" (Serout 2, 84, [noparse][[/noparse]"A"]).· I am connected directly to pin 2 of the stamp on the transmitter.

    On the receiver stamp, I'm holding the RTS line high, which keeps the "A" in the receiver's buffer (per aerocomm's documentation.)· I then take it low to read the data in to pin 15 using serin (I will 'play' with baudmode settings here per your advise, as well as the 0x55.)

    I'm certain it IS just a simple communications conflict, but what has me baffled and is distracting my thoughts is the timeout with nothing hooked up, and lack of with a wire connected.· Any thoughts on this?

    Thanks again for your input..it is greatly appreciated.



    Sam
Sign In or Register to comment.