6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 2:42 pm

All times are UTC




Post new topic Reply to topic  [ 176 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 12  Next
Author Message
PostPosted: Mon Jan 20, 2020 10:49 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Thanks! I think that might help...


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 21, 2020 10:39 pm 
Offline
User avatar

Joined: Mon Nov 04, 2019 4:53 pm
Posts: 103
Location: Spain
Here is the registers card. It's missing some ICs that are still on the way, but otherwise its complete. Wiring is fiddly, but it can be done, and not having to flip the board over helps a great deal. Power and LEDs are wired on the underside though. Debugging is going to be a nightmare...
Juan


Attachments:
Registers card bottom.jpeg
Registers card bottom.jpeg [ 391.95 KiB | Viewed 4078 times ]
Registers card top.jpeg
Registers card top.jpeg [ 302.06 KiB | Viewed 4078 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 26, 2020 7:11 pm 
Offline
User avatar

Joined: Mon Nov 04, 2019 4:53 pm
Posts: 103
Location: Spain
Some updates:
A couple orders arrived, so now I have (or so I think) all ICs I need. I finished populating the registers card and made a little test card that plugs into the control ROM sockets. This lets me manipulate control signals to try out various functionality. Also added a couple RS latches that serve as a de-bounced clock.
After some testing and probing a couple of signals with the 'scope, I can say this card works as designed.

The ALU card is also done. This is the most complicated one, quite a lot of wiring in a pretty tight space. I ended up using a colour code for the flags instead of the data bus, as their routing was more complex. Luckily enough, I made no mistakes on the wiring (I buzzed out every single connection) and after some preliminary testing seems to be doing the business.

Also found out that the EEPROMS I purchased from eBay were used (no surprise here though), they didn't even bother erasing them. And what's worse, two out of the ten I bought were faulty, so I've got to buy some more. Given what I paid, not a bad deal anyway.

Next on the list: Interface card
Juan


Attachments:
ALU_test.jpeg
ALU_test.jpeg [ 404.92 KiB | Viewed 4038 times ]
Registers_Test.jpeg
Registers_Test.jpeg [ 209.2 KiB | Viewed 4038 times ]
Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 31, 2020 11:08 pm 
Offline
User avatar

Joined: Mon Nov 04, 2019 4:53 pm
Posts: 103
Location: Spain
More updates:

Interface card wired up and tested. I've completed all cards and programmed the control ROMs.
Also made a backplane to connect all cards together.
While it did put up a fight, I finally got it working to the extent that I can test without RAM and ROM. I've tried the reset sequence and instructions with implied operands like NOP, ROR, ROL, INX, DEX and such and so far all of them work. Program counter seems to keep counting properly up to a Mhz or so. I'll make some proper measurement to determine maximum clock speed.

Problems I faced:
-Control ROMS on wrong sockets...
-A couple intermittent solder joints.
-Forgetting about settling time of ROM outputs (luckily nothing a latch couldn't solve).

I got some more EEPROMS on the mail today, so I will start building a memory card so I can test it further. We'll see if I can run the Klaus test on it.
Juan


Attachments:
CPU_cards.jpeg
CPU_cards.jpeg [ 320.66 KiB | Viewed 4000 times ]
CPU_working.jpeg
CPU_working.jpeg [ 275.61 KiB | Viewed 4000 times ]
Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 31, 2020 11:40 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Looks great, Juan! And impressively rapid progress, IMO. Best of luck with the work to come! :)

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 01, 2020 2:08 pm 
Offline
User avatar

Joined: Mon Nov 04, 2019 4:53 pm
Posts: 103
Location: Spain
Thanks! To be fair, holidays between semesters help a great deal towards making progress :D.
While a frame to keep the cards straight gets printed, I have now to decide on the memory map and such. I think I'm going with:

$0000-$7FFF RAM
$8000-$BFFF To be determined
$C000-$FFFF ROM

I think I'll try to keep some similarity with the VIC-20 on this respect.
As a display, I'm going to use a 40x4 LCD, but one step at a time.
Juan


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 03, 2020 10:28 am 
Offline
User avatar

Joined: Mon Nov 04, 2019 4:53 pm
Posts: 103
Location: Spain
I've made an initial schematic for the memory card, which also carries clock and reset.
I'm using a 555 timer for slow (7-1000 hz) clock, and to single cycle, and an oscillator can as a fast clock.
Reset circuit and address decoding are from Garth's 6502 primer.

Memory and future peripherals will go on a separate bay so to speak, and I'm bringing all 40 pins from the CPU using an IDE ribbon cable into the first card and then into the backplane. I'm not planning to ever go beyond 1 Mhz and I can even divide it down to 500 KHz if the need arises. So I think it should be ok.
Juan


Attachments:
Memory card.pdf [160.59 KiB]
Downloaded 81 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 04, 2020 3:51 pm 
Offline
User avatar

Joined: Mon Nov 04, 2019 4:53 pm
Posts: 103
Location: Spain
So the fun begins...

I have made the memory card, and it seems to read from ROM fine. But I'm experiencing some glitches that I'm unable to fix.
In particular, a 74HC377 octal flip flop sometimes changing state just after a falling edge of the clock. Attached is a scope screenshot (I know my probing could be better). Shown are: Enable (yellow), Clock (light blue), and one of the outputs (dark blue).

Enable is coming straight from a ROM and thus the pulse when the ROM's address changes after the falling edge of the clock.
I checked solder joints and sockets, tested the IC on my EEPROM programmer, tried a different IC, but no luck.
It may be due to power distribution (using quite long leads from the power supply at the moment), so I added 100 uF electrolytics to each of the cards, but the glitch still occurs.
Any ideas?
Juan


Attachments:
74HC377_strange_behaviour2.png
74HC377_strange_behaviour2.png [ 38.23 KiB | Viewed 3912 times ]
74HC377_strange_behaviour.png
74HC377_strange_behaviour.png [ 38.69 KiB | Viewed 3914 times ]
Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 04, 2020 4:15 pm 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1431
To me, the clock signal doesn't look clean, there is some ringing.
That spike in the signal ca. 150ns after the falling edge might be big enough to trigger the 74HC377 as a 'rising edge' event.
74HC377 input pins would interpret more than ca. 2.5V as a logic HIGH when the 74HC377 is running with a 5V supply.

Maybe the GND distribution in the design isn't too good...
//But of course: what you see on the screen also depends on how\where you had connected the GND clip of the 'scope to your PCB's GND.

To get rid of that spike at the 74HC377 clock input:

0) Check what happens, when soldering a 47pF ceramic capacitor or such between the 74HC377 clock input and GND.

1) If this fixes the problem for this particular 74HC377, remove that capacitor and try inserting a 470 Ohm resistor or such close to the 74HC377 into the CLK signal.
//So the resistor plus the 74HC377 input pin capacitance would form a low pass filter.

2) If inserting that resistor works for this particular 74HC377, inserting resistors into the CLK signal close to all of the 74HC377 chips might be an option.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 04, 2020 6:35 pm 
Offline
User avatar

Joined: Mon Nov 04, 2019 4:53 pm
Posts: 103
Location: Spain
Thanks for the tips.

The capacitor seems to have little effect, but inserting a resistor in the clock line makes the glitch less frequent.
I'm connecting the ground lead to the GND pin of the IC in question.

I am inclined to think that noise from the ROM outputs (the enable) while they stabilize provokes noise on the clock. Clock sometimes looks pretty clean, but has more ringing when ROM outputs change, so maybe I can try low pass filtering control signals.

I don't think ground distribution is good enough. Ground and power are routed on the underside using wire wrapping wire (see photos some posts above). Maybe I should re-do it with thicker wire.
Juan


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 04, 2020 11:42 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
JuanGg wrote:
I don't think ground distribution is good enough. Ground and power are routed on the underside using wire wrapping wire (see photos some posts above).
Ground distribution is worth reviewing, especially in regard to a project that's acting "funny." But is this (below) the photo you're referring to? The red and black wires don't look like wire-wrap wires, but the colors suggest they are for power and ground.

Recently, ground distribution was discussed in this thread -- it's worth reading. If your black wires are the ground wires then I recommend you add more north-south connections (and also several more paths to the edge connector).

The location and interconnectedness of the ground wires is a lot more important than their thickness. :!:

-- Jeff

I wrote:
I suggest you create a grid of ground connections. Probably the easiest way to do this is to have a series of north-south ground traces spaced out on one side of the board and likewise a series of east-west ground traces on the other side... with (this is important) a via at every intersection point, so E-W lines connect to N-S lines at every opportunity


Attachments:
thumbnail.jpg
thumbnail.jpg [ 51.49 KiB | Viewed 3876 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2020 12:01 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
I'll support and add to what Dr. Jefyll said.  Wire size has very little effect on inductance.  You can use the wire inductance calculator at http://www.eeweb.com/toolbox/wire-inductance .  An inch of 30 AWG wire (WW wire) has 26.7nH of inductance.  The same length of 12 AWG wire has 16.2nH.  IOW, going to eight times the diameter and 64 times the cross-sectional area only reduced the inductance by about 39%.

If what I think I'm seeing in the picture is correct, ICs near the middle of the board have a super long ground-return connection to ICs immediately above or below them.  Do his grid idea by adding power and ground connections vertically too, not just horizontally.

_________________
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: Wed Feb 05, 2020 12:08 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
JuanGg wrote:
I'm using a 555 timer for slow (7-1000 hz) clock, and to single cycle, and an oscillator can as a fast clock.

The 555's output has a relatively slow transition time between logic states. It may be slow enough to violate the ns/volt rating of some of your silicon, with undefined results.

Dr Jefyll wrote:
Ground distribution is worth reviewing, especially in regard to a project that's acting "funny."

Indeed. I'm suspecting there is a fair amount of ground bounce going on, which might explain some of the erratic waveforms being seen.

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2020 12:39 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
GARTHWILSON wrote:
If what I think I'm seeing in the picture is correct, ICs near the middle of the board have a super long ground-return connection to ICs immediately above or below them. Do his grid idea by adding power and ground connections vertically too, not just horizontally.[/color]

I'm avidly following all the ground return information in the various threads here. This looks like a particularly interesting example due to the build technique, with (more or less) the power/ground wired on one side and everything else on the other.

So in such a situation, and with such a grid-like layout of ICs, it would make sense to wire together all the ground pins of all the ICs in a horizontal row (as he does), and also wire together all of the ground pins of all the ICs in each vertical column, too, right? In other words, every IC's ground pin gets wired directly to the the ground pin of the four ICs adjacent to it, side to side and above and below?

And then wouldn't you want to do the same for Vcc as well, because when an IC is pulling a signal low it's sinking current that must return to the source via the Vcc lines? Or am I confused about that somehow?

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2020 2:06 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
cjs wrote:
So in such a situation, and with such a grid-like layout of ICs, it would make sense to wire together all the ground pins of all the ICs in a horizontal row (as he does), and also wire together all of the ground pins of all the ICs in each vertical column, too, right? In other words, every IC's ground pin gets wired directly to the the ground pin of the four ICs adjacent to it, side to side and above and below?

And then wouldn't you want to do the same for Vcc as well, because when an IC is pulling a signal low it's sinking current that must return to the source via the Vcc lines? Or am I confused about that somehow?

Right.  Doing the .1uF capacitors across each IC will help too, making the Vcc grid somewhat less critical than the ground grid, but still very helpful.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 176 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 12  Next

All times are UTC


Who is online

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