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

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: SC26C92
PostPosted: Mon Nov 30, 2020 4:03 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Hi guys

I'm thinking of moving away for the standard wdc w65c51 (mostly due to the xmit bug). Looking around, people seem to like the NXP SC26C92 and, looking at it, it seems to be a very versatile chip.

Are there any particular gotchas that anyone knows when using it with a wdc w65c02s?

The things I've picked up so far:
- Reset is active high, so RESB will need to be inverted
- There are separate Write and Read pins, with both being active low, so RWB needs to be invertered for read (RDN)
- INTRN is active low and open drain (so no change there)
- This is a CMOS only chip so any inputs interfacing TTL only needs a pull up (including the oscillator if one is used). Should be fine for most WDC devices apart from the N versions.

Here's my ciruit:
Attachment:
w65c02_sc26c92c1a.gif
w65c02_sc26c92c1a.gif [ 27.54 KiB | Viewed 706 times ]



I've outputed the IP and OP pins to headers for the moment

I think the SC26C92 will be fine sending from TXDA and TXDB (CMOS to TTL) and I *think* the MAX232 is CMOS compatible so should be ok going back to RXDA and RXDB, but not 100% sure.

[edit] typo corrections


Last edited by banedon on Mon Nov 30, 2020 6:00 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Mon Nov 30, 2020 5:14 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Very similar is the 28L92, which there is a specific tutorial on interfacing and driving, linked in the first post in this thread.


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Mon Nov 30, 2020 6:01 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Chromatix wrote:
Very similar is the 28L92, which there is a specific tutorial on interfacing and driving, linked in the first post in this thread.

Thanks :) . I've downloaded the docs and am looking through them at the moment.

[edit] Just realised that the SC26C92 is no longer manufactured and as I only have one of them in my box o' bits I think I'll skip it. Instead, I'm looking at NXP SC16C2552B.


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Mon Nov 30, 2020 6:45 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
I'm thinking of moving away for the standard wdc w65c51 (mostly due to the xmit bug). Looking around, people seem to like the NXP SC26C92 and, looking at it, it seems to be a very versatile chip.

I recommend you instead use the 28L92. Same basic programming model, but larger FIFOs, faster timing and some other useful features.

Quote:
Just realised that the SC26C92 is no longer manufactured and as I only have one of them in my box o' bits I think I'll skip it. Instead, I'm looking at NXP SC16C2552B.

Better if you stick with the 28L92. The 16C2552B is inferior to the 28L92 in several ways, not the least of which the former doesn't have a precision timer, a feature that I have found very useful for generating jiffy IRQs.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Tue Dec 01, 2020 4:28 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I also recommend going with the SC28L92, which will be on my next SBC as well.

Referring to your schematic, a couple things:
1- I would qualify the /RD and /WR lines withe the Phase 2 clock of the CPU.
2- You have the second serial port going through the level shifter to RTS and CTS. Are you redefining the connector or just an oversight?

As for getting the code written with the W65C02, take a read through this link, as an extra read (indexed addressing) results in the Mode register(s) not getting setup correctly:
viewtopic.php?f=2&t=4992

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Tue Dec 01, 2020 7:06 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
floobydust wrote:
1- I would qualify the /RD and /WR lines withe the Phase 2 clock of the CPU.

Like this, for example:

Attachment:
read_write_qualify_alt.gif
read_write_qualify_alt.gif [ 46.98 KiB | Viewed 644 times ]

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


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Tue Dec 01, 2020 8:48 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Thanks for the recommendation, guys. I'll have a good read of the SC28L92 datasheet, but given what you've said I strongly suspect I'll go for it.
With regards read & write signals: I'm using an ATF1502AS CPLD to do my decoding and have a /WR pin and /RD pin already as outputs so qualifying them with PHI2 is noty an issue (unless I run out of product terms - it's doing bank switching and IRQ handling as well).

Something else I've been mulling over (and only slightly related): Instead of driving PHI2 though a D type flip flop I can route the oscillator into one of the CPLD pins and out of another. This might give me a square wave, but without halving the clock, albeit at just over 4V. I'll qualify decoding, /WR, /RD, etc. from the internal feedback from the PHI2 output pin. I'll have to check what the ATF1504AS driving can support though...


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Tue Dec 01, 2020 8:52 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
If all you need is to sharpen the clock edges, use a Schmitt Trigger buffer or inverter. That won't do anything for duty cycle, though, whereas a clock divider would.


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Tue Dec 01, 2020 9:52 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Chromatix wrote:
If all you need is to sharpen the clock edges, use a Schmitt Trigger buffer or inverter. That won't do anything for duty cycle, though, whereas a clock divider would.

I've got very little real estate PCB-wise so trying to minimise ICs, but you make a good point about the duty cycle.


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Wed Dec 02, 2020 12:06 am 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
floobydust wrote:
I ... 2- You have the second serial port going through the level shifter to RTS and CTS. Are you redefining the connector or just an oversight?

As for getting the code written with the W65C02, take a read through this link, as an extra read (indexed addressing) results in the Mode register(s) not getting setup correctly:
viewtopic.php?f=2&t=4992


Sorry, flooby, I didn't address your second question. yes, it was on oversight. I've corrected the diagram accordingly.

So, here's my circuit design for the serial interface:

Attachment:
w65c02_sc28L92.gif
w65c02_sc28L92.gif [ 30.2 KiB | Viewed 614 times ]


A couple of things I need to look into:

- How to use DACKN
- How to use IACKN
- Do I still need DTR connected to V+ on the MAX232


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Wed Dec 02, 2020 12:07 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
Chromatix wrote:
If all you need is to sharpen the clock edges, use a Schmitt Trigger buffer or inverter. That won't do anything for duty cycle, though, whereas a clock divider would.

I've got very little real estate PCB-wise so trying to minimise ICs, but you make a good point about the duty cycle.

If you are running your system at lower speeds, Ø2 symmetry is not much of a concern and you can eliminate the flop. Most CMOS clock oscillators produce a pretty sharp waveform, although it may be slightly asymmetric. You should be able to directly drive the MPU and CPLD with the oscillator if you aren't running too fast.

As you close in on the MPU's maximum speed an asymmetric clock could cause timing issues that will be difficult to identify. Hence the use of the flop for higher frequencies.

With that said, if real estate is cramped perhaps you should consider use of SOIC packages instead of DIP for your glue logic parts. Although the pin pitch of SOIC is half that of DIP, it is manageable with manual soldering techniques. Before my left eye went south on me I could solder SOIC parts with one hand while swilling a beer with the other. :D

Lastly, consider replacing the ATF1502 CPLD with an ATF1504 to gain more resources. Both are PLCC-44, so the upgrade will have no effect on your board layout.

Quote:
Something else I've been mulling over (and only slightly related): Instead of driving PHI2 though a D type flip flop I can route the oscillator into one of the CPLD pins and out of another.

I do not recommend doing so. All Atmel five volt CPLDs generate TTL-level outputs. The data sheet specifies that the typical VOH is 2.4. WDC MPUs require a clock signal that is at CMOS levels, generally swinging between zero and 4 volts minimum. Although the CPLD's output may exceed the VOH spec in typical operation, that isn't guaranteed.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Wed Dec 02, 2020 12:57 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
A couple of things I need to look into:

- How to use DACKN

You don't.

Quote:
- How to use IACKN

You don't

Quote:
- Do I still need DTR connected to V+ on the MAX232

Have you read the attached? :D It should answer your questions.

Attachment:
28l92_interfacing.pdf [381.39 KiB]
Downloaded 75 times

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


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Wed Dec 02, 2020 1:02 am 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
BigDumbDinosaur wrote:
Quote:
Something else I've been mulling over (and only slightly related): Instead of driving PHI2 though a D type flip flop I can route the oscillator into one of the CPLD pins and out of another.

I do not recommend doing so. All Atmel five volt CPLDs generate TTL-level outputs. The data sheet specifies that the typical VOH is 2.4. WDC MPUs require a clock signal that is at CMOS levels, generally swinging between zero and 4 volts minimum. Although the CPLD's output may exceed the VOH spec in typical operation, that isn't guaranteed.[/color]

Got some ATF1504AS so will do. I'd also just realised that TTL output issue with them as well ( :oops: ) which surprised me a little. That also leads me to an issue with any signals running from the CPLD to the SC28L92 as we're going TTL output to CMOS input so it looks like I'm going to have to use pullups on those (I usually use 1k but should I use 470R as suggested on the X1 input if using TTL clock source? Seems a bit low, though...).

Speed-wise I'm planning to run at higher speeds so the flip flop is probably still a good idea. Good call on SOIC - I have no problems with soldering them as long as I have my magnifier (as with you, my eyesight is not so good these days, sad to say).

OK time for bed as it's 1am and my brain doesn't do well without its beauty sleep :mrgreen: .

[Just spotted your other answers - many thanks! I have started making my way through them, but stopped when I realised I'd need to find a different chip. Anyhooo, off to bed.]


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Wed Dec 02, 2020 2:01 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
banedon wrote:
I'd also just realised that TTL output issue with them as well ( :oops: ) which surprised me a little. That also leads me to an issue with any signals running from the CPLD to the SC28L92 as we're going TTL output to CMOS input so it looks like I'm going to have to use pullups on those (I usually use 1k but should I use 470R as suggested on the X1 input if using TTL clock source? Seems a bit low, though...).

With one exception, VIH on the 28L94 is 2.4 volts minimum, so it should respond okay to the outputs of the CPLD. The exception is the X1 clock input, which must be driven at CMOS levels. Any HCMOS oscillator can do that.

The 470 ohm pull-up on X1 is recommended by NXP, but they don't explain why. I suspect it is there to attenuate ringing. My POC V1.1 unit doesn't have that resistor and works fine. POC V1.2 does have it and I see no difference in signal quality between the two units.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: SC26C92
PostPosted: Wed Dec 02, 2020 11:31 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
banedon wrote:
- Do I still need DTR connected to V+ on the MAX232

I had assumed that this port was for connection to a terminal, but now that I see this I'm not sure.

If the port is for connection to a terminal that will control the board (i.e., you are DCE), you shouldn't assert or deassert DTR; that's controlled by the other end to tell you whether it's "alive" or not. (You might just ignore this and assume that the other end is always there.) You should also probably assert CTS when you're ready to receive data. (And, again, maybe even when you're not, if you don't care about data loss.)

If the port is for connection to a modem or other thing you're controlling (i.e., you are DTE), you should assert DTR when you're wanting to use that device. You may or may not deassert it when you're not using the device. It's probably a good idea to assert RTS, too, when you want to send data.

Wikpedia has a decent summary of the control signals. Many systems might not care, but it can be annoying when you plug into one that does and it refuses to send data because you've not asserted an appropriate signal.

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  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: