doc:cbm:io:iec:how_serial_bus_works
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:cbm:io:iec:how_serial_bus_works [2020/10/20 22:58] – [ATN SEQUENCES] eek | doc:cbm:io:iec:how_serial_bus_works [2023/11/12 23:43] (current) – eek | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | //This article appeared in Compute! issue 38, July 1983 and is Copyrighted 1983 by Jim Butterfield// | + | //This article appeared in [[https:// |
====== HOW THE VIC/64 SERIAL BUS WORKS ====== | ====== HOW THE VIC/64 SERIAL BUS WORKS ====== | ||
Line 11: | Line 11: | ||
===== GROUND RULES ===== | ===== GROUND RULES ===== | ||
To understand the workings of this bus, you must work through a few concepts. Later, we'll get | To understand the workings of this bus, you must work through a few concepts. Later, we'll get | ||
- | technical for this who want it. | + | technical for those who want it. |
The bus, like the IEEE, has two modes of operation: Select mode, in which the computer calls all devices and asks for a specific device to remain connected after the call (" | The bus, like the IEEE, has two modes of operation: Select mode, in which the computer calls all devices and asks for a specific device to remain connected after the call (" | ||
Line 28: | Line 28: | ||
All wires connect to all devices. The wires don't go "one way"; any device can put a ground on a signal line, and all other devices will see it. Indeed, that's the secret of how it works: each wire serves as a common signal bus. | All wires connect to all devices. The wires don't go "one way"; any device can put a ground on a signal line, and all other devices will see it. Indeed, that's the secret of how it works: each wire serves as a common signal bus. | ||
- | When no device puts a ground on a signal line, the voltage rises to almost five volts. We call this the " | + | When no device puts a ground on a signal line, the voltage rises to almost five volts. We call this the " |
- | * A line will become " | + | * A line will become " |
- | * A line will become " | + | * A line will become " |
Remember that we have several lines, but the important ones for information transmission are the | Remember that we have several lines, but the important ones for information transmission are the | ||
Line 52: | Line 52: | ||
If the Ready for Data signal isn't acknowledged by the talker within 200 microseconds, | If the Ready for Data signal isn't acknowledged by the talker within 200 microseconds, | ||
- | So if the listener sees the 200 microsecond time-out, it must signal "OK, I noticed the EOI" back to the talker, I does this by pulling the Data line true for at least 60 microseconds, | + | So if the listener sees the 200 microsecond time-out, it must signal "OK, I noticed the EOI" back to the talker. It does this by pulling the Data line true for at least 60 microseconds, |
The talker will then revert to transmitting the character in the usual way; within 60 microseconds it will pull the Clock line true, and transmission will continue. | The talker will then revert to transmitting the character in the usual way; within 60 microseconds it will pull the Clock line true, and transmission will continue. | ||
Line 65: | Line 65: | ||
Now, for each bit, we set the Data line true or false according to whether the bit is one or zero. As soon as that's set, the Clock line is released to false, signalling "data ready." | Now, for each bit, we set the Data line true or false according to whether the bit is one or zero. As soon as that's set, the Clock line is released to false, signalling "data ready." | ||
- | Once the talker has signalled "data ready," | + | Once the talker has signalled "data ready," |
The listener plays a passive role here; it sends nothing, and just watches. As soon as it sees the Clock line false, it grabs the bit from the Data line and puts it away. It then waits for the clock line to go true, in order to prepare for the next bit. | The listener plays a passive role here; it sends nothing, and just watches. As soon as it sees the Clock line false, it grabs the bit from the Data line and puts it away. It then waits for the clock line to go true, in order to prepare for the next bit. | ||
Line 82: | Line 82: | ||
If EOI was sent or received in this last transmission, | If EOI was sent or received in this last transmission, | ||
- | [DIAGRAM] | + | {{: |
===== ATTENTION! ===== | ===== ATTENTION! ===== | ||
Line 89: | Line 89: | ||
Normally, the computer is the only device that will pull ATN true. When it does so, all other devices drop what they are doing and become listeners. | Normally, the computer is the only device that will pull ATN true. When it does so, all other devices drop what they are doing and become listeners. | ||
- | Signals sent by the computer during an ATN period look like ordinary characters - eight bits with the usual handshake - but they are not data. They are " | + | Signals sent by the computer during an ATN period look like ordinary characters - eight bits with the usual handshake - but they are not data. They are " |
- | + | ||
- | [DIGRAM] | + | |
An example might help give an idea of the nature of the communications that take place. To open for writing a sequential disk file called " | An example might help give an idea of the nature of the communications that take place. To open for writing a sequential disk file called " | ||
Line 112: | Line 110: | ||
An unusual sequence takes place following ATN if the computer wishes the remote device to | An unusual sequence takes place following ATN if the computer wishes the remote device to | ||
become a talker. This will usually take place only after a Talk command has been sent. | become a talker. This will usually take place only after a Talk command has been sent. | ||
- | Immediately after ATN is released, the selected device will be behaving like a listener. After all, it's been listening during the ATN cycle, and the computer has been a talker. At this instant, we have "wrong way" logic; the device is holding down the Data line, and the computer is holding the Clock line. We must turn this around. Here's the sequence: the computer quickly realizes what's going on, and pulls the Data line to true (it's already there), as well as releasing the Clock line to false. The device waits for this: when it sees the Clock line go | + | Immediately after ATN is released, the selected device will be behaving like a listener. After all, it's been listening during the ATN cycle, and the computer has been a talker. At this instant, we have "wrong way" logic; the device is holding down the Data line, and the computer is holding the Clock line. We must turn this around. |
- | true, it releases the Data line (which stays true anyway since the computer is now holding it down) and then pulls down the Clock line. We're now in our starting position, with the talker (that' | + | |
+ | Here's the sequence: the computer quickly realizes what's going on, and pulls the Data line to true (it's already there), as well as releasing the Clock line to false. The device waits for this: when it sees the Clock line go | ||
+ | true, it releases the Data line (which stays true anyway since the computer is now holding it down) and then pulls down the Clock line. | ||
+ | |||
+ | We're now in our starting position, with the talker (that' | ||
+ | |||
+ | The logic sequences make sense. They are hard to watch with a voltmeter or oscilloscope since you can't tell which device is pulling the line down to true. | ||
+ | |||
+ | The principles involved are very similar to those on the PET/CBM IEEE-488 bus - the same Talk and Listen commands go out, with secondary addresses and similar features. There are fewer " | ||
//-End of document\\ Copyright 1983 by Jim Butterfield (published in Compute!)// | //-End of document\\ Copyright 1983 by Jim Butterfield (published in Compute!)// |
doc/cbm/io/iec/how_serial_bus_works.1603234721.txt.gz · Last modified: 2020/10/20 22:58 by eek