6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 7:03 am

All times are UTC




Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Thu Apr 12, 2018 7:44 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
CommodoreZ wrote:
Right now I'm selecting matching electrolytic capacitors to sit on each card's power rail to hopefully combat power dips. I'm thinking 47μF caps right now.

There's no need to match them. The bypassing problems is not generally one of too few µF, but rather of inductance in the power and ground connections and in their bypass capacitors. Even .01µF capacitors will do more good than 47µF if you put them all the way down to the board with virtually no exposed lead length, since leads add inductance. Page 9 of the 6502 primer deals with this kind of thing, at http://wilsonminesco.com/6502primer/construction.html . There are lots of helpful links there too.

_________________
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 Apr 12, 2018 7:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
GARTHWILSON wrote:
CommodoreZ wrote:
Right now I'm selecting matching electrolytic capacitors to sit on each card's power rail to hopefully combat power dips. I'm thinking 47μF caps right now.

There's no need to match them. The bypassing problems is not generally one of too few µF, but rather of inductance in the power and ground connections and in their bypass capacitors. Even .01µF capacitors will do more good than 47µF if you put them all the way down to the board with virtually no exposed lead length, since leads add inductance. Page 9 of the 6502 primer deals with this kind of thing, at http://wilsonminesco.com/6502primer/construction.html . There are lots of helpful links there too.

Further to what Garth said, "power dips" are avoidable if the Vcc and Gnd buses are substantial relative to the maximum expected current flow, and you use a well-regulated power source.

Be liberal with your bypass capacitors and keep in mind that what you are bypassing is high frequency stuff, which implies that construction methods are important. A good MLCC at each device, with the leads as short as possible, as advocated by Garth (n.b.: I use 0.1 µF, 50 volt X7R MLCCs in my POC units), will do more for you than a bunch of electrolytics.

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 12, 2018 8:01 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
As my habitual counterpoint, I'll quote from one of my earlier posts:
Quote:
Bear in mind that some people are more cautious than others, and that some people will be quite OK with trying to debug and improve a not totally reliable first effort...

So, when you see people saying "I wouldn't do that" you need to calibrate your own sense of what's worth trying with theirs: they might be more cautious than you, or they might know what is doomed to fail. If their background is industrial product design, you'll probably find that they want a lot of predictability, reliability and margin in whatever they make.

and
Quote:
The other thing to note is that a hobbyist has a different situation than a mass market manufacturer. If you need to ship a million computers and deal with the expense and negative press from getting a thousand returned as faulty, better to design with a safety margin. Likewise if you make medical equipment, better make it reliable. But if you're making one computer, and you'd be happy if it runs for an hour, that's a different situation.

(Several here [...] engineer things for a living, so they do need a safety margin as they have a reputation and a livelihood to protect.)


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 12, 2018 9:58 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Quote:
If their background is industrial product design, you'll probably find that they want a lot of predictability, reliability and margin in whatever they make.

Additionally there the matter of making sure our digital and SMPS circuits don't radiate electrical noise that would interfere with something else, in my case, aircraft radios, and my analog circuits also have to work right in the presence of nearby radars and communications transmitters like on the deck of an aircraft carrier which is extremely hostile with RFI.

The hobbyist is generally not concerned with that though. We have however had the occasional member here looking for help debugging their non-op computer, usually built on solderless breadboards, and they usually think it's a design or hook-up problem when actually the problem is caused by the construction method. As has been said a few times over the years, if you use 1 or 2MHz parts, you can get away with murder. That does not mean you can take 20MHz parts and run them at 1MHz and get away with murder though.

We all started at the bottom, and we all keep learning. Hop on the bus. There's one every five minutes on this route. :D

_________________
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 Apr 13, 2018 10:05 am 
Offline
User avatar

Joined: Mon Apr 09, 2018 11:33 am
Posts: 19
Location: Free Country, USA
Alright, so here is the progress I made today: First, I swapped the 65C02 with one that I tested on a breadboard setup, and have in-fact run BASIC on just to rule out a bad processor. Admittedly I hadn't tested the other one yet, but it was brand new so... didn't think to. It will get the breadboard treatment soon enough.

I built a little diagnostic board to interface with the data bus and avoid all of my complex front panel circuitry for the moment. I put a little socket on there for an LED bar for another test I want to perform. For the NOP test, it was not in place, and those three signal lines were tied to ground.
Attachment:
File comment: Diagnostic board
IMG_20180413_044251452.jpg
IMG_20180413_044251452.jpg [ 2.79 MiB | Viewed 5859 times ]
The stains on there are from my first attempt at making a serial board. No reason to let good protoboard go to waste.

Attachment:
NOP Test.PNG
NOP Test.PNG [ 51.42 KiB | Viewed 5859 times ]
This is pretty cool to see. I turned down the sampling rate to see more of the address bus transitions. It's fun seeing 0xFFFF come and go.

Attachment:
File comment: Test #1
IMG_20180413_050541033.jpg
IMG_20180413_050541033.jpg [ 2.67 MiB | Viewed 5859 times ]
I performed the test with the CPU card sitting where you see it pictured, and again and the other end of the backplane, just to verify the results matched. Sure enough, both locations produce the same results during the NOP test.

Edit: yes, my serial card is connected up during this test. Long story short, I'm leeching the 1.2MHz clock off of that card. Hopefully that isn't ruining everything. But that's a problem to tackle another time.

_________________
The Cactus


Last edited by CommodoreZ on Fri Apr 13, 2018 10:28 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2018 10:14 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
A good result! I hope you agree that this is not too trivial a test... it is but a starting point.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2018 10:53 am 
Offline
User avatar

Joined: Mon Apr 09, 2018 11:33 am
Posts: 19
Location: Free Country, USA
BigEd wrote:
A good result! I hope you agree that this is not too trivial a test... it is but a starting point.

Of course. As Ralph Wiggum once said, "I'm learnding."

Making that little diagnostic card gave me an idea on another way to perform an integration test between the EPROM and address control cards. I'm also looking at the best way to revise the address control card to include buffers for the LEDs. This diagnostic card might become a bit of a permanent resident, doing that job. Right now, the address LED ribbon cables extend the entire bus about a foot, after going through the LED's 1K resistors. Time for buffers, for sure.
Attachment:
IMG_20180306_044813767.jpg
IMG_20180306_044813767.jpg [ 2.49 MiB | Viewed 5855 times ]


I'm starting to see the merits of front panel switches, LEDs, and control logic all co-existing on one circuit board, rather than my piecemeal approach with ribbon cable tendrils.

_________________
The Cactus


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2018 1:30 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
This is an awesome project.

BTW, I love the little cactus drawing on the ROM chip. Nice touch. :-D

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 12:58 pm 
Offline
User avatar

Joined: Mon Apr 09, 2018 11:33 am
Posts: 19
Location: Free Country, USA
I've been making a few improvements.

First off, I decided to throw some 1K terminating resistors on the data and address buses. It got rid of plenty of phantom signals, so I don't know why I didn't try this sooner.
Attachment:
File comment: Card bus closeup
IMG_20180416_054251953.jpg
IMG_20180416_054251953.jpg [ 2.55 MiB | Viewed 5801 times ]


I've updated the debug card to now let me directly control the data and address buses. The address bus LED signals are going through 74245's to avoid having to zigzag back and forth like with '244's.
Attachment:
File comment: Debug Card
IMG_20180414_054330378.jpg
IMG_20180414_054330378.jpg [ 2.94 MiB | Viewed 5801 times ]


While I was at it, I overhauled the Address Control card. Replaced the '244's with '245's to make the wiring easier for my eyes to follow. I also touched up the 5V traces to make sure the chips were all getting power. Tests show that this card is working better than ever! At least something I built works. :lol:
Attachment:
File comment: Address Control Card Rev 2
IMG_20180416_050234131.jpg
IMG_20180416_050234131.jpg [ 2.79 MiB | Viewed 5801 times ]


Let's see, what else have I been doing...
Attachment:
File comment: Front panel energized
IMG_20180416_054242816.jpg
IMG_20180416_054242816.jpg [ 2.17 MiB | Viewed 5801 times ]

I'm running a few EPROM reads and RAM writes using the front panel logic. Since the status control card isn't present to actually perform tasks like telling the address control card to load the front panel switch value, or deposit a value into RAM, I'm having to manually signal those inputs high or low. I get to be the orchestrator. During such tests, I can successfully read and write values from RAM. The individual clear signals don't seem to work incredibly well, but the individual set signals seem to be just fine. I'll have to check over that card next to see what the heck I'm doing wrong.

I burned an EPROM with zeros for the reset vector, and tried entering a program into RAM by hand to see if I could get something to run. Nothing too fancy, but something I know works fine on an OSI-300.
Code:
A2 05 8E 08 00 4C 00 00

The rest of RAM was filled with garbage. The majority of ROM was filled with 0xFF's. I tried letting the CPU run, performing a reset first. I watched the lights to see what was going on, only to see that the CPU was jumping around all over the place, probably running on errant instructions in RAM. A few of my values got clobbered...

So, that leads me to believe that my reset circuitry is perchance causing issues, or I'm misunderstanding how that's supposed to work. I'm using a DS1223 to perform the reset automatically on power-up, but I can also pull the line low and let it pulse low, then high. I get the feeling the machine didn't correctly check the reset vector, but I will look into this next. I also intend to burn another EPROM with some simple routine to see if it can handle that -- not sure what yet.

After that for fun, I hooked up a pulse generator to the clock input, because I can use that to adjust the pulse speed to be relatively low.
https://youtu.be/0onkPg9NOp8

_________________
The Cactus


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 25, 2018 11:36 am 
Offline
User avatar

Joined: Mon Apr 09, 2018 11:33 am
Posts: 19
Location: Free Country, USA
Attachment:
IMG_20180418_014054192.jpg
IMG_20180418_014054192.jpg [ 2.5 MiB | Viewed 5710 times ]
I'm making progress over here, fixing design and construction flaws.

I've got the Memory Protect toggle working now, along with the R/W line indicator (which is mainly useful while depositing bytes into RAM). I've also replaced a handful of the 7400 series chips with the most modern variants I have on hand.
Attachment:
File comment: Status & Data Control Cards
IMG_20180419_052328194.jpg
IMG_20180419_052328194.jpg [ 3 MiB | Viewed 5710 times ]

Seems I had original SN7474's in the data control card, which were experiencing "phantom all-clears" as I call them. Whenever I would press the clear switch for any of the 8 bits on the front panel, 90% of the time, more than one if not all 8 bits would clear themselves from the front panel flip-flops. That kinda defeats the whole purpose of having individual clear switches. Turns out newer chips don't seem to have this problem, which is nice.

As well, my 27128 was jumpered incorrectly, due to a holdover from when I was using a 27256. The result was that I could read from the EPROM maybe... 10% of the time, and would get a garbage result another 10% of the time. The remaining 80% was no response. With that pin held low, I shouldn't have been able to get any reads at all, but that seems to be cleared up now.

After trying a handful of short programs, either entered into RAM, or read back from an EPROM, I'm still getting no evidence of computation occurring. I have come to the conclusion that due to how long the bus traces are, I should add in some 74245 bus transceivers to help the 65C02 drive all the devices it needs to. I thought I wouldn't need them because of the helpful Bus Enable pin, but I'm going to play it safe and revise my processor card either way.

During some of my tests of the single stepping circuitry, I'm noticing voltages feeding the Ready line that I find concerning. They aren't 0 or 5, so I know I have some work to do there. I had just overhauled the card's logic too, to pull the Bus Enable Pin high on either single step or normal clocked operation. For the moment for clocked operation, I'm bypassing this circuitry to pull Ready and Bus Enable high.

I've had alot of trouble getting my logic analyzer to work, and it seems to be causing more interference than helping things right now, which is frustrating. Not to mention, it hasn't been correctly responding to capture-on-trigger events, so I can see what's happening on a reset or anything like that.

I filmed a demonstration of my front panel logic, if you're interested in watching me ramble for a bit, during a moment when things seem to actually be working: https://www.youtube.com/watch?v=3Sv3pIyMBEk

_________________
The Cactus


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 25, 2018 8:43 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
CommodoreZ wrote:
I have come to the conclusion that due to how long the bus traces are, I should add in some 74245 bus transceivers to help the 65C02 drive all the devices it needs to.

The 65Cxx's pin drivers are very strong. This is from the "74xx Logic Families and Timing Margins" section of the 6502 primer:

    You will not need bus transceivers with a CMOS 6502, especially WDC's current production W65C02S. I have done some brief tests on the W65C816S's pin drivers. Their behavior was pretty much symmetrical, able to pull up just as hard as they can pull down, unlike TTL which cannot pull up as hard. If you had to boil my test results down to approximations and treat the circuits as just a resistance, the data pin drivers acted very roughly like a SPDT switch with 50Ω in series with the common terminal (ie, the output); and the address bus pins, as a SPDT switch with 60Ω in series. I have not had the chance to test a W65C02S; but I suspect WDC used the same circuits on the '02 and the '816, which would make it much stronger than the data sheet says. The time constant of 60Ω times the capacitive load of 10 CMOS loads is around 3ns, which is less added delay than you'll get from a bus transceiver IC. Daryl Rictor had no trouble running my 4Mx8 5V 10ns SRAM module on his SBC-4 single-board computer at 12MHz with a barefoot '816 (ie, no bus transceivers), driving this module and three daughter boards at the same time. The module has 8 bussed SRAM ICs.

Related, on the 65c22 VIA, I have tested one I/O pin at a time of Rockwell's R65c22 and the WDC W65C22S outputs here (note the WDC ones having the "S" ending), and they are many times as strong as the data sheet says (and I believe the processor has the same output circuits). In my experiment, WDC's outputs were able to pull to within 0.8V of either rail with a 220-ohm resistor to the opposite rail, meaning a 19mA load, even pulling up, and give 50mA into a dead short. Rockwell's could pull down with 100mA into a dead short, but could not pull up as hard, not being symmetrical like WDC's.

7400 and 74LS logic however cannot pull up high enough to make a valid logic '1' for CMOS though, according to the specifications. Will it work? Usually; but it's not guaranteed to, and this might be one of your problems. I'd say dump the TTL and just go completely with CMOS.

You also have 74AC and 74ACT in the pictures, whose output rise and fall times are too fast for dependable operation with this type of construction with long wires. These long wires do not qualify as transmission lines with controlled impedances and terminated with those impedances. You'll be safer with 74HC and 74HCT.

There's a half dozen helpful related links at the bottom of the 6502 primer's logic-families page linked above. See also the "Construction: Avoiding AC-Performance Problems" section.

_________________
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 Apr 26, 2018 11:16 am 
Offline
User avatar

Joined: Mon Apr 09, 2018 11:33 am
Posts: 19
Location: Free Country, USA
The majority of my stockpile of 7400 series chips are from grab bags, so they're older generation components overall (original, S, LS, F, etc). I ordered a handful of HCT's a few days ago to supplement what I'm already using. I'm going to standardize on HCT parts.

I will hold off on adding the '245s to the CPU card.

I'm amazed at how much of the front panel logic for memory manipulation is actually working. It's still all for naught if the processor can't do its thing.

_________________
The Cactus


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 28, 2018 6:32 am 
Offline
User avatar

Joined: Mon Apr 09, 2018 11:33 am
Posts: 19
Location: Free Country, USA
The first shipment of HCT series parts arrived today, and I swapped out everything that could be replaced. I also discussed the symptoms the Cactus was exhibiting with a friend of mine who sorta follows the project. It came to light that I had some contention on the R/W line from the data control card, preventing the 65C02 from writing to RAM.

So I made a few signal line tweaks, and put the R/W line on a tri-state buffer that would be high-Z while the processor was running and...

I've now run a few simple hand-toggled programs from the front panel.

Attachment:
IMG_20180428_240858219.jpg
IMG_20180428_240858219.jpg [ 1.77 MiB | Viewed 5634 times ]
This is how bad the R/W line was looking after the first set of tweaks. The upper waveform is the R/W output on the 65C02, and the lower waveform is the /WE line on the RAM.

The signal has since been cleaned up due to the subsequent tweaks and modifications. Time to see what else I can get working!

_________________
The Cactus


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 28, 2018 6:50 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Great progress!


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 28, 2018 10:05 am 
Offline
User avatar

Joined: Mon Apr 09, 2018 11:33 am
Posts: 19
Location: Free Country, USA
It gets better!
Attachment:
IMG_20180428_051012075.jpg
IMG_20180428_051012075.jpg [ 2.37 MiB | Viewed 5624 times ]

It took a bit of finagling, but I was able to get the serial card to play nice at TTL levels. The RAM calculation method seems to only detect the first 16K automatically, and you end up in a loop if you let BASIC figure out how much RAM it has on its own. If you tell it 32K is available (yes, I know that's not precisely 32K), then its will let you start entering programs just fine. I tested a few simple BASIC programs, but I know I have some adjustments to make to get RS232 level conversion working.

Attachment:
IMG_20180428_051219684.jpg
IMG_20180428_051219684.jpg [ 2.24 MiB | Viewed 5624 times ]

Would you look at that. Serial & blinkenlights.

_________________
The Cactus


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

All times are UTC


Who is online

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