6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 11:39 am

All times are UTC




Post new topic Reply to topic  [ 102 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next
Author Message
 Post subject:
PostPosted: Sun Aug 28, 2011 4:16 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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 .

_________________
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?


Last edited by GARTHWILSON on Thu Apr 05, 2012 7:42 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 28, 2011 2:47 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 28, 2011 7:37 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 28, 2011 9:56 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Well, i only have the 2.4576MHz crystals and the 4060 counter for the 6850 clock.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Aug 29, 2011 12:05 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Aug 29, 2011 4:39 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Ok, great, i hope i get the crystals soon, i will post my progress...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Sep 04, 2011 11:38 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Since i don't need modem signals(cts rts dcd), what do i do with them on the 6850?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 05, 2011 12:08 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 05, 2011 3:37 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 05, 2011 3:26 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 05, 2011 4:23 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 05, 2011 11:13 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
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."


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 05, 2011 11:24 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
I found this:
http://www.compeng.dit.ie/staff/tscarff/6800/6850acia/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)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 06, 2011 2:03 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
Dajgoro wrote:
I found this:
http://www.compeng.dit.ie/staff/tscarff/6800/6850acia/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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Sep 06, 2011 2:53 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 102 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 31 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: