6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 3:10 am

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: 6551 handshaking
PostPosted: Wed Dec 21, 2022 4:45 pm 
Offline

Joined: Sat Apr 30, 2022 7:13 pm
Posts: 159
Location: Devon. UK
Hello Sam,
I'm sorry to hear about your family emergency. I hope it is nothing too serious and that things are improving.

I have to say that in the intervening time I had pretty much given up with handshaking. I went through various iterations of software, starting with your code verbatim until giving up and simply putting a per character send delay in my TeraTerm settings.

Since your post today I have just put your code back in verbatim, sent a bunch of forth code using RealTerm. RealTerm shows the RS232 signals status. Before I send the file CTS shows asserted at the PC end. After 350ish characters are sent flow just locks locks up. I can see the RTS\ line at the 65C51 go high (using a scope) and the and the PC sees this as CTS being de-asserted. The PC dutifully stops sending. I am guessing that Tali is trying to send a byte (to echo back what it is receiving and compiling) but it can't (see discussions re-RTS and the transmitter above) so it sits waiting to send and not consuming anything from the input buffer and therefore never re-asserting RTS.

This is where I got to before I gave up. If de-asserting RTS at the SBC has the effect of ALSO turning off the transmitter(!!) - as per the Rockwell datasheet - then I can't see any way of this ever working. If Tali can't send when it tells the PC to stop sending then I think we are stuck.


Top
 Profile  
Reply with quote  
 Post subject: Re: 6551 handshaking
PostPosted: Wed Dec 21, 2022 7:41 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Adrian, I recognize the problem; but maybe you could address my note on the first page about suspecting the situation is kind of rare in practice, because if you're behind on handling input, you probably don't have time to be sending either, unless it's simply a higher priority.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: 6551 handshaking
PostPosted: Wed Dec 21, 2022 9:13 pm 
Offline

Joined: Sat Apr 30, 2022 7:13 pm
Posts: 159
Location: Devon. UK
Hello Garth, sorry about that. The truth is I am not sure whether it's rare or not. As the data (which is a Forth program) is sending to Taliforth Tali receives it and echoes it back. I think it does this as it compiles it. I'm not sure exactly the timing of it doing this. Taliforth implements your code to buffer incoming data and receives bytes in the interrupt routine. It seems to me that any time a lot of data is received by any interrupt driven system and it asserts RTS, any task wishing to send using a 6551 is stuffed IF this thing about the transmitter being turned off while RTS is high.

Quite frankly, I have been going round in circles over this issue and decided to give up before I irritated people here. Sam was good enough to keep trying to help so I felt I should do some more analysis.


Top
 Profile  
Reply with quote  
 Post subject: Re: 6551 handshaking
PostPosted: Wed Dec 21, 2022 11:01 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Another (possibly not ideal) workaround might be to simply use a slower baud rate, to make it easier to keep up so there's seldom a need to make RTS\ false.

You're definitely not irritating me at all, and I'd be glad for whatever solutions we might arrive at, and then I want to improve the RS-232 primer.

Oh, and then there's also the (also not really ideal) workaround of using a VIA pin to send the RTS\ signal to the computer at the other end of the connection, so you can tell it to stop sending if necessary while still allowing your SBC to keep sending.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: 6551 handshaking
PostPosted: Wed Dec 21, 2022 11:39 pm 
Offline

Joined: Sat Apr 30, 2022 7:13 pm
Posts: 159
Location: Devon. UK
Oh, I know there are several workarounds and Taliforth is perfectly usable as it is. I just wanted to get handshaking working as a technical exercise. I'll move on to other things and let handshaking go I think.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: