Page 1 of 1

Question on serial port

Posted: Tue Mar 23, 2021 2:26 pm
by cbmeeks
So, I am designing my third 6502 SBC. This one is going to have a throw-back to many 8-bit computers I love and one of those things is a real "1541 serial" port like the VIC-20/C64.

My design has a couple 65C22's so I thought I would do a similar layout that the VIC-20 uses.

However, I'm a little confused on their logic. For one, some of the signals go through an inverter. And, two pins of the two VIA's go to the same serial pin (like the CLK) but also go through resistors.

So one question is, what is the reasoning behind the inverters AND the resistors going to the same pin?

Second, my design has several pins free. If I wanted to talk to a 1541, could I not just write my own drivers and not need the inverter? (more of a software guy)

Sorry, sometimes I complicate my question...what I'm basically after is...why did Commodore design it that way...and, assuming I have free pins, why would I design it the same way? LOL

Thanks for any insight.

Re: Question on serial port

Posted: Tue Mar 23, 2021 2:53 pm
by Mike
CLK and DATA are bi-directional lines and are routed to one input and one output pin of a VIA. The inverters are used to protect the VIA output ports and drive the bus lines, a logic high on the inverter inputs gets translated to the dominant low-level for TTL/NMOS.

More details here: Clock Signal: a Vic-20 emulator for macOS and Linux

Re: Question on serial port

Posted: Sat Mar 27, 2021 12:06 am
by brain
As the linked posting illustrates, the inverters are open collector, which is very important for the bus. You could somewhat accomplish the same thing by putting pullup resistors on all the VIA pins connected to the bus and switching the output to an input when you want to send a '1',, but the 6522 I don;t think offers as much sink current as the '06 inverter (some you can get with 48mA of sink current).

I do agree with Mike that the inputs should have inverters as well, just to offer the last bit of protection for the 6522. Commodore didn't care, because it was not necessary to function.

Jim