6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 8:35 pm

All times are UTC




Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Tue Sep 08, 2015 7:03 pm 
Offline

Joined: Wed Sep 02, 2015 7:28 pm
Posts: 63
Hi there.
I've been reading this forum, but first time posting.
Was wondering if I could get some advice from you guys before I set fire at my apartment :)

I know some programming (python, c++, javascript, c#) and recently got into electronics because I wanted to make my own 6502 computer.
Bought some electronic kits, learned some basics like flip flips, latches, logic gates, 7400 series, arduino, etc.
I also did some simple assembly code on virtual 6502 to learn and make games.
I've been forcing myself to learn as much as I can before I try the 6502, but I really want to get my hands dirty :D

Wanted to ask a few questions before I buy some ICs at mouser.
I'm planing to buy a 65c02, 65c21, 65c22, 65c55, ram and eeprom

I'm planing to buy 32k sram, but variety of options/prices at mouser confuses me.
They range from $17 to $70 :0
What organization should I get? 2kx16 or 4kx8? does it matter?
(EDIT: I've been looking around and I guess it's 2kx16 since 6502 has a 16bit address bus, right?)
Should I go for 64k instead?

I would rather go with eeprom than eprom (dont want to get uv eraser and burner)
Found this eeprom and was wondering if it's worthy:
http://www.mouser.com/ProductDetail/Mic ... noRsYzg%3d
Seems fast, 2.5 to 5v, 4kx8

I was also wondering what's the best way for a beginner to play with video/graphics.
Should I get a propeller chip? I would love to try a MSN9918 or V9958, but I think its way beyond my current knowledge :D

Should I get a 1, 2 or 10 MHz crystal? maybe 1MHz to start?
I have a 20Mhz crystal, could use a few d flipflops to lowers it. Bad idea?

I pretty much wanted to ask whats a good list of parts that a beginner should get to play around.
Thanks for your help and sorry if my question sound too vague/redundant


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 08, 2015 8:36 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
First, welcome to our little world. Second, before buying anything, I would strongly suggest looking at some existing projects by members here and check out some of the resources that several members have made available. In particular:

Garth's site: wilsonminesco.com
Daryl's site: sbc.rictor.org
BDD's site: sbc.bcstechnology.net

All have some great information and could possibly give you some ideas. There are many others as well, but these area great start. The chip referenced is a serial EEPROM, so you'll need additional hardware and software to use it with a classic 6502 system (newer CMOS parts are the only way to go these days).

As a frequent Mouser buyer, here's my own feedback:

74HC logic is the way to go... forget crystals, use a can oscillator for the CPU clock. I use the Atmel EEPROMs in both 8KB and 32KB along with Alliance SRAM in 32KB. WDC parts are readily available at Mouser but note that the current run of W65C51 chips have a defect which makes using them a bit of pain as no existing code will run them for transmit. Go to 65xx.com and look at the current chips, datasheets and even their new SXBs before doing much else.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 08, 2015 9:26 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Welcome!

To add to floobydust's fine post:

beholder wrote:
Wanted to ask a few questions before I buy some ICs at mouser.
I'm planing to buy a 65c02, 65c21, 65c22, 65c55, ram and eeprom

The 65c22 is quite a bit better than the '21, so unless you have a software investment to protect on the '21, I would recommend just using the '22. The ACIA is the '51. I don't think there ever was a '55.

Quote:
I'm planing to buy 32k sram, but variety of options/prices at mouser confuses me.
They range from $17 to $70 :0
What organization should I get? 2kx16 or 4kx8? does it matter?
(EDIT: I've been looking around and I guess it's 2kx16 since 6502 has a 16bit address bus, right?)
Should I go for 64k instead?

RAM and ROM will have 8-bit data buses. The number of address bits depends on the size of the memory; for example, a 32Kx8 SRAM or ROM will have 15 address bits, and an 8Kx8 will have 13. Beginners don't usually need much memory space; but memory is so cheap now you might as well go for 16KB of RAM and 32KB of ROM, or vice-versa, rather that 2KB or 4KB.

Quote:
I would rather go with eeprom than eprom (dont want to get uv eraser and burner)

Even if you use EEPROM and the system can program it itself, you will need some way of getting the initial boot-up code into it before the computer has ever run. You could make a programmer, borrow a friend's, or buy. I made my first EPROM programmer, but since it was not computer-controlled, it was extremely slow and prone to human error. To erase, I put EPROMs in the sun for a week (while using other ones). This was 1985. Obviously not ideal. Then a friend helped me out with a programmer he made that was controlled by a commercially made computer he had.

Quote:
Found this eeprom and was wondering if it's worthy:
http://www.mouser.com/ProductDetail/Mic ... noRsYzg%3d
Seems fast, 2.5 to 5v, 4kx8

That's a serial EEPROM, not suitable for the parallel bus of the microprocessor nor for the fast, random accesses you'll need. You can interface that one through a 65c22 after you have other code working.

Quote:
Should I get a 1, 2 or 10 MHz crystal? maybe 1MHz to start?
I have a 20Mhz crystal, could use a few d flipflops to lowers it. Bad idea?

The beginner probably won't need much speed at first, and 1 or 2MHz is very forgiving of poor construction and timing issues. Like fd said though, don't bother with a crystal. Just use an oscillator can.

Quote:
I pretty much wanted to ask whats a good list of parts that a beginner should get to play around.
Thanks for your help and sorry if my question sound too vague/redundant

The first diagram on the circuit potpourri page of my 6502 primer is a complete diagram of a very basic 65c02 computer. I don't give distributors' actual part numbers, but you can see what generic parts are there.

_________________
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: Tue Sep 08, 2015 10:32 pm 
Offline

Joined: Mon Aug 05, 2013 10:43 pm
Posts: 258
Location: Southampton, UK
My advice would be to copy an simple, existing design exactly, and get to grips with laying it out on breadboard. There is no shame in copying, so long as you understand how it works. You can then get it working, see it doing stuff, and then change it to "prove" that you understand it.

You can do amazing things with just a few components. A sensible starting point would be:

:arrow: 65c02
:arrow: 28C256 32KB EEPROM (Atmel (AT28C256) make good ones)
:arrow: 6C62256 32KB SRAM (Aliance (AS6C62256) make good ones)
:arrow: 65C22 VIA
:arrow: Some LEDs and buttons to attach to the VIA
:arrow: Reset button
:arrow: Some 74HC glue logic
:arrow: A can oscillator to drive it all

I suggest also obtaining a cheap logic probe and a multimeter. And you will need to power the breadboard computer. I still use a USB charger for my own home built micros. 5V and 1A is plenty. There are USB to breadboard adapter boards around, or you can hack something together if you have a soldering iron.

When you have made the LEDs flash etc you can move onto more complex stuff, like a UART, and have that output text, then read in text, etc.

As Garth pointed out, you will need a way to load your code into the EEPROM. I suggest you buy a ready to use programmer, making sure it supports the EEPROMs you want to use. They are not that expensive, and should serve you many years.

Good luck. :) Let us know how you get on!

_________________
8 bit fun and games: https://www.aslak.net/


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 08, 2015 11:42 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Besides the good advice you've already received, might I suggest reading Grant's 6502 site:

http://searle.hostei.com/grant/6502/Simple6502.html

It's also interesting to compare that design against his Z80 and 6089 designs.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 2:07 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8491
Location: Midwestern USA
beholder wrote:
Was wondering if I could get some advice from you guys before I set fire at my apartment :)

Welcome to our 6502 world.

The other guys pretty much covered your questions. I'll offer only one bit of advice: learn how to fly a single-engine airplane before attempting to pilot a jumbo jet. In other words, start off with a minimal system and then build on that experience. If you get too ambitious you'll never get 'er done.

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 7:19 am 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Hello and also a warm welcome from me. You're saying that you've played with an Arduino. If you want to program the Atmel (or any other) 28C64 or 28C256 EEPROM you can take a look at my little project: http://www.ichbinzustaendig.de/dev/meeprommer-en. You don't need the PCB for the shield, it works also by connecting everything on a breadboard.

I'm currently waiting for the PCB of my first SBC to arrive, so I now the steps you will take to get a 6502 computer running. For me the most important thing I've learned is: make small steps.
Start with a low chip count, don't plan a feature monster. Maybe start with a "free run", then add a ROM to execute the first code, build or buy some tools to visualize that everything is working as expected. A logic probe, logic analyser, an oscilloscope. If you have already an Arduino you can check the several projects that use an Arduino as base for such tools.

Starting on a breadboard is a good option to build your first circuits. You can easy change things.

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 9:39 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Welcome from me as well, and from one beginner to another, let me add my voice to the suggestions that you start as simple as possible. Getting something to work on the breadboard, regardless of how primitive it is, will give you the motivation for more complex long-term work (as well a the Mother of Dragons, I actually just built a friggin' computer! rush).


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 4:00 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
I built Mario's EEPROM burner and it works great. Here's a video of an early breadboard version:

https://www.youtube.com/watch?v=XnTPDfEHkMU

I later transferred it to perf board and I'm planning to extend it to other sorts of EEPROMs.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 7:00 pm 
Offline

Joined: Wed Sep 02, 2015 7:28 pm
Posts: 63
Thanks guys for the warm welcome and help!

Sorry, I meant crystal oscillator (the metal can one) and 6551, not 6555. My bad :)

I've seen quite a few videos and the 6502.org projects, but I always have the feeling that it's way too advanced for me.
I will definitely take small baby steps. A blinking LED sounds like a great way to start.

I did read the 6502 primer! I never went all the way to the end because it gets past what I currently know, so I never saw the basic 6502 schematic.
That's a fantastic schematic to start! 6502, VIA, ram and eprom sounds doable for my level :)

I already have many components, quite a few 74HC, multimeter and an arduino. will look into getting a logic probe and eeprom programmer.
My electronic kit comes with a 7805 +5v Regulator. Do you think that's enough? should I get a more complex 5v supply?
Will definitely look at the arduino eeprom programmer! That sounds great (and good to my wallet)!

I found this tutorial a while back on how to make a simple 6502 tests:
http://mysite.du.edu/~jcalvert/tech/6504.htm
Looks like a nice simple way to start testing the 6502.

Got a 65c02, 65c22, AT28C256, Alliance 62256, 1MHz can oscillator on my mouser shopping cart for starters.
Will do some more reading and look at the projects and get myself more acquainted with the 6502.

Forgot how I got bit by the 6502 bug, but I guess it was by seeing some homebuilt 8bit computers on youtube.
I knew the NES and C64 used 6502 variants. Found some virtual 6502 on the web and made simple assembly programs for fun.
Now I want to make a real one! Won't stop until I have it :D

Again, thank you so much for the nice welcome! Really nice to see you guys posting tons of helpful information.
Will post any updates/progress with my 6502 experience and keep my newbie questions to a bare minimum (only when I cant find answers).
Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 7:14 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8491
Location: Midwestern USA
beholder wrote:
My electronic kit comes with a 7805 +5v Regulator. Do you think that's enough? should I get a more complex 5v supply?

A 7805 is more than sufficient to power your system. Give it about 9 volts DC input (a wall wart works well for this purpose) and you'll be good to go.

Quote:
I found this tutorial a while back on how to make a simple 6502 tests:
http://mysite.du.edu/~jcalvert/tech/6504.htm
Looks like a nice simple way to start testing the 6502.

The 6504 was an oddity and lacked a full address bus. I wouldn't give that article too much thought (also, the author incorrectly refers to MOS Technology as "MOSTEK").

Garth's tutorial on building a basic 6502 system has just about everything you need to get started. Also, there are lots of forum discussions on construction techniques, interfacing to the outside world, etc. Don't hesitate to ask questions here. We never hesitate to offer answers and opinions. :lol:

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 8:09 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10981
Location: England
beholder, I should add my own belated welcome!

BDD, you are of course right about the MOSTEK mistake, but as it's one I've made myself, I'm willing to forgive it. You'll note that the author does allow for the use of a 6502 as an alternate, so it would be petty to dismiss the article or author for picking the 6504. If I had a 6504 to hand I'm sure I'd regard it as a reasonable CPU to use for a minimal machine. Perhaps you would too - I'm sure you're in favour of using the right tool for the job.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 10, 2015 12:56 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Hi beholder

Welcome to the forum :).

Everyone else has already given lots of very good advice so I haven't got much to add, however I might suggest building Garth's single instruction stepper to help diag your circuit. I still find mine invaluable.
The circuit plugs in place of your crystal oscillator circuit and has a button it. Every time you press a button, it clocks the 6502 forward by instruction and stops. You can then measure the buses, etc. at your leisure to see that everything looks ok.
The circuit can be found here: http://wilsonminesco.com/6502primer/ClkGen.html
It's the 5th circuit digram down and mentions "Push Button"


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 14, 2015 6:46 am 
Offline

Joined: Wed Sep 02, 2015 7:28 pm
Posts: 63
Thanks guys for more warm welcomes :)

After reading Garth's 6502 primer I felt more confident and just order everything from mouser :D
Will do the potpourri schematic and go from there.

Got a 65c02
Atmel AT28C256 32KB EEPROM
Aliance AS6C62256 32KB SRAM
65C22 VIA
Some 74HC ics from the schematic and I/O examples
1MHz can oscillator
resistors, capacitors and diode from the schematic

I already got some 74HC logic ics, LEDs, multimeter, buttons etc to help me.
Will use Mario's arduino EEPROM burner :)
Found some Arduino oscilloscope project on the web. Was wondering if anyone used one before?
Will start with blinking LEDs and then go from there and see how far can I go.
Will look more into getting a logic probe. Saw a kit for $9 at mouser but wasn't sure if it works ok.

Quick question, I couldn't find C2 and C1 on schematic. I read over and over, but not sure if my eyes are deceiving me.
Also, C8 to C11 are .1uF right? just double checking :D

Will also add the single instruction stepper. Found those super important when playing with virtual 6502 a while ago.

Can't wait to play around with the 6502.
Will keep you guys posted and if everything works will make some videos :)
Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 14, 2015 7:10 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
beholder wrote:
Quick question, I couldn't find C2 and C1 on schematic. I read over and over, but not sure if my eyes are deceiving me.

C1 is the first component to the right of the reset button.
I don't see a C2 or a C3. I don't remember why they're not there. It could be that I changed my mind on something and didn't want to take the time to re-number the rest of the capacitors.

Quote:
Also, C8 to C11 are .1uF right? just double checking :D

Yep, that's what it says. The exact value is not critical though.

_________________
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  [ 34 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: drogon and 5 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: