6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Oct 06, 2024 3:17 pm

All times are UTC




Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Fri Aug 20, 2021 11:13 pm 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
kernelthread wrote:
Regarding your schematic, note that whereas the RD strobe is active low, the WR strobe is active high. Data is latched on the falling edge of WR, so that needs to be coincident with the falling edge of the 6502 clock.


Whoops, you're completely right. I screwed up when I was drawing the symbol initially and it all went wrong from there. I suppose I can add an additional package to invert the '138s output, but I might step back to the drawing board instead of trying to be clever with one package.

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 20, 2021 11:21 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
You have a 74LS138 in the drawing for that. I don't know if you really intended to use 74LS, or if it's just that that was already in the CAD library; but the 74LS138 has a maximum propagation delay from your clock input to an output of 38ns. That's a lot, and adding a following inverter will only make it worse. If you use a '138, you might want one from a faster family. Otherwise I don't generally encourage use of the '138.

_________________
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 Aug 20, 2021 11:55 pm 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
GARTHWILSON wrote:
You have a 74LS138 in the drawing for that. I don't know if you really intended to use 74LS, or if it's just that that was already in the CAD library; but the 74LS138 has a maximum propagation delay from your clock input to an output of 38ns. That's a lot, and adding a following inverter will only make it worse. If you use a '138, you might want one from a faster family. Otherwise I don't generally encourage use of the '138.


Ah, yea, just the one in the CAD library, I usually notice it before exporting but I was obviously moving quickly. I have plenty of HC138s in my parts bin, but it looks like theres also an AHC variant easily available. I'd still rather avoid adding another chip to the board just for an inverter, so I'll be thinking through other possible solutions!

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 25, 2021 4:05 am 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
Back to the main board -- It arrived, and it works!

Attachment:
IMG_0706.jpg
IMG_0706.jpg [ 1.33 MiB | Viewed 935 times ]


I got the onboard CA1 LED blinking within a day. I initially soldered a can osc directly to the board and it was not clocking the CPU (no action on Sync or anything else). Once I pulled the can up and pushed a clock signal down the bus, we were in business. I'm not sure if the can was bad, or if I have a mistaken footprint for it. I'll further troubleshoot if it was the part or my design.

My 14-pin IDC sockets all went missing, so new ones are ordered and that will fill out the obvious missing bits of the board.

I do have a long list of minor layout adjustments to make before I spin a final "Version 1" but hopefully can draft that all up this week. I still need to dedicate the time to putting all the kicad files and their outputs on the web. I generated an interactive HTML BOM that makes assembly much easier.

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 25, 2021 4:32 am 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
Oh, one thing of note. The Reset LED doesn't illuminate when the board is in /RESET. looking back at the schematic, it looks like I will have to solder it backward to give it a chance to illuminate! For the revision I will probably switch to using the last gate on the '00 to provide a RESET (high) signal.

EDIT: I never posted the schematic with the Reset LED I actually went with. Trust me, it was wrong.

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 26, 2021 3:22 am 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
This is the reset LED circuit that was definitely never going to work:
Attachment:
schematic2.png
schematic2.png [ 5.87 KiB | Viewed 903 times ]


Now, I had to try out of curiosity. I reversed the LED, so power would actually flow through the diode. For my first few tries, the LED worked as expected, it illuminated as the board was in RESET and turned off when activity on SYNC began. A few hours later, I returned to the board, and when connecting an LED (with a 3k resistor) from RESET->GND kept the board in RESET, presumably because it was pulling the line low? Does the resistor size matter here?

In either case, I will probably just do as described earlier, and use the last gate on the '00 to provide an active high reset signal.

Now on to the more...confusing behavior I'm noticing.

When I plug in the board, it takes nearly 7 seconds (that's right, not milli, but SECONDS) for the board to leave reset. I have removed the reset LED for this test. I've heard of an oscillator taking some time to start up but not on this order of magnitude. Unfortunately I will have to find my jewler's loupe to read the writing on the DS1813 to confirm if its the 5%/10%/15% variety. I'll also have to try some other power supplies.

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 26, 2021 4:54 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
Individual_Solid wrote:
This is the reset LED circuit that was definitely never going to work:

It is correct. The anode is going towards the +5V, and when the reset line goes low, the diode will conduct and light up. The only problem might be if the load is too heavy for whatever is supposed to pull the reset line down to do so.

_________________
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: Thu Aug 26, 2021 5:07 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
Individual_Solid wrote:
This is the reset LED circuit that was definitely never going to work...

Am I just totally brain-farting here, or did you show a circuit that should work?

(EDIT: Yeah, Garth confirmed that it is correct. Thank you for destroying my self-confidence, Individual_Solid. :-))

Attachment:
RESET LED.png
RESET LED.png [ 6 KiB | Viewed 894 times ]

If I'm reading this right, the anode there is connected to +5V and the cathode through (a rather large!) resistor to /RESET, which is high when not asserted and low when asserted, which should cause current to flow from +5V through the LED to the grounded /RESET line. (Hopefully not pulling it up, per discussion below.)

Quote:
A few hours later, I returned to the board, and when connecting an LED (with a 3k resistor) from RESET->GND kept the board in RESET, presumably because it was pulling the line low? Does the resistor size matter here?

Well, it would just depend on what's pulling the line up and down, wouldn't it? My RC6502 SBC has a 1K pullup on /RESET and bring it low via the output of a 74LS04. That's effectively bringing it to ground with virtually no resistance, and the '04 I guess is handling the 5 mA of current just fine.

In your case I don't recall whether you have a separate pull-up for /RESET or if you're using the LED circuit as the pull-up as well. I would think that an additional separate pull-up might be a better idea since the LED circuit can only pull it up to 3.4 V or so due to the LED voltage drop, if I'm analyzing it correctly. And then you'll have to figure out how much current your LED+resistor is going to be sinking based the usual parallel resistance formula.

But you also, of course, need something that can sink all the current you're generating with the pull-up and the LED. You'll have to look at the data sheet for the part you're using for that to see what it does. I can't imagine you'd have any significant internal resistance in it since that would work against bringing the line all the way down to 0 V, but it's worth checking to see if you have accidentally ended up with some sort of resistor divider configuration.

You should also be able to simply use a jumper wire to short the RESET line to ground by hand. This isn't really recommended due to bounce and that at least on older CPUs you shouldn't hold reset down for too long, but it's worked for me on breadboards. If it's not, you can always just build another reset circuit on a breadboard, disconnect your existing one, and use the breadboard one to pull down reset.

And needless to say, put a 'scope on all this in case it's weird voltage levels that are doing odd stuff.

Quote:
When I plug in the board, it takes nearly 7 seconds (that's right, not milli, but SECONDS) for the board to leave reset.

That would be all about the device you're using to pull down the /RESET line, wouldn't it?

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 26, 2021 5:14 am 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
GARTHWILSON wrote:
Individual_Solid wrote:
This is the reset LED circuit that was definitely never going to work:

It is correct. The anode is going towards the +5V, and when the reset line goes low, the diode will conduct and light up. The only problem might be if the load is too heavy for whatever is supposed to pull the reset line down to do so.


Well, (and no surprise) you're right! That would explain why I had it working in one experiment and then when I returned to it (and was doing things wrong, it was instead pulling the board into infinite reset. I got things flipped in my mind before my afternoon experiments. I'll take a closer look tomorrow and see if I can't discern why the original LED (now destroyed by pliers) wasn't illuminating. Glad to know I did have it right at one point. Though I will check the DS1813 datasheet once I figure out which specific part I have.

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 26, 2021 6:23 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
Just 'cause this reset light sounded like a neat idea, I wired up the same circuit to my RC6502 Apple 1 clone SBC† (schematic here). It's a 1.5K resistor (chosen by random grab into the "1K-3K" section of my parts box) from Vcc to the anode of a small random red LED, the cathode thence to /RESET. That's in parallel with the 1K (checked on the board) pull-up on /RESET.

It seems to work fine. The LED is lit for as long as I hold down the reset button (apparently the designer of this decided that just debounce, rather than a one-shot, was the way to go here) and goes out when I let it go. The levels look fine on the scope both around the falling edge and rising edge of the reset, and Wozmon appears to reset correctly and let me type in commands after.

The inverted configuration (LED reversed and non-/RESET end hooked to ground) was also briefly tested (not actually intentionally :-)) and also seemed to work, with of course the LED on when not in reset and off during reset.

So what you want to do there, with that original circuit above, has been shown work. I am guessing that it's something else in your setup.

__________
†Boy am I getting tired of typing all that out. Any suggestions for abbreviations? R6A1CSBC? Yeah, that's perfectly comprehensible.


Attachments:
RC6502a1SBC-LED-1000R-RESETB-notasserted.jpg
RC6502a1SBC-LED-1000R-RESETB-notasserted.jpg [ 73.94 KiB | Viewed 886 times ]
RC6502a1SBC-LED-1000R-RESETB-asserted.jpg
RC6502a1SBC-LED-1000R-RESETB-asserted.jpg [ 69.99 KiB | Viewed 886 times ]

_________________
Curt J. Sampson - github.com/0cjs
Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 28, 2021 12:07 am 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
cjs wrote:
Just 'cause this reset light sounded like a neat idea, I wired up the same circuit to my RC6502 Apple 1 clone SBC†
So what you want to do there, with that original circuit above, has been shown work. I am guessing that it's something else in your setup.
†Boy am I getting tired of typing all that out. Any suggestions for abbreviations? R6A1CSBC? Yeah, that's perfectly comprehensible.


What is the reset circuit on the A1BEC (apple 1 bus extensible computer? Shrug!).

I had some time to do rework on the board last night (and the IDC connectors came from Mouser! still wish I knew where that first packet went). I placed a new reset LED on the board as originally drawn and it just worked.*

So, the remaining issue is that the board is held low in reset for over six (6!) seconds on initial power up. If this is a DS1813 with the 5% trip point, power needs to get to above 4.62V before coming out of reset. I suppose I should just put CLK, Reset, Sync, and "5V" (at the bus) on my scope and capture from flipping the power switch to watch what RESET is doing?

I can play around with power supplies, but this 5v supply I'm using has been pretty flawless with my last two builds. Though, if I want others to succeed with this board, its probably more efficient to put on a voltage regulator and expect a 9V supply (more common wall worts, it seems?)


* I think I should probably test LEDs when pulling them out of my parts bin, that first one must have been garbage.

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 28, 2021 12:45 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
Individual_Solid wrote:
What is the reset circuit on the A1BEC (apple 1 bus extensible computer? Shrug!).

Ah! I think I'll call it the A1SBC. Close enough, even if it kinda skips over it being both a clone (rather than a replica, despite the name) and an RC6502 system.

Anyway, it uses a standard 555 monostable multivibrator, or one-shot. (Schematic attached.) I was confused earlier about how it held reset low as long as you held the button (i.e., it has a minimum but not a maximum pulse width), but of course that's how a debouncer has to work, doh, as the switch may be bouncing as you hold it.

Attachment:
a1sbc-reset.png
a1sbc-reset.png [ 21.92 KiB | Viewed 839 times ]


Quote:
So, the remaining issue is that the board is held low in reset for over six (6!) seconds on initial power up. If this is a DS1813 with the 5% trip point, power needs to get to above 4.62V before coming out of reset. I suppose I should just put CLK, Reset, Sync, and "5V" (at the bus) on my scope and capture from flipping the power switch to watch what RESET is doing?

I don't think that SYNC will be too helpful there; remember that there's several cycles of general startup and reset vector fetch before the first instruction is fetched. A15 would go up earlier. But the place to start is probably just on all the pins of the DS1813, triggering on its Vcc input rising past 0.5 V or similar, at 1 second time base.

Quote:
I can play around with power supplies, but this 5v supply I'm using has been pretty flawless with my last two builds. Though, if I want others to succeed with this board, its probably more efficient to put on a voltage regulator and expect a 9V supply (more common wall worts, it seems?)

That's pretty darn old-school! An LDO (or even non-LDO) linear regulator on the input was a pretty standard thing back in the 80s when a wall wart was a transformer and rectifier whose nominal 9 V output voltage could vary from 10.5 V unloaded to 7 V when heavily loaded. (Some manufacturers used wall warts with slightly lower nominal voltages, 7 to 8.5 V, presumably to reduce heat.) I have a ton of those myself and use them constantly on old computers, so I power my RC6502 backplane off of one too, but most people these days are far more likely to own a reasonably heavy-duty (1.2 A or higher) USB wall wart, which is plenty enough to power even an NMOS system.

My A1SBC (drawing about 280 mA because NMOS etc.) is actually powered by USB from my PC when not on the bus; the Arduino on it is powered by USB anyway, and there's a jumper to connect the Arduino board's USB power input to the main board's Vcc bus. I've worked on other stand-alone boards with multiple power inputs and regulators (e.g., a digital RGB to analogue RGB converter) and I've found that USB power is by far the most often used outside my workbench (and possibly even on it).

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 29, 2021 12:17 am 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
cjs wrote:

Quote:
So, the remaining issue is that the board is held low in reset for over six (6!) seconds on initial power up. If this is a DS1813 with the 5% trip point, power needs to get to above 4.62V before coming out of reset. I suppose I should just put CLK, Reset, Sync, and "5V" (at the bus) on my scope and capture from flipping the power switch to watch what RESET is doing?

I don't think that SYNC will be too helpful there; remember that there's several cycles of general startup and reset vector fetch before the first instruction is fetched. A15 would go up earlier. But the place to start is probably just on all the pins of the DS1813, triggering on its Vcc input rising past 0.5 V or similar, at 1 second time base.

[...] and I've found that USB power is by far the most often used outside my workbench (and possibly even on it).


I switched to a known good USB power supply and saw pretty much the same behavior. So I will resist trying to design a regulator onto this board until I've looked at the problem a little deeper.

I'm attaching some photos from an oscope trace of turning the board on. Due to the layout, it's not very easy for me to probe the pins directly on the DS1813. So, acknowledging that the SYNC will lag a few cycles behind leaving reset. On the trace, blue is the 5v supply, pink is SYNC, and yellow is RESET. This is all from the same power on, I've just zoomed a bit to show interesting things on the main trace.

Attachment:
DS1Z_QuickPrint1.png
DS1Z_QuickPrint1.png [ 46.06 KiB | Viewed 811 times ]

At a high level. You can see 5v applied, a bunch of noise around the reset coming up, and then finally it makes it and we start syncing.

Attachment:
DS1Z_QuickPrint2.png
DS1Z_QuickPrint2.png [ 49.35 KiB | Viewed 811 times ]

RESET starts to rise a few times but never makes it.

Attachment:
DS1Z_QuickPrint3.png
DS1Z_QuickPrint3.png [ 43.79 KiB | Viewed 811 times ]

Actually, it makes it once...

Attachment:
DS1Z_QuickPrint4.png
DS1Z_QuickPrint4.png [ 42.78 KiB | Viewed 811 times ]

Attachment:
DS1Z_QuickPrint5.png
DS1Z_QuickPrint5.png [ 37.84 KiB | Viewed 811 times ]


This is a DS1813+10 so the typical trip point is 4.35V. It looks like the power source gets up to 5V pretty quickly, and doesn't dip back down.

_________________
https://github.com/Individual-Solid/


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 29, 2021 12:59 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
Well that's just a bit weird. Have you already pulled the reset LED out of the circuit to do this testing? That's the one thing there that's at all unusual. If so, I'd be tempted to lift the DS1813's reset pin and measure it independent of the rest of the circuit to see if there's something else in the circuit making it act weird.

Here's one idea about what might be going on. It's seems as if it would have to have some way to detect that something else on the line is bringing reset low so that it can detect the button press. And it would need to detect further presses and bounces during the 150 ms hold period after the button is released so that it could extend the hold, lest it later release and then a bunch of bounces toggle the reset line. (That's exactly the kind of thing this device is supposed to avoid, right?) So there might be something about that line, perhaps something drawing enough current in some subtle way, that the DS1813 thinks a button is being held down and so is holding things in reset until it's decided that the "button" is done bouncing.

Oh, and it might be useful even in the existing setup to zoom in on the power line 150 ms before /RESET is released to see if there's something going on there (such as very short drops in Vcc voltage) that you can't see at the wide zoom level.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 29, 2021 2:16 am 
Offline
User avatar

Joined: Fri Jun 25, 2021 5:38 am
Posts: 72
Location: Portland, Oregon, USA
cjs wrote:
Well that's just a bit weird. Have you already pulled the reset LED out of the circuit to do this testing? That's the one thing there that's at all unusual. If so, I'd be tempted to lift the DS1813's reset pin and measure it independent of the rest of the circuit to see if there's something else in the circuit making it act weird.


I soldered in a "new" (off my breadboard computer) DS1813, with the intention of using the unclipped leads as easier test points for the scope. I bet you can guess what happened next...

It all works. The leads on the original DS1813 are long enough to be resoldered into another board. Perhaps I damaged it when originally constructing, but I'll give it another try at life. I'd feel pretty unlucky if I had a bad LED and a bad DS1813 on the reset circuit of this build, but crazier things have happened...

In any case, that means this revision has fully come to life. and the LED/Key boards arrived fully assembled from JLC yesterday, so once the 14 pin IDC cables arrive, it'll be time to give that board a test.

_________________
https://github.com/Individual-Solid/


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

All times are UTC


Who is online

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