Same clock for 6502 and 6551

Building your first 6502-based project? We'll help you get started here.
Post Reply
aditya3098
Posts: 5
Joined: 11 Jun 2016

Same clock for 6502 and 6551

Post by aditya3098 »

Hi. I'm working on my first 6502 build, which has a VIA (6522) and a ACIA(6551). For some reason, 1 mhz half can oscillators (for the 6502) are very expensive and I already have a 1.8432mhz half can oscillator for the ACIA. I was going to buy another to run the 6502 at a slightly faster 1.8432 mhz but I was wondering if its possible to run both the 6502 and 6551 on the same oscillator i.e both are connected to the clock out of the oscillator. A second oscillator will cost a lot (less than a 1mhz, but still). Also, is 1.8432mhz too fast for use with bridge wire/wire wrap techniques using standard perfboard and DIP sockets?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Same clock for 6502 and 6551

Post by GARTHWILSON »

No problem at all, unless you have an old 1MHz 6502 which may be on the raggedy edge of not working at 1.8432MHz. As for construction techniques, see our sticky topic, "Techniques for reliable high-speed digital circuits."
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?
aditya3098
Posts: 5
Joined: 11 Jun 2016

Re: Same clock for 6502 and 6551

Post by aditya3098 »

Well, I bought it about a month ago from a website called semikart (I think they are essentially a proxy for mouser in india). The part numbers on the chips are:
1) W65C02S6TPG-14
2) W65C51N6TPG-14
Thanks!

EDIT: Just wondering, I often run atmel AVRs on a breadboard with 20 mhz clocks. What is the difference between the 6502 and the AVR that one can handle much higher capacitance and the other cant?
Tor
Posts: 597
Joined: 10 Apr 2011
Location: Norway/Japan

Re: Same clock for 6502 and 6551

Post by Tor »

Those are 14MHz parts, and at least the 65C02 can very likely run at 20 MHz in practice. Some have even successfully run them at 25MHz, according to rumours. So no problems there. 1KHz, 1MHz, 10.. doesn't matter.
aditya3098
Posts: 5
Joined: 11 Jun 2016

Re: Same clock for 6502 and 6551

Post by aditya3098 »

Thanks
malcnorth
Posts: 17
Joined: 23 Oct 2013

Re: Same clock for 6502 and 6551

Post by malcnorth »

aditya3098 wrote:
Well, I bought it about a month ago from a website called semikart (I think they are essentially a proxy for mouser in india). The part numbers on the chips are:
1) W65C02S6TPG-14
2) W65C51N6TPG-14
Thanks!
be careful of the W65c51, as you will see elsewhere on this forum there are some big problems with some of these devices. I have just ditched them in favour of a SC28L92. The biggest problem being that the transmit status flag doesn't get updated.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: Same clock for 6502 and 6551

Post by floobydust »

Well, I try not to push it lately, having been the one to find the problem with the latest chips. Simply put, the Xmit status bit is stuck active, which results in the Xmit register always appearing empty and requesting another byte. Every standard software routine polls the bit for polled I/O or checks it for interrupt-driven I/O. The result is the data register gets written over before the current character is transmitted. This resets the transmit in progress, resulting in garbage out.

The only known W65C51 part to have this problem is lot number A6A749.1. If you have this lot number on the chip, it has the problem. Note that receive works perfectly fine, either polled or interrupt-driven. Your options are limited, either replace the part with an older and slower 6551/65C51 part (like a Rockwell), or a different UART altogether. The other option is to use a timed loop or separate timer to step the transmit, allowing enough time for the selected baud rate to complete sending the contents of the Xmit register. Good luck with your initial board setup.
Post Reply