6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 3:21 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Sun Dec 20, 2015 3:33 pm 
Offline

Joined: Mon Oct 19, 2015 7:04 am
Posts: 68
Location: France
Hello,
In my last post about my 65C02 SBC (which I use in my RPN keystroke-programmable desktop calculator project), I had in mind to get it faster than 2 MHz. I ordered and received WDC parts from Mouser, and clock oscillators rated at different frequencies. I did the required hardware modifications (disconnected CPU pin 1, and tied BE input to logic 1). I also replaced the 120-nS RAM with a 100-nS one, and put a 70-nS EPROM I had in my parts box.
Then I powered it up without replacing the 2 MHz clock oscillator : 100% OK.
Next test : I clock it from my arbitrary waveform generator : 4 MHz OK, 5 MHz OK, 6 MHz OK ! based on my previous tests, I go on with small frequency increments.
Everything is fine up to 6.66 MHz ; as soon as I switch to 6.67 MHz the program stops running. I didn't have time to investigate more, but the limiter here certainly is the wiring / capacitances / ringing and what else -which doesn't surprise me, my board is hand-wired... I got it running faster than what I initially hoped.

Then I ran continuous tests using a 6 MHz oscillator : after 48 hours everything is OK. Next week, I'll do longer runs.

According to the test results, the timing margin is approximately 11% ; do you think that it's a reasonable choice ? Of course it it were for a production device, I wouldn't get higher than 4 or 5 MHz.
Many thanks in advance for your advice !

Marc

(Anyway I'm very happy with all that, my calculator is 3 times faster than before ! Now it executes approximately 2000 instructions / second in simple arithmetic programs).


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 20, 2015 4:20 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
I know Garth likes to back off 20%, but that might be his professional persona's opinion. For a hobby opinion, I would think 10% would be fine, if you're confident your test program covers all cases, and your power supply and temperature are not going to vary much from the conditions you tested at. (If you're making something battery powered, that's probably a difficult case, as the voltage will go down as the batteries run low and will also be temperature sensitive.)


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 20, 2015 5:48 pm 
Offline

Joined: Mon Oct 19, 2015 7:04 am
Posts: 68
Location: France
Thank you very much, BigEd !

It's more or less what I had in mind (old memories) that professional/industrial class devices should have at least 20% margins. Being a home-made experimental machine, I think I'll keep up happily with 10%. That won't prevent me from doing extended tests (especially next summer for the temperature side).

The power supply shouldn't be problematic : my machine is line-powered. Should it be battery-powered, I'd keep using a battery voltage higher than 7V for the 7805 to work well. BTW, an advantage of the WDC circuits (except that broken 65C51 for which I rewrote the driver) over the older ones from Rockwell is their lower power consumption. The regulator's small heat sink stays below 30 Celcius degrees.

I would also like to have a look at the waveforms, I suspect there's some ringing at many places. Some day I'll bring the machine to a friend's lab, he's got better oscilloscopes / probes than mine. Anyway, when the RAM test was running, I repeatedly touched with my fingers (not grounded) groups of pins on each IC : no trouble.

The RAM test ran successfully for several hours, and the calculator software already computed thousands of digits of Pi correctly. Next week I'll launch longer tests :-)

EDIT : typos


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 20, 2015 6:10 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
Quote:
thousands of digits of Pi

I approve!


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 20, 2015 6:35 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
calculi wrote:
In my last post about my 65C02 SBC (which I use in my RPN keystroke-programmable desktop calculator project), I had in mind to get it faster than 2 MHz. I ordered and received WDC parts from Mouser, and clock oscillators rated at different frequencies..I also replaced the 120-nS RAM with a 100-nS one, and put a 70-nS EPROM...as soon as I switch to 6.67 MHz the program stops running.

It sounds to me as though the 100ns RAM is not able to keep up with the 65C02. At 6.67 MHz, the machine cycle time is ~150ns. However, consider that read/write activity occurs during Ø2 high, which means you are bumping up against the available time in a half cycle, which is ~75ns. Given the 100ns rating of the RAM, the theoretical maximum Ø2 rate at which your circuit could run is closer to 5 MHz, assuming the RAM was selected during Ø2 low and was ready for read/write on the rise of the clock. It is likely your circuit works at 6+ MHz because most device ratings tend toward the pessimistic side.

Also factors are the propagation delay of the glue logic and whether your method of generating chip selects is dependent on the clock phase. Your solution to the prop delay is to use faster logic, e.g., 74AC. If you are using the Ø2 clock as part of the decoding logic you have built in a sort of brick wall, due to chip selects only occurring during Ø2 high.

Performance issues are discussed in quite a bit of detail around here. It's also worthwhile to take a look at Jeff Laughton's timing discussion page, to get this all clear in your mind.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 20, 2015 9:18 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
BigEd wrote:
I know Garth likes to back off 20%, but that might be his professional persona's opinion. For a hobby opinion, I would think 10% would be fine, if you're confident your test program covers all cases, and your power supply and temperature are not going to vary much from the conditions you tested at. (If you're making something battery powered, that's probably a difficult case, as the voltage will go down as the batteries run low and will also be temperature sensitive.)

My workbench computer started having problems just about 7MHz with 4MHz parts, so I backed it down to 5MHz for some margin, and I've never had any trouble with it. I probably didn't need to go that low, backing it down 28%. If it were for a product to sell, then I'd get parts from as many lots as possible and test them all at maximum temperature and the minimum Vcc they'll see in the field, take the lowest speed any of them max out at, and then back it down perhaps 20% to a standard speed. I check with a variable-frequency oscillator, with practically infinite resolution, so I don't need a crystal or crystal oscillator for every frequency I want to try. Every battery-powered product I've done however had the 5V regulated, so it did not go down as the batteries weakened, and it periodically tested the battery strength and would shut itself down (and in most cases go into a fail-safe mode) before they got too weak for the circuits to do their job, if the user were to neglect the low-battery warnings and run it all the way down.

_________________
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: Sun Dec 20, 2015 10:17 pm 
Offline

Joined: Mon Oct 19, 2015 7:04 am
Posts: 68
Location: France
About Jeff Laughton's timing pages :

Yes, I had recently checked them and I knew that above 5 MHz I would hit the limits -but at first, mainly because of the wiring. It seems I'm lucky with it, and also with these RAM chips (pulled off some industrial equipment 25 years ago). I built this board 2 years ago and at that time, hadn't read all the performance related topics of the forum. I have planned for next year (if enough time) a second version of my machine (with a real PCB), it'll be an opportunity to enhance all that !

To all of you, thank you for your help !


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2015 9:07 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
Sounds like you'll be fine. Allow me to quote myself from a previous post:

BigEd wrote:
... If a design is out of spec, then it's out of spec - that doesn't mean it won't work. It only means that it might not work, under some conditions and with some in-spec parts. In other conditions or with another in-spec part, it might be entirely reliable.

Remember how it works with silicon fabrication: it's a baking process, and batches come out different. There's variation across the wafer, between wafers in a lot, and between lots. Also, if made in different fabs, variation between fabs. It's quite possible that one whole year of production is fine for a particular not-in-spec design, and another year there'll be a week of production which isn't fine. Could be that it doesn't work, could be that it's unreliable.

The nature of this is that you can't draw a conclusion from a working circuit, at least, no conclusion stronger than "this circuit, presently, seems to work."

You can draw a stronger conclusion from a not-working circuit!

(The other factor you have to take into account with specs is that they cover a range of temperatures and voltages. If you're not soak-testing at the extremes of rated temperature and the extremes of rated voltage, you haven't yet determined the behaviour of your circuit, or of your chip.)

In hobbyist land, we just don't need to be so strict. But this is why specs are the way they are, and it's why most parts will, most of the time, behave well inside the specifications.


(In this case, we weren't originally talking about specs, but about behaviour as some critical frequency is passed - some path became too long and a signal arrived too late relative to a clock. We don't know how much of that path was internal to a chip and how much was between chips, or how many chips it passed through. Quite a lot may have to happen on-chip between a pin and a storage element.)


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2015 9:48 am 
Offline

Joined: Mon Oct 19, 2015 7:04 am
Posts: 68
Location: France
Thank you BigEd ; BTW, my RAM chips (NEC D42356CL-10 dated 1987) clearly show this selection / rating process : the "-10" marking doesn't look the same as what's printed before it (much bolder). So, may we call all that frequency-fiddling on obsolete technology "retro-overclocking" ? ;-)
Time will tell if "this" machine's reliability is solid enough -if not, I'll switch back to 5 Mhz. (but I'm confident, after one more 24-hour cycle of successful computing)


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2015 9:55 am 
Offline

Joined: Sun Apr 10, 2011 8:29 am
Posts: 597
Location: Norway/Japan
GARTHWILSON wrote:
I check with a variable-frequency oscillator, with practically infinite resolution, so I don't need a crystal or crystal oscillator for every frequency I want to try.

That sounds like a useful part of an experimenter's hobby lab - is this something different from a (large) lab frequency generator?


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2015 11:28 am 
Offline

Joined: Mon Oct 19, 2015 7:04 am
Posts: 68
Location: France
Well, if basicallly it's the same -a signal generator, it is much more specialized : in our case, it only generates a square wave with TTL or CMOS-compliant levels and decent rise/fall times. A lab generator is kind of overkill since it's much more versatile. That can be an advantage if it allows you to adjust the duty cycle, for example.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2015 6:22 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Tor wrote:
GARTHWILSON wrote:
I check with a variable-frequency oscillator, with practically infinite resolution, so I don't need a crystal or crystal oscillator for every frequency I want to try.

That sounds like a useful part of an experimenter's hobby lab - is this something different from a (large) lab frequency generator?

Yes, these are just small, inexpensive home-made things. I do have a lab frequency counter though. The schematic for my first VFO is shown at viewtopic.php?f=1&t=2013&p=17478#p17478, in the topic, "Cheap oscilloscope & other test equipment."

The schematic for my second one, much smaller and good up to 73MHz, is shown at viewtopic.php?p=10619#p10619, in the topic "Getting Crystals Made."

_________________
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 Dec 21, 2015 7:37 pm 
Offline

Joined: Sun Apr 10, 2011 8:29 am
Posts: 597
Location: Norway/Japan
Thanks Garth, that looks very useful for our kind of small projects. I like the hand-drawn schematics btw.

-Tor


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2015 8:28 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Tor wrote:
Thanks Garth, that looks very useful for our kind of small projects. I like the hand-drawn schematics btw.

Thanks. Those are in this quick-reference mini ring binder I keep on the workbench, which now has 100 pages.

Image

_________________
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 22, 2015 4:55 pm 
Offline

Joined: Mon Oct 19, 2015 7:04 am
Posts: 68
Location: France
Thank you Garth,
I knew that you would quickly answer Tor's question better than me (given that I didn't had in mind at that time, your VFO-related posts I hesitated to answer -better not, it seems :wink: )


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

All times are UTC


Who is online

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