WDC 65C51 chips defective
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: WDC 65C51 chips defective
I have to agree, there's quite a bit of vacuum around this problem. The other thing I found out was they deleted the 1Meg internal resistor from the baud clock oscillator (it was present in earlier chips) so you need to add that also if you intend to use a crystal. This has also been added to the October datasheet errata on page 34. Do note that this is specifically for LOT code A6A749.1. The good news (there has to be something) is that the chip will easily run at 10MHz. I did get a few other older W65C51 chips from WDC some time ago... they all have their, uh, issues... but I have one of them working for full duplex interrupt-driven transmit/receive with a 10MHz CPU clock but need to drive the baud clock with a can oscillator (built-in baud clock won't run stable). I opted for a 3.6864MHz can and get 38.4K baud rate. I also had to add more power supply noise caps everywhere as the chip was generating a lot of noise on the supply which was also causing problems.
I posted an updated SyMon 5 version I've been working on here: viewtopic.php?f=2&t=3138
The BIOS at the end has a fully working interrupt-driven and buffered 6551 driver and also a 6522 driver that has dual timer interrupt support. You could modify (or bastardize) the timer and UART routines to get an interrupt driven transmit working with the bad chips... but there's no elegant solution based on the nature of the problem.
I posted an updated SyMon 5 version I've been working on here: viewtopic.php?f=2&t=3138
The BIOS at the end has a fully working interrupt-driven and buffered 6551 driver and also a 6522 driver that has dual timer interrupt support. You could modify (or bastardize) the timer and UART routines to get an interrupt driven transmit working with the bad chips... but there's no elegant solution based on the nature of the problem.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: WDC 65C51 chips defective
Well, the VIA solution might be my best best. Honestly, I just need to get some code snippets working and try stuff out (even if that means breadboarding my design as a stopgap). I've ran a UART successfully off a breadboard before.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: WDC 65C51 chips defective
Just my curmudgeonly viewpoint, but you guys are beating a dead horse with the 65C51. Why bother when there are much better UARTs available?
x86? We ain't got no x86. We don't NEED no stinking x86!
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: WDC 65C51 chips defective
Yea, I've been waiting for that. I do have some 26C91 NXP UARTs, just haven't had the time to get one wired up on a board yet, but it's on my list of things to do. I spent some time last year writing a reasonably small and flexible BIOS with the functioning boards I have... 6551/6522 based. It was based on code I had written for a 6551 added to my old Vic-20 that goes back to the 80's, so I used it as a base and extended it. With that done, the goal is to start adding some new I/O devices, among them the NXP UART. Timing is the issue, too many other projects plus regular work, so it's been on the back burner for quite a while now. Hopefully soon.... as I also started on a new single board system using mostly PLCC chips and a single CPLD as a glue chip. Too many (fun) projects, too little (free) time. But I appreciate the gentle nudge 
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: WDC 65C51 chips defective
BigDumbDinosaur wrote:
Just my curmudgeonly viewpoint, but you guys are beating a dead horse with the 65C51. Why bother when there are much better UARTs available?
cr1901 wrote:
26C92 requires too much discrete logic to interface properly, and 6850 can't handle my intended clock speeds period (10 MHz).
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: WDC 65C51 chips defective
I scanned the previous pages of the topic and I didn't catch anything saying you intend to use the UART with an '816. IIRC, the 26C9x cannot handle being accessed in consecutive cycles, which would mean you can't use R/M/W instructions on a 6502 accessing the UART, right? You could still do LDA, ORA/AND, STA though, which is still faster than bit-banging the SPI MAX3100, although I definitely like that 14-pin Maxim UART.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: WDC 65C51 chips defective
GARTHWILSON wrote:
I scanned the previous pages of the topic and I didn't catch anything saying you intend to use the UART with an '816.
GARTHWILSON wrote:
IIRC, the 26C9x cannot handle being accessed in consecutive cycles, which would mean you can't use R/M/W instructions on a 6502 accessing the UART, right? You could still do LDA, ORA/AND, STA though, which is still faster than bit-banging the SPI MAX3100, although I definitely like that 14-pin Maxim UART.
Since LDA/STA will only take one machine cycle to write data, the 26C9x would need to be able to respond to writes in a machine cycle as well. As another example, old MCS-85 chips require 4 clock cycles for a bus cycle, so without a frequency multiplier, one has no hope of interfacing, say an Intel DMA Controller to 65xx chips. This is my main concern- if writes/read require multiple clock cycles, then the chip can't be interfaced easily to the 65xx bus. Or am I misunderstanding something?
That said, alternative UARTs are still technically on topic, so maybe an example circuit/POC with an alternate UART might be a good addition to this topic.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: WDC 65C51 chips defective
cr1901 wrote:
26C92 requires too much discrete logic to interface properly, and 6850 can't handle my intended clock speeds period (10 MHz).
Well really, b/c interfacing the 26C92 to the 65xx bus presumably requires a bit of glue logic to convert 65xx bus signals to whatever the 26C92 expects, that will inevitably add prop. delay.
Well really, b/c interfacing the 26C92 to the 65xx bus presumably requires a bit of glue logic to convert 65xx bus signals to whatever the 26C92 expects, that will inevitably add prop. delay.
Quote:
Since I want to use through-hole components and discrete glue logic...
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: WDC 65C51 chips defective
cr1901 wrote:
This is my main concern- if writes/read require multiple clock cycles, then the chip can't be interfaced easily to the 65xx bus. Or am I misunderstanding something?
The second of BDD's attachments (above) shows how it only takes two gates to supply /RD and /WR on a 65xx system.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: WDC 65C51 chips defective
BDD... I stand corrected then. THANK YOU for that schematic. 
Hmm, could be. It's true that microprocessors such as Z80, 8080 etc use a fine-grained CPU clock running at a comparatively high frequency. Unlike 65xx, these chips require multiple CPU clock cycles to do a single bus cycle. However, the bus cycle is all that concerns you. The connection to an IO device (such as a UART) consists mainly of just a /RD and a /WR signal.
The second of BDD's attachments (above) shows how it only takes two gates to supply /RD and /WR on a 65xx system.
-- JeffSome IO chips, like the 8237 DMA controller need a fine-grained clock cycle to perform an xfer (4 clock cycles). Since the 65xx surely won't keep a value on the bus for 4 clock cycles, the only solution I can think of is to force such I/O devices to wait until the correct number of clock cycles pass (de-assert RDY).
Incidentally, it turns out that while the ACIA requires a clock signal from the CPU, the 16550 does not.
Dr Jefyll wrote:
cr1901 wrote:
This is my main concern- if writes/read require multiple clock cycles, then the chip can't be interfaced easily to the 65xx bus. Or am I misunderstanding something?
The second of BDD's attachments (above) shows how it only takes two gates to supply /RD and /WR on a 65xx system.
-- Jeff
Incidentally, it turns out that while the ACIA requires a clock signal from the CPU, the 16550 does not.
Re: WDC 65C51 chips defective
cr1901 wrote:
Since the 65xx surely won't keep a value on the bus for 4 clock cycles, the only solution I can think of is to force such I/O devices to wait until the correct number of clock cycles pass (de-assert RDY).
Quote:
Incidentally, it turns out that while the ACIA requires a clock signal from the CPU, the 16550 does not.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: WDC 65C51 chips defective
Dr Jefyll wrote:
16550 and other non-65xx/68xx peripheral devices are usually obliged to dedicate a separate input pin for use as a time base. But 65xx/68xx peripherals save a pin by simply using Phase2 as the time base. Though part of the bus interface, Phase2 is a signal that's continuous & unvarying, regardless of the presence or absence of I/O activity. The same can't be said for /RD & /WR -- hence the extra input pin for a clock.
Similarly, the 53CF94 SCSI controller I am using has a clock input that clocks the state machines in the device that sequence the SCSI bus. Unlike the 26xx, a range of clock frequencies may be used with the 53CF94, up to 40 MHz. The 'CF94 is told in software the clock range to expect.
In both cases, the devices operate asynchronously to the 65xx bus, which generally poses no hardware design problems as long as chip selects and read/write inputs are properly handled.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: WDC 65C51 chips defective
BigDumbDinosaur wrote:
There is an advantage to the peripheral device requiring a separate clock source, and that is it will run in a consistent fashion regardless of the Ø2 frequency.
AFAIK, chips intended for the market where /RD and /WR bus signals prevail always use a separate pin if a timebase is required. The bus signals can't be considered a timebase because they're not expected to be periodic. FWIW, the CPUs that don't generate periodic bus signals seem to be those using fine-grained input clocks -- that and the /RD and /WR signals seem to go together.
In the case of chips for the 65xx/68xx market (ie; with R/W and Phase2 bus signals), the Phase2 (aka E) bus signal is expected to be periodic, and the manufacturer has the freedom to include a separate timebase pin or not.
On 6522 you get to choose for yourself, at least in regard to timer T2. It can take its input signal from Phase2 or from the PB6 pin.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: WDC 65C51 chips defective
Dr Jefyll wrote:
BigDumbDinosaur wrote:
There is an advantage to the peripheral device requiring a separate clock source, and that is it will run in a consistent fashion regardless of the Ø2 frequency.
Quote:
but want to experiment with using a non-standard baud rate.
Quote:
On 6522 you get to choose for yourself, at least in regard to timer T2. It can take its input signal from Phase2 or from the PB6 pin. 
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: WDC 65C51 chips defective
Dr Jefyll wrote:
On 6522 you get to choose for yourself, at least in regard to timer T2. It can take its input signal from Phase2 or from the PB6 pin. 
x86? We ain't got no x86. We don't NEED no stinking x86!