6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 2:15 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Dec 10, 2019 2:45 am 
Offline

Joined: Wed Oct 16, 2019 11:17 pm
Posts: 34
Hello,

Two quick questions.

Does the W65C51 have to be running at 1 megahertz or faster to properly function, or can it operate at lower frequencies like the W65C02 can?

In my internet searches trying to get my W65C51 working, I've come across some really old posts that talk about a bug with the chip related to the transmit flag. It says you aren't supposed to read the status register, but instead build in a delay to let the chip finish transmitting. These posts are 6 years old, so I'm wondering if the bug still exists, or if my newer W65C51 should work without it.

Thanks
Rick


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 10, 2019 3:46 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
The bug is still there. Doing a software loop delay for it is a pretty poor way to handle it though IMO. Forum member GaBuZoMeu has the best solution yet: Use the 51's pin 5 (if in DIP), the x16 clock, as an output to drive a VIA's PB6 for its T2 to count pulses and generate an interrupt. The T2 latch value does not need to change with Φ2 rate nor with baud rate.

Edit: Also, according to the data sheet, there's no minimum phase-2 rate for the W65C51N or W65C51S.

_________________
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: Tue Dec 10, 2019 6:54 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
rickseiden wrote:
Does the W65C51 have to be running at 1 megahertz or faster to properly function, or can it operate at lower frequencies like the W65C02 can?

All presently-produced WDC products are fully static. It's possible to stop the Ø2 clock and have the device registers hold their contents. That said, halting the clock while the UART is processing data would not be a good idea. :D

Quote:
In my internet searches trying to get my W65C51 working, I've come across some really old posts that talk about a bug with the chip related to the transmit flag.

As Garth noted, the bug remains in current production 65C51s. The problem is the TxD ready bit is always set, making it appear the transmitter is ready for another datum, even when it isn't. Furthermore, one cannot enable TxD ready IRQs, as the 65C51 will continuously interrupt the MPU, causing the system to go into deadlock. As TxD in the 65C51 is a one deep register, writing something to it while it is serializing the previous datum will result in corruption. So this device is quite crippled.

The timer IRQ method of pacing the transmitter is the only really workable solution at this time. It's been some six years since this bug was identified and to date, all that WDC has done is put a note in the data sheet telling us not to use TxD ready and find some other way of pacing the transmitter. I imply that to mean the bug is unlikely to ever be fixed. Better to use a modern UART design.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 10, 2019 10:56 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
On the 816SXB i used one of the 65C22 timers set to the character transmission time to generate an interrupt and used that to trigger reloading the ACIA transmit buffer.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

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