6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 4:40 pm

All times are UTC




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: My 6502 SBC
PostPosted: Sat Jun 17, 2017 3:33 pm 
Offline
User avatar

Joined: Wed Mar 22, 2017 1:08 pm
Posts: 13
Location: KO04SD
It works! After some time, and with second attempt. First one was classical "I want everything there", which failed.
Image
Image
Image
Image

After soldering most part I found two data lines shorted, and one wire desoldered while I was fixing first bug. After that it was executing the code from ROM; well, this is FLASH chip, but it's read-only here. While accessing the RAM chip it wasn't very happy. I didn't understand it: on the bus I saw (using oscilloscope ofc.) ROM still holding data, and suddenly RAM started talking (RAM's HIGH level is a bit lower). No matter what I did, access to RAM was causing two things to talk at once, showing all kinds of trapezoid lines, and causing CPU to reset after a few cycles. Interrupts were redirected to RESET, 'cause I tested it with ROM only and didn't have RAM to save return address into. It looked very weird. Surprisingly, at higher speeds (5MHz) things were going fine, lower speeds were causing RAM and CPU to to drive the data bus at once, also I/O didn't work.
My Φ2 is generated by 74HC74, and it's going to both CPU and logic, so I connected logic to CPU's Φ2 output. Suddenly everything started working perfectly. I found the error soon: CPU was getting clock shifted by 180°. I guess it was mind eclipse, I do not know how and why did I do it this way. By the way I found that my old MOS6502AD can run at 5.33MHz, until it warms up (5MHz limit then). Not so bad.

Next thing: I had to replace 74HC688 with 74AC521, above 6MHz it didn't work. I have only SMD ones, with 0.65mm leads pitch, so I made this funny looking franken-chip, that fits in a DIP socket. It works.

Some schematics:
Image
Address decoder

Image

Address decoder:
Previous idea was to put only 32K of RAM, 16K of ROM, and to drive all I/Os from address lines. I changed my mind, though, it still could be done that way without much trouble. Also there is easy option to copy ROM to RAM, and switch the RAM in, so I'd have 64KB - 256B of RAM, and 256B for I/O. ROM is selected for reads, RAM for writes, select line is pulled up for now. Maybe I'll change it someday.

What next? I have 640x480 black-and-white LCD (without a driver yet, but there is an idea how to make one), I'll also connect UART to have a serial console. There is a small RS232 text printer laying around, which might be useful too.

Surprisingly ringing isn't an issue, there is some light overshoot and undershoot, but nothing too serious. I guess diodes at inputs of chips clamp that.

Clock generator:
It was designed to divide input clock by any four-bit binary number having at most two bits set, and then by two again (74HC74): 2, 4, 6, 8, 10, 12, 16, 18, 20, 24. 74HC chips used here have trouble getting things right at higher frequencies, and from somewhere between 16MHz and 30MHz they start losing one pulse. By setting divider to 4 with 32MHz input I get 5.33MHz, not 8MHz as it should, so it in fact divides by 6. Higher-speed dividers are: 4, 6, 8, 10, 12, 14, 18, 20, 22 and 26.

Finally, a photo of the machine running some CPU tests. It displays whether CPU is 6502 or 65C02 on TIL311, then continues counting up from 0 to F. Original 74HC688 fitted in:
Image

You might notice that CPU looks funky: Rockwell part with date code 1426. That's another subject.

Credits:
Thank you Garth Wilson for primer and valuable input, BigDumbDinosaur for some ideas, and others. I hope that this is only beginning.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Sat Jun 17, 2017 5:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Nice work! Great to see a working project.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Sun Jun 18, 2017 8:01 pm 
Offline
User avatar

Joined: Sat Jun 17, 2017 9:58 am
Posts: 16
Location: England, United Kingdom
I was just looking at starting a project to learn more how the bbc hangs together, looks like you are very advanced. I would be very interest to see a developer blogs, design notes etc.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Mon Jun 19, 2017 12:09 pm 
Offline

Joined: Tue Apr 11, 2017 1:50 pm
Posts: 7
Location: UK
You know - I wish everyone would throw those rediculous rapberry Pi's in the bin where they belong and go back
to building acorn atoms or BBC's or whatever. at least they'd be learning something that way.
How that scam ever came to fool the charity commission beats me.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Mon Jun 19, 2017 12:22 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Hmm, if you don't like something, that others clearly do like, it's best to remain silent. Otherwise you'll just get a fruitless argument. You'll note that the conversations here on 6502.org are generally good ones: informative, respectful, helpful. I'd like to see it remain that way - other corners of the internet are less civil, and are a good place to go if you like that sort of thing.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Tue Jun 20, 2017 7:09 am 
Offline

Joined: Sun Apr 10, 2011 8:29 am
Posts: 597
Location: Norway/Japan
You can program the Pi on the bare metal, no operating system needed. Lots to learn there. In any case I've also found them incredibly useful for various purposes. As a console interface to my 1987 minicomputer, as a (wi-fi accessible) printer server, as interface to other (e.g. camera) projects. Etc. Sooner or later I'll have all my old computers and SBCs accessible over the net with the help of a Pi3 (or, if I can get my hands on one, PiZero/W). They're useful tools, in addition to what I said above in the first sentence.

(And there's that incredible 6502 emulation on a Pi/Zero too, over at Stardot. Very low-level as far as programming is concerned!)

On topic: Thanks for posting, argonn! Looks great (or looked great, when I read it from home - dropbox links are blocked from my current location, unfortunately. You can attach images directly on this forum if you wish - they'll not "disappear" with time, as happens too often with external sites)


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Tue Jun 20, 2017 6:35 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
I (finally - they kept going out of stock) got my Pi3 on order.

My hope is to use it as a platform to learn SPI interfacing, with the eventual goal to extend some OTS 6502 simulator to talk to the Pi3 GPIO pins and to write a nascent 6502 SPI driver.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Tue Jun 20, 2017 7:40 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
I commend you on your soldering patience. I consider myself pretty good with the soldering iron but my eyes don't allow me to put multiple wires on the same pin unless I have plenty of space around it. Sucks getting old. ;-)

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Wed Jun 21, 2017 3:08 am 
Offline

Joined: Sat Jun 04, 2016 10:22 pm
Posts: 483
Location: Australia
It's a pain in the neck when you're fairly young, too. PLCC sockets are a particular annoyance, because the pins are so closely spaced. I suspect the data bus on my SBC is flaky, and that it's going dodgy in the rat's nest of wires under one of the PLCCs.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Wed Jun 21, 2017 7:58 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
DerTrueForce wrote:
It's a pain in the neck when you're fairly young, too. PLCC sockets are a particular annoyance, because the pins are so closely spaced. I suspect the data bus on my SBC is flaky, and that it's going dodgy in the rat's nest of wires under one of the PLCCs.

Pin spacing in standard PLCC sockets is 100 mils. That's not close, even to me who is partially blind.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Wed Jun 21, 2017 9:28 am 
Offline

Joined: Sat Jun 04, 2016 10:22 pm
Posts: 483
Location: Australia
I know, but with a DIP, you only have single rows. With a PLCC, you get double rows.
That's what causes me the trouble. I have to go over other pins, which forces me to solder them in a certain order. It also got awkward to bring my soldering iron to bear without melting the insulation or bridging the pins, because the wires were so closely spaced. I could have used a PLCC-to-DIP adapter, but I didn't. Maybe I should have.
Of course, this is all completely moot if you're using a PCB. (I'm not, yet)


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Wed Jun 21, 2017 9:38 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Wire-wrap PLCC sockets solve that, although they're expensive and kind of hard to find.

Attachment:
WW_PLCC_44.jpg
WW_PLCC_44.jpg [ 13.3 KiB | Viewed 5912 times ]

_________________
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  
 Post subject: Re: My 6502 SBC
PostPosted: Wed Jun 21, 2017 9:46 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Seconded the point about the double rows. Also, even with glasses on, I can find it a bit tricky to see where the pins are in the presence of lots of shiny pyramids of solder. Perhaps I need new glasses! As we've said before, a magnification arrangement can help a lot, whether desk-mounted or head-mounted.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Wed Jun 21, 2017 12:44 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
BigEd wrote:
Also, even with glasses on, I can find it a bit tricky to see where the pins are in the presence of lots of shiny pyramids of solder.


I have this problem with wire-wrapping. Much more than soldering. Not sure why.

But when I see a lot of wire-wrap pins all over the place, they start to run together and I have trouble individualizing each pin. Even with magnification. I liken it to snow blindness for pins. :-)

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
 Post subject: Re: My 6502 SBC
PostPosted: Wed Jun 21, 2017 5:33 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
DerTrueForce wrote:
I know, but with a DIP, you only have single rows. With a PLCC, you get double rows.
That's what causes me the trouble. I have to go over other pins, which forces me to solder them in a certain order. It also got awkward to bring my soldering iron to bear without melting the insulation or bridging the pins, because the wires were so closely spaced. I could have used a PLCC-to-DIP adapter, but I didn't. Maybe I should have.
Of course, this is all completely moot if you're using a PCB. (I'm not, yet)

When I solder PLCC sockets I use a soldering iron tip whose end I have ground flat. I press the tip to the end of the pin only and let the pin propagate the heat.

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


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

All times are UTC


Who is online

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