6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Nov 12, 2024 4:56 am

All times are UTC




Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10 ... 12  Next
Author Message
PostPosted: Tue Aug 29, 2023 12:39 am 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Paganini wrote:
And here's a capture of it running:
Attachment:
capture.txt

That... looks like the wrong capture, or something is very wrong! :) No prediction errors though, so that's good!

Quote:
The reset line is *still* not as smooth as I would like. Here it is thumping along with the clock (this is the fast 20MHz oscillator):
Attachment:
20230828_164224.jpg

It's not as bad as most of the noise I put up with. Actually the thing that's odd to me there is that it's actually not very noisy - there's no high frequency noise like there is on your clock signal. It's all very low-frequency fluctuations. Is this a resistor-capacitor reset circuit, or something like a DS1813? If it's an RC circuit maybe its own capacitor is smoothing out the high frequencies.

I'd take a look directly at VCC with the scope, to see whether that is varying in a bad way during the clock cycle. It seems likely that the reset signal is just reacting to changes in VCC. If there's a deep spike down in VCC when the clock switches low, for example, that could suck some of the charge out of the reset circuit's capacitor, and it then takes it a while to charge back up.

Quote:
The other thing is that the data bus still looks really bad.
Attachment:
20230828_171947.jpg
With the slow oscillator, you can *really* see clearly how the high levels are fluctuating. Again, they don't ever seem to drop low enough to cause logic errors, but it bothers me. It's ugly, and I don't understand why it's there.

I don't think I understand what was on that scope I'm afraid.

Quote:
That is to say, I think it's there because the oscillator / prescaler switch hard and put a lot of noise on VCC. But I've got bypass caps out the wazoo and a couple of big bulk decoupling capacitors (10uf and 100uf) right by where the power comes on board, which is what I normally do. Maybe these capacitors just aren't very good?

The capacitors mostly help with sudden demands for current - if the demand isn't short-lived, the capacitors will drain and VCC will be pulled down anyway. In a digital circuit like this, nothing should be pulling a lot of current for a long period of time - it takes a lot of current momentarily to switch states quickly, but shouldn't be a steady state. Maybe an even slower clock will cause it more, and if you do see significant prolonged drops in VCC, something is drawing a lot of current and maybe getting warm to the touch.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 29, 2023 2:09 am 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
gfoot wrote:
That... looks like the wrong capture, or something is very wrong! :) No prediction errors though, so that's good!
I don't know what you're talking about, it looks fine to me... <.< >.>

(All fixed now. That other one was from BDD's ZP RAM test. :oops: )

Quote:
Actually the thing that's odd to me there is that it's actually not very noisy - there's no high frequency noise like there is on your clock signal. It's all very low-frequency fluctuations. Is this a resistor-capacitor reset circuit, or something like a DS1813? If it's an RC circuit maybe its own capacitor is smoothing out the high frequencies.
It is a DS1813.

Quote:
I don't think I understand what was on that scope I'm afraid.
The top was just an unconnected trace. The bottom is D0.

Quote:
The capacitors mostly help with sudden demands for current - if the demand isn't short-lived, the capacitors will drain and VCC will be pulled down anyway. In a digital circuit like this, nothing should be pulling a lot of current for a long period of time - it takes a lot of current momentarily to switch states quickly, but shouldn't be a steady state. Maybe an even slower clock will cause it more, and if you do see significant prolonged drops in VCC, something is drawing a lot of current and maybe getting warm to the touch.
All this is pointing to there still being some problem with VCC. Tomorrow I had better actually check and see how much current the board is really drawing. I'll have a look at VCC on the scope as well. I want to say I did that and it looked fine, but I'm doubting my self.

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 29, 2023 6:41 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Just a thought: are you being careful about where you connect your scope probe's ground? It needs to be a good connection, to a ground that's closely associated with the driver (or receiver) of the signal you're probing. Probing at the receiver with the receiver's ground should tell you what the receiver will be seeing. Probing at the driver with the driver's ground should tell you what the driver is sending.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 29, 2023 2:25 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
Hi Ed,

I don't know if I would say careful. I find that where the probe ground is attached makes less of a difference than people have told me it will. E.g., I see minimal difference on the scope between using one of those little wire springs and just clipping the alligator lead to a short jumper wire. That being said, I've made every IC's ground available on a header pin, and I generally do try to remember to put the ground clip on that pin so I can see just what that IC sees.

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 29, 2023 3:36 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Sounds like you're on the case! I'm not terribly well-versed myself, I just remember reading various tips.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 29, 2023 4:08 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
I did a little more investigating. The whole board draws about 20 mili-amps with the oscillator in and about 5 mili-amps with the oscillator out. I assume that the oscillator is not solely responsible for the entire 15 mili-amp difference there, but that the other ICs are drawing less current since - without a clock - they don't switch!

What I would really like to figure out is the data bus. Here is a scope view of A0 (on the bottom), triggered off the CPU's clock input:
Attachment:
20230829_114602.jpg
20230829_114602.jpg [ 3.2 MiB | Viewed 3791 times ]
I think that looks pretty good. There are a few little wiggles, but nothing that would concern me. The other address lines look similar.

Here's the same scope view, except I moved the probe to D0:
Attachment:
20230829_114649.jpg
20230829_114649.jpg [ 3.83 MiB | Viewed 3791 times ]
At first I thought maybe it was just because the W24512 has weak drivers as Bill suggested. But it looks like that even if I *remove the RAM IC from the board.*

Since the address lines seem fine, and only the CPU drives the address bus, I think that might mean that if only the CPU were driving the data bus it would look fine too. Since the only other thing on the data bus besides the CPU and RAM is the ROM, I think that means that the ROM is responsible. That's hard to test, since the CPU doesn't do anything without ROM! But maybe I could rig up an EEPROM to go in place of the FLASH ROM and see if anything changes. An alternate possibility is, the data bus does go to the edge connector and the address bus doesn't. So maybe I should hook up some address lines to the edge connector and see if that changes anything. I will try both of those this afternoon.

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 29, 2023 6:32 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 959
Location: Potsdam, DE
Bear in mind that the address lines are always driven by the processor (unless you're into some funky DMA stuff!) and so will generally always see the same load. Data lines are driven by a number of sources; between the processor, RAM, and EEPROM you're seeing at least three different technologies almost certainly with differing loads and drive capabilities... even with the driven part removed, there will still be data cycles where the whole bus is open and floating.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 30, 2023 1:30 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
Hi Neil,

What's concerning me is that the logic high levels seem to be dipping or spiking by +/- 250 mili-volts or so *during a bus cycle.* E.g., the line is being held high around 5.1v, and when the next master clock tock happens you can see it slide down to 4.8v or even less. You can see that happening more clearly on the scope shot from a few posts back. Also, although I didn't upload a picture of this, sometimes the rise times look really slow, like a capacitor charging.

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 30, 2023 2:15 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
On the photo of the D0 line above, I don't see any high levels dipping. I see two distinct high levels, one at rail and one a bit lower, and would assume that this is two different chips each with their own particular output drivers. I don't see anything to worry about.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 30, 2023 2:26 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
Well... maybe I am being too fussy. The board *does* seem to work. Thanks Ed!

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 01, 2023 7:38 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 959
Location: Potsdam, DE
As Ed says; you only care about the logic levels being correct at the time they are sampled/clocked (and of course that the clocking signals don't end up being too close to the transition levels!)

What they do the rest of the time is always going to be a function of stray capacitance and inductance around the circuit, plus the internal design of the part.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 03, 2023 9:16 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
While taking a short break from Blue August to ponder how to improve the design, I took the opportunity to make a little improvement to my workshop that is long overdue: a mini bench-PSU.
Attachment:
20230903_165247.jpg
20230903_165247.jpg [ 3.52 MiB | Viewed 3662 times ]
It doesn't have anything fancy, like variable current / voltage, but it does have a simple two-transistor current limiting circuit that feeds an LM7805 5V regulator through a rectifier diode, so it will provide a nice clean 5V to my breadboards and SBCs, and, hopefully, will keep things from frying long enough for me to notice that something is wrong when I plug my oscillator cans in upside down!
Attachment:
20230903_165352.jpg
20230903_165352.jpg [ 3.49 MiB | Viewed 3662 times ]
It runs off of a 9V wall wart I happened to have laying around, but also works with anything that outputs to a center-positive barrel plug, such as a laptop charger. I couldn't find my 50V electroyltics, so I had to use 16V ones, so maybe I won't power it regularly from my 18V Compaq LTE charger, but it didn't blow up when I briefly tested it. :D

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 04, 2023 12:06 am 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
And now back to Blue August! I've been thinking about how to speed things up, and I've come up with two ideas.

One is: use faster parts (low-hanging fruit, there). I like my HC688, but it is very slow. The (much!) faster alternatives have TTL outputs, so I initially didn't consider them at all. I have now overcome my reluctance. At the cost of one pull-up resistor I can use a 74F521 or, even better, a 74ALS521 or `520, and get one gate delay instead of three. (The 520 even has 20k pullup resistors on its inputs, so if I didn't mind moving my I/O window out of ZP and into the upper 32k, I could ditch the resistor network.)

Two is: parallelize things that can be parallelized, such as I/O decoding. The critical pathway for timing is the clock stretch logic. The clock stretches on ROM access, and on slow I/O (such as my 4MHz Rockwell ACIA). The clock stretch logic needs have identified such a condition by 8ns before phi-2 goes high, so that the clock stretcher `166 can load its new value. The current glue logic has to wait 3 gate delays for the HC688 to figure out if it's an I/O access before the AHC138 can decode the specific device. That's already 4 gate delays, not counting the logic needed to check for ROM access. Here is a schematic fragment of the new version:
Attachment:
IO-decode.png
IO-decode.png [ 16.46 KiB | Viewed 3646 times ]
(Sorry, it seems kind of small; I haven't quite got the hang of screenshots on my new laptop.) Anyway, I'm wondering about the value of that pullup resistor. My default value is 3.3k, but that's for tying high input pins on a 65C02, and I'm afraid here it would make the rise time too slow. I don't want the I/O signal to stay low too long (some of the datasheets and app notes I was looking at are contemplating 100ns rise times!) or it will bleed over into the next clock cycle. If I did the math right, I think I could go as low as 220 ohms, but the trade-off there seems to be an awful lot of current.

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 05, 2023 10:56 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 490
Here is a faster Blue August:
Attachment:
File comment: Fixed a typo
Fast6502-Glue.pdf [56.31 KiB]
Downloaded 36 times
I think this might just squeak by at 16MHz. This is pretty close to having my cake and eating it, but I did have to give up the ability to move the I/O window into high RAM. When you're trying to cut close to the bone, one gate delay can be the difference between a 60ns (16MHz) and a 70ns (14MHz) cycle time!

I can actually build this version on the existing Blue August board, with some extensive rewrapping. I would need to combine the LO_RAM and HI_RAM signals into a single RAM_CS, but that wouldn't be a problem.

But, while I've been working on this, I've also been building something else... call it SPC for Standard Pag Computer. :) Whenever I get into trouble with one of these projects, it seems like it always happens because I've deviated from some general some design principle in order to build some specific thing. Or, maybe a better way to put it is, focusing on building a specific design (from a schematic or whatever) distracts me from the abstract model of good practice. So, I built a kind of philosophical prototype board. With no specific 6502 system in mind, I took one of the same prototype boards that Blue August and Peanutbutter-1 are made of, and I started by tying the VCC and GND buses together in a grid, and putting on a generic pin-header edge connector.
Attachment:
20230902_180238.jpeg
20230902_180238.jpeg [ 3.4 MiB | Viewed 3585 times ]
Then I started adding IC sockets; not with any particular design in mind, but just trying to fill in the VCC / GND grid in a consistent way that would maximize the use of space:
Attachment:
20230904_141101.jpeg
20230904_141101.jpeg [ 3.34 MiB | Viewed 3585 times ]
There are five general 14-pin sockets, plus one 14-pin socket wired up to hold a full- or half-can oscillator. There are five 16-pin sockets, and two 20-pin sockets. I included two 28-pin narrow sockets and one 28-pin wide socket, and a socket for a 6502, of course! I desoldered the DS1813 from the first (failed!) Blue August build - no sense in letting it go to waste - and moved it over. I also put on a resistor bank (47k) and some single resistors (3.3k) that can be used for pull-ups/downs. I still need to add some bulk power supply decoupling and some wire-wrap pin headers.

I quite like how it's looking. It may sound silly, but one reason I like it is that the 28-pin socket will let me use my Aries ZIF socket again (I only have a 28-pin one, not a 32-pin one). It just makes a hobbyist's life better! :)

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Last edited by Paganini on Tue Sep 05, 2023 11:10 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 05, 2023 11:05 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
Paganini wrote:
But, while I've been working on this, I've also been building something else... call it SPC for Standard Pag Computer. :)


I was reading through it, and looking at the pictures, thinking, "What the heebee's are you even doing?!" But then I realized, "Oh yeah, wire-wrap." I really like your idea here! You've got a good variety of sockets, the placement looks good, and the idea is great. If you have a really solid power/ground grid, then everything else will work out really well :)

Starting a new project is always ok! We all know our limits to a particular build. Sometimes I do a LOT of bodge wires, sometimes I'm not happy even with one.

So, planning on 16 MHz or 1 MHz, it's neat to see this new style, and it all makes sense for what you do. Thanks for sharing!

Chad


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10 ... 12  Next

All times are UTC


Who is online

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