ATN questions on the serial bus

From: Marko Mäkelä (marko.makela_at_hut.fi)
Date: 2003-06-06 17:52:11

I have constructed a finite state machine for the timing diagrams that
are included with the VICE source code as vice-1.11/doc/html/plain/serial.txt.
I'm going to use it as the base for my RS-232 to serial bus protocol converter,
which will be based on the C2N232.  End users would have to add a short serial
bus cable to the device and update the firmware.

The above mentioned timing diagrams are a bit unclear regarding the ATN
signal.  Could someone answer the following questions:

1. Can multiple bytes be sent with ATN asserted?
2. Can the talker and listener change roles when ATN is initially deasserted?

I suspect that the answer to both questions is yes, even though the document
could be interpreted otherwise.

I remember seeing a piece of code that tells a printer to LISTEN and a disk
drive to TALK, in order to print a file while the computer could do something
else.  Does anyone know where this program listing could be found?  This would
help me to understand the problems behind the second question.

The state machine that incorporates all activities (listener, talker,
controller) has some 20-30 states, or more if variables (such as
bit counters) are expanded into distinct states.

The behaviour of the listener is simpler if the role-change (question 2)
is independent of ATN.  In CSP-like notation, it'd be like this:

LISTENING ::= ?clk=1 . !data=1 . READY-FOR-DATA
READY-FOR-DATA ::= ?data=0 . !clk=0 . TALKING
READY-FOR-DATA ::= ?clk=0 . START-RECEIVE
READY-FOR-DATA ::= timeout . !data=0 . delay . !data=1 . START-RECEIVE

(Lower-case strings denote actions and upper-case strings denote states.)

The first alternative for READY-FOR-DATA is the role-change.  The second
one is normal receive, and the third one is EOI handshake before normal
receive.

	Marko

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.