6551 vs 6850 vs 8250 vs ?

For discussing the 65xx hardware itself or electronics projects.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Quote:
It's a USB to TTL module, but if I got it right this module does not have any clock input or output, so how do I connect it the to the 6850(or elsewhere)??? [English fixed]
It is a USB-to-RS232 converter, but lacking the line drivers and receivers.  Without the line drivers and receivers, you could connect it directly to one of the UARTs you've talked about.  Connect:
its TD to your RD,
its RD to your TD,
its RTS to your CTS,
its CTS to your RTS,
its DSR to your DTR,
its DTR to your DSR.
You can probably get away without RI.

RS-232 is asynchronous, meaning there's no clock line.  The two ends have to agree on the speed, then the receiving end starts its clock at the leading edge of the start bit for each byte, and just uses the timing to know which bit it is looking at at any given instant.  That's why the timing has to be accurate with RS-232.  Edit: I blew the dust off an RS-232 primer article I wrote 9 years ago but never did anything with, and updated some links and things and posted it on my website, at http://wilsonminesco.com/RS-232/RS-232primer.html .
Last edited by GARTHWILSON on Thu Apr 05, 2012 7:42 am, edited 1 time in total.
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?
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

So, how do i connect it to the 6850? Do i put on the clock input the exact clock of the usb/ttl module? Will it work?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

You will need a separate oscillator for the 6850.  What I get from the 6850 data sheet at http://pdf1.alldatasheet.com/datasheet- ... C6850.html is that bits 0 and 1 of the control register select whether to divide the transmit and receive data input clock signals by 64, 16, or 1.  So for 9600bps and a ÷16 for example, the input clocks would have to be 153,000Hz.  If you start with a 1.8432MHz external oscillator, you'll first have to divide it by 12 externally to get 9600bps that way, or by 3 if you use the 6850's ÷64 mode.  The 6551 has the oscillator onboard and uses a standard 1.8432MHz crystal for all standard baud rates up to 19.6kbps and you set the bit rate internally through software.
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?
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

Well, i only have the 2.4576MHz crystals and the 4060 counter for the 6850 clock.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

So then you will have to make an oscillator with the 2.4576MHz crystal, and divide its output by 16 and tell the 6850 to divide by 16 again to get 9600bps. The divisors can be changed of course for other rates.
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?
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

Ok, great, i hope i get the crystals soon, i will post my progress...
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

Since i don't need modem signals(cts rts dcd), what do i do with them on the 6850?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

I just pulled down my old Mot data book covering the 6850 from the top shelf (9 feet up), and was surprised to find the 6850 does not have DTR\ or DSR\, let alone RI.  (In addition to RTS\, CTS\, and DCD\, the 6551 has DTR\ and DSR\ but not RI.)

Even without involving a modem, hardware-handshake signaling on RS-232 require RTS and CTS.  If you don't need the DCD\, just ground that input.  If you're going to use XON/XOFF software handshaking, just ground the CTS\ input also.  You will probably want to use pin jumpers or DIP switches though, so you can set it back to listening to the CTS line of the RS-232 if you want hardware handshaking at a later time.
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?
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

We don't need no stinking DSR!

Post by BigDumbDinosaur »

GARTHWILSON wrote:
I just pulled down my old Mot data book covering the 6850 from the top shelf (9 feet up), and was surprised to find the 6850 does not have DTR\ or DSR\, let alone RI.
Actually, omission of DTR and DSR is fairly common, as there is no particular requirement for these signals. CTS and RTS are important if data rates are to exceed 9600 bps, since XON/XOFF handshaking above 9600 becomes unreliable in many situations. Incidentally, I did provide a DTR output on both ports of my POC unit but nothing that is connected actually requires it.

RI is also of questionable value. I looked at the Equinox serial hardware in my Linux box and determined that while RI is connected and is monitored by the Equinox driver, getty doesn't act upon it. DCD is definitely of more value if a modem is involved. If not, it should be tied to ground. Allowing it to float may cause spurious interrupts.

One thing the 6850 does offer is higher maximum data rates. Dunno how that is important to Dajgoro.
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

Quote:
One thing the 6850 does offer is higher maximum data rates. Dunno how that is important to Dajgoro.
Well you just said why...
And i was looking in the 6850 datasheet, when i saw there is a bit in the register which acts like a reset. So when the 6502 restarts, can it just enable that reset bit, instead of cutting power to the 6850 for the reset?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

That seems to be the only way to reset the 6850, as it has no RST\ input either, and no power-up reset circuit.  You have to write 0's to CR0 and CR1 to reset it, including in your power-up reset routine.
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?
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Post by BigDumbDinosaur »

Dajgoro wrote:
Quote:
One thing the 6850 does offer is higher maximum data rates. Dunno how that is important to Dajgoro.
Well you just said why...
And i was looking in the 6850 datasheet, when i saw there is a bit in the register which acts like a reset. So when the 6502 restarts, can it just enable that reset bit, instead of cutting power to the 6850 for the reset?
Right...it's referred to as the "master reset."
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

I found this:
http://www.compeng.dit.ie/staff/tscarff ... a/6850.htm
Do i put the second phase clock on the enable input and the other select signal to the chip select pins... (Sorry for all the questions,i never done anything with serial communication before)
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Post by BigDumbDinosaur »

Dajgoro wrote:
I found this:
http://www.compeng.dit.ie/staff/tscarff ... a/6850.htm
Do i put the second phase clock on the enable input and the other select signal to the chip select pins... (Sorry for all the questions,i never done anything with serial communication before)
My memory is hazy on this, but I seem to recall that the correct way to use the E input (chip enable) is to wire-AND it with Ø2 high. E, in other words, would be connected to the output of a two-input AND gate. One input on the gate would be connected to Ø2 and the other (possibly through an inverter) to the chip select signal generated by a '138 or similar. The CS0, CS1 and /CS2 inputs would be controlled by address bus signals. Selecting the chip would have no effect until Ø2 goes high.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

I see now in the data sheet that for the 1MHz 6850, the CS lines need to be valid at least 80ns before E rises; so yes, E would definitely have to be gated by phase 2, whereas the chip selects must not be.  For the 1.5MHz part, it's 60ns min, and for the 2MHz part, it's 40ns.  You could probably run phase 2 directly to the E input by itself.  As long as the CS lines are not all true, it won't do anything.
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?
Post Reply