Jump to content

Rs232 Receive From Hyperterminal --- Need Some Help


Recommended Posts

hi,

for your serial receive program, u can use the space as the qualifier & start loading the other digits in an array. The size of the array depends on the data digits lenght. try placing full-load to the indicator determine the data length. I thought it should display 00001828 on the hyper.

Regards

Raghunathan.

Currently I am using the STX command as a qualifier, then placing the data into my array after that. I really don't think that part is my issue now, but I will note that and try it if the crystal doesn't provide any improvements.

 

Thank you for your suggestions.

 

I would suggest u use the builtin function of the sourceboost to begin with. Some times I do face problem with data parsing. The data stream should be sent at the same rate( mind u this is not the baud rate). If there is a change in the data stream rate( say from 10characters/s to 20char/sec) then chances are there that some of the datas don't get received properly. For which I introduce a minimum delay between character equal to (10 * (1/baudrate)), assuming 10bit length data.

 

Regards

Raghunathan.

Link to post
Share on other sites

Guys someone local needs to come give me a swift kick in the you know what.

 

I started thinking.... If my micro can communicate with my PC just fine and the scale can communicate with the PC just fine, what is the deal. Then it hit me. The TX and RX wires are backwards when I connect my micro to the scale. I just didn't catch it before.

 

So I switched that and everything worked beautifully the way it should regardless of the oscillator.

 

Thanks for all of the help guys, I learned a lot.

Link to post
Share on other sites
I started thinking.... If my micro can communicate with my PC just fine and the scale can communicate with the PC just fine, what is the deal. Then it hit me. The TX and RX wires are backwards when I connect my micro to the scale. I just didn't catch it before.

 

Can happen to any of us. Last time I got *that* totally wrong was back in the mid 80's. Thing is though, back then every self respecting computer technician has a RS232 breakout box in their toolkit. 25 pin M and F in and out, usually DIL switches for straight through and normal 'null modem' and a job lot of little wires you could plug in for odd setups. There would also be LED indicators on all the lines. You would have seen half the number of LEDs you expected lit and instead of going red to green, they'd have been blinking off as the drivers 'fought' with opposite levels.

 

Since then I've always either used an analog meter on the pins to find the outputs or put bicolour LEDs on the lines on any interface I built to check them. They need to go on the RS232 side of the MAX232 or similar so they go off for a missing signal as on the TTL side they will get driven to a logic level even with the input unplugged. I am using high intensity LEDs with 8K2 series resistors to each line and take the other side to the RS232 signal ground. They are wired so that 'space' level and inactive handshake lines are red, 'mark' level and active handshake lines are green. i.e. red=stop and green=go. Would have spotted your problem on the spot for certain. worth doing.

Ian

Edited by IanM
Link to post
Share on other sites
Ah Yes, the classic RS-232 cable twist trick. Catches a few out that one.

 

I am extending a long boot across the pond. NORAD won't see it coming.

 

Cheers

 

Reynard

Well just be careful Continental Drift doesn't have you doing the splits. The temperature extremes of Iceland could be rather uncomfortable ...

 

 

<VBG>

Link to post
Share on other sites

Actually, I should have mentioned "COM Port Toolkit" for a shareware version of a UART terminal, I meant to say "COM Port Toolkit" instead of "Adv. Serial Port Monitor"!

 

The difference is that while COMP Port Toolkit is pretty nice, it can't separate Rx lines when a CR/LF is received. Otherwise, COM Port Toolkit is very helpful, and can do some fancy things....very helpful for debugging your UART code. You can find it at Cnet.com/downloads.

 

You can also use the PICKit 2 (most recent) software for its UART terminal, but I haven't any experience with that one yet.

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...