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

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Mar 27, 2015 6:24 pm 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Since I'm considering using a CPLD for the glue logic, I suppose I should also at least go through the motions of considering the W65C265S MCU -- the PLCC 84 packaged version of the 65816 with extra goodies (http://www.westerndesigncenter.com/wdc/chips.cfm):
Quote:
(T)he W65C265S includes 3 additional UARTs, increased GPIO, Parallel Interface Bus, twin tone generators (can perform DTMF signaling) and more. Similar to the W65C134S, the W65C265S has a built–in debug monitor ROM and libraries.
Two major advantages of the chip: It would solve the UART problem caused by the 6551 ACIA defect, and all 24 address pins are exposed.

(Interestingly enough, there is a development board for about 100 € that could be used for first experiments and program testing, since there is no emulator for Linux, it seems: http://www.mouser.de/ProductDetail/West ... HCtOEwM%3d )

However, unless I'm doing something wrong with the search, there doesn't seem to be much on the MCU in the forums. Is it because using one would take the fun out of building your own, or am I missing something?


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 27, 2015 7:21 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Wally Daniels who's on this forum but has not posted in many years used one in his work at the Pratt & Whitney turbine engine plant in Nova Scotia, Canada, running my '816 Forth. Unfortunately he seems to have moved on to other interests. You could send him a PM though and see what happens.

Quote:
However, unless I'm doing something wrong with the search, there doesn't seem to be much on the MCU in the forums. Is it because using one would take the fun out of building your own, or am I missing something?

The thing that makes us shy away from it is that the onboard ROM is not programmable on the workbench, and if you add external ROM or RAM, you have to forfeit a lot of I/O pins for the buses. Otherwise, yes, it seems really cool.

_________________
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: Fri Mar 27, 2015 8:01 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
I actually did look at the 65C256 for a business project, but set it aside for the exact same reason Garth mentions: the ROM has to be mask programmed. It was ultimately better to build with the 65C816 and the other necessary parts, as I got the flexibility I needed.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 27, 2015 11:31 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
scotws wrote:
there doesn't seem to be much on the MCU in the forums. Is it because using one would take the fun out of building your own, or am I missing something?
The maximum clock rate is 8 MHz, not 14; so, depending what you're doing, that might be a drawback. And they haven't taken the fun out of reading the data sheet! :roll: -- that might be another another potential drawback. It seems pretty disorganized, and -- at 60 pages -- rather brief. I'd worry about how many important comments and details are missing. The chip has a lot of features & flexibility. :shock:

The Parallel Interface Bus (PIB) sounds intriguing. Apparently it's a group of interrupt-rigged "mailbox" registers accessible by both the '816 core and by an externally-connected device. (From what little I know about the BBC "Tube" interface, this seems similar.) You could have a host processor with one or more '256s sitting on its bus, each acting independently but under the master's control. Or, let the '256s all be peers.

    2.5.3 When BE goes low during PHI2 low time, the address bus and WEB are inputs, providing for DMA
    (direct memory and I/O access) for emulation purposes. Data from D0-D7 is written to any register
    addressed by A0-A15 when WEB is low. Data is read from D0-D7 when WEB is high.

More intrigue! :) This seems to imply the '256 could be used simply for its resources as a super-IO chip. IOW, use an external CPU, which exploits all the timers, UARTs, etc, etc. Or use both cpus.

scotws wrote:
It would solve the UART problem caused by the 6551 ACIA defect
I guess you're referring to the problem discussed here ( WDC 65C51 chips defective ). But isn't it more likely the ACIAs on the '256 have the same problem? I hope I'm mistaken. But AFAIK they're made with the same technology. Is it likely that WDC has two designs, one with the flaw and one without -- both of which are current? Or is it more likely they share the same HDL source? (Not sure I'm asking the right questions here.) :|

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 28, 2015 12:06 pm 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Dr Jefyll wrote:
But isn't it more likely the ACIAs on the '256 have the same problem? I hope I'm mistaken. But AFAIK they're made with the same technology.

Aiee, I hadn't thought of that. So much for that idea. Back to the normal 65816.

The whole UART situation is increasingly irksome. Maybe I should just use the 65SPI to commect to something like the MAX3420E for USB access to the computer acting as a terminal ...


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 28, 2015 9:01 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
scotws wrote:
Dr Jefyll wrote:
But isn't it more likely the ACIAs on the '256 have the same problem? I hope I'm mistaken. But AFAIK they're made with the same technology.

Aiee, I hadn't thought of that. So much for that idea. Back to the normal 65816.

The whole UART situation is increasingly irksome. Maybe I should just use the 65SPI to commect to something like the MAX3420E for USB access to the computer acting as a terminal ...

There are a gazillion UARTs available from a variety of sources, so there is no reason to fret about the (partially brain-dead) 65C51. I'm partial to Philips/NXP UARTs due to their performance, flexibility, availability of one or more microsecond-precision timers, and apparent freedom from hardware errata. POC V1.1 uses the 26C92 dual channel UART (DUART) and runs both channels at 115.2 Kbps with ease.

Aside from the DUART, NXP also produces QUARTs (four channels) and OCTARTs (eight channels), all of which are very similar in terms of programming. Adaptation of any of these devices to the 65xx bus is possible with simple glue logic. The maximum "standard" data rate with NXP UARTs is 230.4Kbps, with 960Kbps the maximum using a non-standard baud rate generator setup. Just about all of them also support TIA-485, which being balanced to ground, can be operated at high data rates over considerable distances (up to 1200 meters or ~4000 feet).

POC V1.1 uses a single MAX238 transceiver in an SOIC24 package to interface the 26C92 to the two serial ports. POC V2 will use the NXP 28C94 QUART to implement four serial ports, and will use a single MAX248 transceiver to interface to them. Some time in the future, I will probably build a POC Vx with eight serial ports, using the NXP 28L198 OCTART, with two MAX248 tranceivers. Thanks to the fact that all of these UARTs have a similar structure and register layout, I was able to develop a "universal" driver that works with any of them.

A feature of these UARTs (and the 16C5x0 series used with PC hardware) is the availability of receive (RxD) and transmit (TxD) FIFOs, the use of which can substantially improve real-time serial I/O performance. When I rewrote the driver in POC V1.1 to use the 26C92's TxD FIFO I noted a significant reduction in the number of IRQs being generated during output to the console, especially when large areas of the screen are being painted. This is because the interrupt service routine (ISR) polls the channel after each write to see if the TxD FIFO still has room. If it does, the ISR loops back and stuffs another byte into the FIFO. Only when the FIFO is full, or no more data is available to be transmitted, does the ISR terminate the loop. The result is that up to eight bytes can be transmitted per IRQ, versus one byte per IRQ with the 65C51.

Similarly, the 26C92 doesn't immediately interrupt when data arrives, as there is also an RxD FIFO. Instead, the 26C92 waits until the FIFO is full before interrupting. The ISR then repeatedly reads the FIFO and stores bytes until the FIFO is empty, which means up to eight bytes can be received per IRQ. In the event fewer than eight bytes are stored in the FIFO and no more data is immediately forthcoming, a "watchdog" timer will eventually generate an interrupt to tell the MPU to get what data is available, thus assuring that stale data isn't left in the FIFO.

I also have a 26L92, which is a 26C92 with 16 deep FIFOs instead of eight-deep, which I will eventually try out on POC V1.1. According to the NXP data sheet, the 26L92 is pin-compatible with the 26C92 and at reset, looks like a 26C92 to the rest of the system. A bit has to be flipped in a register to enable the 16 byte FIFOs. Otherwise, the programming model is the same and (in theory) should work with my existing driver.

Use of 65SPI to attach a UART adds a layer of hardware and software that may limit performance and flexibility. Doing so would be, in effect, "double serializing" the data flow, with attendant performance hits. When I designed POC I briefly flirted with using 65SPI but wanted to have dual TIA-232 channels. Doing it through 65SPI would have significantly complicated the unit, especially the software. The DUART proved to be much more efficient, plus fewer parts were needed on the PCB, which helped with the layout.

As for using USB, the software required to implement it can be complicated, especially on the 65xx side of the interface. TIA-232 is almost trivial in comparison. If your PC doesn't have a serial port one can be readily added with an inexpensive PCI card, such as this Startech serial adapter. Another thing to consider is that USB is a very short-range interface, with an outer limit of five meters (~15 feet). A properly wired TIA-232 hookup can be operated over a span as great as 150 feet using inexpensive CAT5 UTP cable. It's not likely that most of us will be trying to run our 65xx contraptions from across the street, but it's nice to know that a longish cable is not likely to introduce the strange data corruption problems that will occur if a USB lash-up is too long.


Attachments:
File comment: Philips/NXP Single & Multichannel UARTs
nxp_uarts.pdf [577.71 KiB]
Downloaded 97 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 29, 2015 3:24 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
BigDumbDinosaur wrote:
Use of 65SPI to attach a UART adds a layer of hardware and software that may limit performance and flexibility. Doing so would be, in effect, "double serializing" the data flow, with attendant performance hits.


My SBC-3 suffered from that effect. I used an ATMega8's USART for serial transfer and it connected to the 65816 through a 65SPI. Data throughput was less than optimal. SBC-4 used a Exar XR68C92 Dual UART connected directly to the 65816 busses with excellent throughput.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 29, 2015 5:05 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
8BIT wrote:
I used an ATMega8's USART for serial transfer and it connected to the 65816 through a 65SPI.


That's probably where I got the idea from :D . Thanks for the background, I actually have the 2692 here. I'll probably see about rebuilding my "Mark Zero" breadboarded 65C02 with it to gain some experience first, and then decide. Hadn't heard about the XR68C92 until now, but then I have been ignoring the PLCC chips.


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 29, 2015 5:57 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
8BIT wrote:
BigDumbDinosaur wrote:
Use of 65SPI to attach a UART adds a layer of hardware and software that may limit performance and flexibility. Doing so would be, in effect, "double serializing" the data flow, with attendant performance hits.

My SBC-3 suffered from that effect. I used an ATMega8's USART for serial transfer and it connected to the 65816 through a 65SPI. Data throughput was less than optimal. SBC-4 used a Exar XR68C92 Dual UART connected directly to the 65816 busses with excellent throughput.

The XR68C92 is functionally similar to the NXP 26C92, except it uses a Motorola style bus interface. I looked at it as I was designing POC V1.0, but decided that the NXP part was a little less work to interface. Also, I had prior experience with writing a driver for an NXP 2698 octart used in a 65C02 system. So the software side of it wasn't very difficult.

As you noted, these UARTs can produce high throughput, and do so without hammering the '816 with IRQs. Incidentally, the NXP 28L92 DUART can be configured to work with either an Intel or Motorola style bus.

scotws wrote:
Hadn't heard about the XR68C92 until now, but then I have been ignoring the PLCC chips.

You can give the XR68C92 a read right here. When the pin count starts to get up there, as it does with these multichannel UARTs, PLCC becomes more practical, as less PCB real estate gets used up.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 30, 2015 12:19 pm 
Offline

Joined: Mon Aug 05, 2013 10:43 pm
Posts: 258
Location: Southampton, UK
SPI is great, but use it for peripherals which are only available on SPI, not traditional stuff like UARTs/VIAs etc.

_________________
8 bit fun and games: https://www.aslak.net/


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 30, 2015 3:47 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
BigDumbDinosaur wrote:
The XR68C92 is functionally similar to the NXP 26C92, except it uses a Motorola style bus interface. I looked at it as I was designing POC V1.0, but decided that the NXP part was a little less work to interface.


Hi BDD,

I'm curious, what about the XR68C92's bus is hard to interface? It bolts right up to the 6502's bus with no special interfacing?

Here's the schematic image of the XR68C92 from SBC-4:
Attachment:
uart.png
uart.png [ 19.72 KiB | Viewed 1666 times ]


The /SERSEL logic for pin 33 is simple AND'ing of the relevant address bus lines and PHI2. Here's my code straight from the SBC-4 CPLD source:
IOPAGE = !A23 & !A22 & !A21 & !A20 & !A19 & !A18 & !A17 & !A16 & !A15 & !A14 & !A13 & !A12 & !A11 & !A10 & A9 & !A8;
!SERSEL = !A7 & A6 & A5 & IOPAGE & PHI2; SER = $000260 - 027F

I'm not trying to criticize your selection of UART or your reasons for not wanting the XR68C92, and I have nothing against the other UARTs out there, I'm just trying to understand your statement.

Also, the package I used was a TQFP, which is relatively easy to solder compared to PLCC and SOJ style packages. It is sitting next to the green LED in the photo on this page: http://sbc.rictor.org/info4.html

thanks!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Last edited by 8BIT on Sat Jun 27, 2020 8:57 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 30, 2015 8:50 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Aslak3 wrote:
SPI is great, but use it for peripherals which are only available on SPI, not traditional stuff like UARTs/VIAs etc.

The fastest SPI parts are faster than the fastest off-the-shelf 65xx parts, being able to transfer data at about 10 megabytes per second (close to 100 Mb/s); so it should not be viewed as slow. Darryl's 65SPI chip allows transferring a bit (not a byte) every second pulse of the phase-2 input IIRC, meaning a byte every 16 clocks. That's too slow for a few things, but OTOH, the 65SPI handles the shifting while the processor takes a few instructions to fetch, store, or otherwise process the data fed to or received from the 65SPI. In most cases, the processor could not be ready for the next byte any sooner anyway, meaning there would be no virtue in the 65SPI going even ten times as fast.

Nice things about the synchronous-serial interfaces like SPI, microwire, and the slower I²C are:

  • You can get a lot more on a board, because each IC can be smaller, needing anywhere from one pin (for Dallas' 1-Wire) to four pins (for SPI) for the interface. The MAX3100 SPI-interfaced UART is available in a 14-pin DIP or 16-pin SOIC which take a lot less room than a 6551 or any other parallel UART, and an 8-megabyte SPI flash for file storage in an SO-8 takes 0.35"x0.21" or about 0.075 sq in (but I put it on an adapter to plug into an 8-pin DIP socket). Adding more SPI or Microwire devices to the bus takes only one interface wire per device (or sometimes none, if they can be daisychained). Adding more I²C or 1-Wire devices takes zero extra wires.

  • By the same token, it's a lot less work to wire up, making us able to complete bigger projects in a limited amount of time.

  • Adding more such devices does not increase the loading on the processor's own buses, so its maximum speed doesn't get pulled down as devices are added.

  • These serial buses are quite appropriate for things that don't have to be so fast, like keypads, digital temperature sensors, real-time clocks, relay drivers, and a lot of other things, but not for scratchpad RAM and a narrow range of other things.

_________________
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 Mar 30, 2015 9:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
8BIT wrote:
I'm curious, what about the XR68C92's bus is hard to interface? It bolts right up to the 6502's bus with no special interfacing?

I was using "interface" in the abstract sense, not the literal hardware hookup. I don't recall all the little details at the moment (it's been six years since I designed POC V1), but I think it had something to do with writing the drivers.

Quote:
The /SERSEL logic for pin 33 is simple AND'ing of the relevant address bus lines and PHI2.

One thing I do not do is qualify any chip selects with Ø2. With the '816, as soon as VDA || VPA goes true the addressed device is selected so as to assure that it has plenty of time to respond and prepare for access.

Quote:
Also, the package I used was a TQFP, which is relatively easy to solder compared to PLCC and SOJ style packages.

I socketed the UART, so I didn't have the dubious pleasure of trying to solder 44 J-leads. POC V2 will be using the NXP 28C94, which is in a PLCC52 package, and also will be socketed. I'm tempted to try the TQFP package but know that I can't manually solder anything with that fine a lead pitch. I hope to soon have a reflow setup going.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 30, 2015 10:12 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
BigDumbDinosaur wrote:
8BIT wrote:
I'm curious, what about the XR68C92's bus is hard to interface? It bolts right up to the 6502's bus with no special interfacing?

I was using "interface" in the abstract sense, not the literal hardware hookup. I don't recall all the little details at the moment (it's been six years since I designed POC V1), but I think it had something to do with writing the drivers.


Ok - I understand that. Thanks!

Quote:
Quote:
The /SERSEL logic for pin 33 is simple AND'ing of the relevant address bus lines and PHI2.

One thing I do not do is qualify any chip selects with Ø2. With the '816, as soon as VDA || VPA goes true the addressed device is selected so as to assure that it has plenty of time to respond and prepare for access.


I cannot remember if I had an issue with the /CS not being qualified with PHI2, but having it qualified does work.

Quote:
Quote:
Also, the package I used was a TQFP, which is relatively easy to solder compared to PLCC and SOJ style packages.

I socketed the UART, so I didn't have the dubious pleasure of trying to solder 44 J-leads. POC V2 will be using the NXP 28C94, which is in a PLCC52 package, and also will be socketed. I'm tempted to try the TQFP package but know that I can't manually solder anything with that fine a lead pitch. I hope to soon have a reflow setup going.


That would be nice. Since the SBC-4 has a solder mask, I was able to do the "glob it on and then use solder wick to remove the excess" method on the UART. TQFP makes that easier. I soldered the 36 pin SOJ SRAMS because I could not find a decent and cheap socket - I would not want to attempt to solder a PLCC chip.

Best regards!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 31, 2015 5:43 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
GARTHWILSON wrote:
(...) and an 8-megabyte SPI flash for file storage in an SO-8 takes 0.35"x0.21" or about 0.075 sq in

If I'm reading the data sheet correctly, I think we're up to 128 MB in 16-pin SOIC using two of the SPI lines (http://pdf.directindustry.com/pdf/spans ... 86119.html); Mouser wants about € 10 for that. So wouldn't this mean I can take a 65SPI, attach four of those, and have 512 MB of mass storage in five little chips?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 53 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: