Shop OBEX P1 Docs P2 Docs Learn Events
Reading SEROUT on a terminal — Parallax Forums

Reading SEROUT on a terminal

amx512amx512 Posts: 2
edited 2008-09-20 18:27 in General Discussion
this may be very stupid, and I've looked around for someone to completely cover it and couldn't find it. I"ve never had a problem doing this with a propoller or stamp. I'm looking to use a PC terminal to read the SX/B SEROUT command from an SX. So... I have a pin wired to an RS-485 (75176) RX.... Coming out of the RS-485 on the AB transeiver bus, I have a RS-485 to RS-232 convertor connected to a PC serial port. I'm used this method before with other controllers.. Its a bit long winded, but its the hardware I have available, and in the end, I'm not looking to keep the convertor, but use the RS-485 output to another device. I just want to verify the output data stream before making the interface. Anyway..... I'm doing the following:

SEROUT RA.1, T9600, "A"

Now, I know Hyperterm has problems sometimes, so I'm using realterm, which has worked for me in the past. When I read the data byte, I'm getting the correct binary representation of the letter "A", but have to set the stop bit to 7 to not get an error in realterm. (not the default 8). This seems odd first off..... If I set realterm to to ASCII or ANSI instead of binary, I get a control character and not the expected "A". Does anyone know how I can interperate the true ASCII chacters output? I don't think this is a wiring, or SX problem, and probably involves my mothod of trying to read the data. Has anyone setup a test jig with an SX to read serial byte by byte before? I'm not married to realterm I would gladly be open to a better application to do this....

Any help would be great.
Thanks,

Comments

  • JonnyMacJonnyMac Posts: 9,214
    edited 2008-09-20 14:20
    I think it's either your code or connections. I use the attached program with HyperTerminal to test an RS-485 adapter we built for a product call the Prop-SX.
  • pjvpjv Posts: 1,903
    edited 2008-09-20 14:28
    Possibly your timing is off.... are you using a resonator or crystal to set the frequecy? The internal 4MHz oscillator is not very stable nor precise.

    Cheers,

    Peter (pjv)
  • amx512amx512 Posts: 2
    edited 2008-09-20 18:27
    You nailed it! I was using the internal resonator. I tossed in a 50Mhz external, and it worked perfect! Thanks for all your help!
Sign In or Register to comment.