6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 15, 2024 9:39 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sat Mar 14, 2020 9:14 am 
Offline

Joined: Sat Mar 14, 2020 8:50 am
Posts: 5
Hi.
I want to create a semblance of a simple computer, but I have some questions:
What do I need to buy to start working with a microprocessor?
How do I debug this? Can I use the arduino mega?
Another question about debugging: what is the minimum frequency at which a regular 6502 can work? I heard that at a low frequency of the clock generator it turns off, at a high frequency it is inconvenient to debug.

Thanks for understanding.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 14, 2020 9:52 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
mrjbom wrote:
Hi.
I want to create a semblance of a simple computer, but I have some questions:
What do I need to buy to start working with a microprocessor?

Do you have any knowledge at all about it? There's the 6502 primer which is in 22 logically arranged sections about making your own 6502 computer, indexed at http://wilsonminesco.com/6502primer/ . It doesn't start you totally from zero, but the few expected prerequisites are given on the first page, like that you should understand binary and hex number bases, and basic logic symbols and 74-family logic.

Quote:
How do I debug this?

That's in the 6502 primer also.

Quote:
Can I use the arduino mega?

If you're already familiar with it, it might become useful, but it's not necessary.

Quote:
Another question about debugging: what is the minimum frequency at which a regular 6502 can work? I heard that at a low frequency of the clock generator it turns off

The old NMOS 6502 is not guaranteed to run below 100kHz. It's not that the clock generator turns off, but there are lots of internal registers (besides what's accessible by the programmer) which work kind of like dynamic RAM and lose their charge and forget their data if you don't keep the clock speed up. The CMOS 65c02 is much better in many, many ways, one of them being that you can stop the clock indefinitely without malfunction.

Quote:
at a high frequency it is inconvenient to debug.

Frequency and ease of debugging are not totally related.

_________________
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: Sat Mar 14, 2020 10:36 am 
Offline

Joined: Sat Mar 14, 2020 8:50 am
Posts: 5
Thank you very much for such a detailed answer. I'll read those articles and come back if I have any questions.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 14, 2020 10:39 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1486
Location: Scotland
mrjbom wrote:
Hi.
I want to create a semblance of a simple computer, but I have some questions:
What do I need to buy to start working with a microprocessor?
How do I debug this? Can I use the arduino mega?
Another question about debugging: what is the minimum frequency at which a regular 6502 can work? I heard that at a low frequency of the clock generator it turns off, at a high frequency it is inconvenient to debug.

Thanks for understanding.


There is a wealth of information here and elsewhere, but a very popular site/author right now is Ben Eater.

https://eater.net/6502

He is offering kits and online tutorials and is using an ATmega as a debug aid.

I'd look at that, build it, use it, then if you want to stick with it, come back here and do more 'real' stuff with the 6502.

Good luck, and welcome!

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 14, 2020 5:24 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10979
Location: England
Welcome mrjbom! Garth's primer has a wealth of info, and Ben Eater's project is surely a very good one to follow, but I'd like to mention another resource, which is Grant Searle's simple 6502 project.
http://searle.wales/6502/Simple6502.html

I strongly recommend you start by building something already well-used and tested. The time to design your own system is after you've built a simple one from a trusted design. You'll learn more, and faster, this way.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 14, 2020 6:02 pm 
Offline

Joined: Sat Mar 14, 2020 8:50 am
Posts: 5
To start, I chose SRAM AT28C64(it can work at a frequency of 10-14 MHz?)
Also some clock generator with a frequency of 10-14 MHz and the microprocessor itself, as well as a programmer for SRAM.
Do I need something that acts as an intermediary between the SRAM and the microprocessor?
I will debug using the Arduino Mega.
What else do I need? Do I need DRAM?


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 14, 2020 6:22 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
mrjbom wrote:
To start, I chose SRAM AT28C64(it can work at a frequency of 10-14 MHz?)

The 28Cxx line is EEPROM, not SRAM, and writing to it is much, much slower than reading is. It is not suitable to use as RAM. If you're looking at 70 to 100ns access times, note that on the 65xx processors, this is nowhere near fast enough to run 10-14MHz. The 6502 primer explains.

Quote:
Do I need something that acts as an intermediary between the SRAM and the microprocessor?

No. You can put the memory directly on the 6502's bus with no bus transceivers.

Quote:
What else do I need? Do I need DRAM?

SRAM is much easier to implement than DRAM is, and has become plenty dense and inexpensive for the amounts of RAM you'll be dealing with in a 6502 system. Just use SRAM, not DRAM. Your boot-up code will typically be in EPROM or EEPROM though, not SRAM or DRAM.

The first circuit on the 6502 primer's "circuit potpourri" page at http://wilsonminesco.com/6502primer/potpourri.html shows the simplest entire 6502 computer, with SRAM (E)EPROM, address decoding, clock & reset generators, and one I/O IC (a 6522 VIA), with the possibility of adding lots more I/O ICs with no additional glue logic.

_________________
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: Sat Mar 14, 2020 8:02 pm 
Offline

Joined: Sat Mar 14, 2020 8:50 am
Posts: 5
So I can use at28cXX(can I use more than 64KB?) for source code, but which SRAM should I use(I can store any data in it? can it be more than 64 KB? SRAM is connected not directly, but through something?)
Thank You.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 14, 2020 8:07 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10979
Location: England
Hmm, I'm beginning to think this isn't really about what you need to purchase. It feels like there are big gaps in things you need to know. I'd strongly suggest you read the materials and build a kit.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 14, 2020 8:26 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Ed is right. Now I'm thinking that perhaps you thought the "S" in "SRAM" stands for "serial." No, it's for "static," meaning it can keep its contents without constant refreshing like DRAM (dynamic RAM) needs. (It does need power to remember though, unlike any kind of ROM. The amount of current it requires when not being accessed may however be a tiny fraction of a microamp.) SRAM goes directly on the bus. The kind of memory that cannot go directly on the bus is serial memory, mostly meaning flash which is a type of EEPROM (although there are parallel flash memories too). There's no limit on the size of serial flash you can access there, but note that they're more suitable for file operations, not instant-access scratchpad use. Even there, it's synchronous serial, usually SPI, not asynchronous serial like RS-232. "Synchronous" means there is a separate clock line, and bit transfers are coordinated by that and have minimal timing requirements, unlike RS-232. The 6502 primer has circuits and working sample code for SPI and I²C which are popular synchronous serial protocols. There are thousands of ICs on the market that use these. First get your basic system going though, and then add these later. There's a quick run-down on the various types of memory at the top of page 2 of the 6502 primer, at http://wilsonminesco.com/6502primer/addr_decoding.html .

_________________
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: Sun Mar 15, 2020 5:31 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8489
Location: Midwestern USA
mrjbom wrote:
So I can use at28cXX(can I use more than 64KB?) for source code, but which SRAM should I use(I can store any data in it? can it be more than 64 KB? SRAM is connected not directly, but through something?)
Thank You.

I don't want to be rude, but you are not paying attention to what the others are saying. As Ed suggested, start with a design that is known to work and don't try to develop your own design until you've built a working system and fully understand how it works.

I *STRONGLY* recommend you study Garth's "how to build a computer" primer before asking any more questions.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 15, 2020 8:19 am 
Offline

Joined: Sat Mar 14, 2020 8:50 am
Posts: 5
Ok, thank you.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 6 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: