6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 07, 2024 9:57 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Nov 29, 2014 12:37 am 
Offline

Joined: Sat Nov 29, 2014 12:22 am
Posts: 8
Hi all,
first post here :)

I have a 6502 taken out from a Commodore 1541 disk drive. I'd like to see if it still works, so I thought I could use an Arduino DUE and its many digital I/O pins to make a very basic virtual ram/rom/IO around a real 6502.

One of the first issues is about supply voltage: I realized the Due CPU (Atmel SAM3X8E) runs at 3.3V, while the 6502 runs typically at 5V.
Reading the datasheet it looks like I can use for 6502 any voltage between -0.7V(?) and 5V: so is it OK to power it at 3.3V?
I've read that the maximum frequency depends on the supply voltage; I'd like to use the lowest reliable frequency (500-750kHz if I'm not wrong), would that be acceptale?

Thanks in advance!
Enrico


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 1:17 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8432
Location: Southern California
WDC's 65c02 will run down to 1.2V or less; but the old NMOS 6502 you got out of a Commodore disc drive is only spec'ed for 4.75-5.25V. The negative voltage you mention is part of the absolute maximum safe voltages beyond which you may damage the part. It is not part of the operating specifications. 3.3V is plenty for a logic-high input voltage for the NMOS 6502, and its outputs might not be much above that, so the Arduino might be fine for I/O, even with the power supply at 4.75V. If you decide you want to build yourself a 6502 computer, check out my 6502 primer at http://wilsonminesco.com/6502primer/index.html. The site has a load of other 6502 info also, as does this 6502.org site and those of a few others of the members.

_________________
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 Nov 29, 2014 3:20 am 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
It would probably be easier to use a voltage level converter. You could also just use regular transistors if you don't mind the extra room and wiring.


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 3:33 am 
Offline

Joined: Sun Jul 28, 2013 12:59 am
Posts: 235
Do I recall correctly that, being an NMOS 6502, there's a minimum operating frequency before the DRAM used for registers and whatnot ceases to hold a charge reliably? This would be something to keep in mind if you're going to be trying to single-cycle one under the control of another system.


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 4:52 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8432
Location: Southern California
Quote:
Do I recall correctly that, being an NMOS 6502, there's a minimum operating frequency before the DRAM used for registers and whatnot ceases to hold a charge reliably? This would be something to keep in mind if you're going to be trying to single-cycle one under the control of another system.

The NMOS 6502 should not be run below 100kHz. The CMOS 6502 can be stopped without losing anything. WDC 65c02's can be stopped in either phase. Rockwell and others can only be stopped with phase 2 high, not low.

Quote:
It would probably be easier to use a voltage level converter. You could also just use regular transistors if you don't mind the extra room and wiring.

Data has to be bidirectional though, making more of a challenge. Address and control lines don't need to be bidirectional. If you need it for one direction only, a single transistor with a base resistor plus 20pF or 47pF shunt capacitor, and a pull-up resistor on the collector, would be ok for slow work, and might do ok even for almost-normal speed for a 1MHz processor; but the bus capacitance and passive pull-up is why I²C is limited to 1MHz max, and usually 400kHz. I discuss minor logic-voltage-conversion issues at http://wilsonminesco.com/6502primer/pot ... HI_V_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 Nov 29, 2014 12:22 pm 
Offline

Joined: Sat Nov 29, 2014 12:22 am
Posts: 8
Thanks for all the answers!
Reading the SAM3X8E datasheet it specifies 4.0V as maximum voltage on input pins. 6502's logic high output voltage is 2.0V minimum, with no defined maximum.
So we can say that a 6502 and the Due can't be connected directly, or the Due will be damaged :(

What about using a bunch of level shifters like https://www.sparkfun.com/products/12009 ? They already have transistor and resistors built in. Of course I'll need a bit of breadboard space for them...

Another solution would be using a pair of MCP23S17 (breakout board http://www.mikroe.com/click/expand/), connected to Due with an SPI bus up to 10MHz, but then things may get complicated... better to build a simple NOP test circuit first!

Regards, Enrico


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 2:32 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
Quote:
What about using a bunch of level shifters like https://www.sparkfun.com/products/12009 ?
Those should work. You can also find boards like that with more than 4 lines. If you don't want to use boards like that, there are chips that convert 8 lines (like ADG33), but all the ones I have seen are SMD.

The 74HC245 could also work but unlike the above solutions, it does not automatically detect the direction (although it is cheap and comes in DIP). You have to control the direction pin yourself.
@GARTHWILSON, wouldn't the R/W pin be enough to control the 74HC245 direction?

Quote:
Another solution would be using a pair of MCP23S17
I used that chip myself for my 6502 project and they are really handy. How are you planning on doing level conversion with them though? They are basically just an input and output shift register in one chip. Also, they come in DIP so I don't know why you would buy the breakout board they are selling.


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 29, 2014 6:15 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8432
Location: Southern California
ris8_allo_zen0 wrote:
Reading the SAM3X8E datasheet it specifies 4.0V as maximum voltage on input pins. 6502's logic high output voltage is 2.0V minimum, with no defined maximum.
So we can say that a 6502 and the Due can't be connected directly, or the Due will be damaged :(

The 2.0V minimum logic-high output voltage is guaranteeing that the output will be at least that high with the amount of specified load current. NMOS won't pull up past 4V though, so you're probably in luck. CMOS will pull all the way up to the rail with a negligible load, and the CMOS outputs are much stronger too (and much, much stronger than the data sheet says, according to my experiments).

Quote:
What about using a bunch of level shifters like https://www.sparkfun.com/products/12009 ? They already have transistor and resistors built in. Of course I'll need a bit of breadboard space for them...

They look interesting. I'll want to look into their speed when I get time.

Quote:
better to build a simple NOP test circuit first!

Instead of using NOP ($EA), I might prefer to use LDA#$A9 (A9, A9) instead, as the latter takes one clock per address rather than two like EA does.

Quote:
@GARTHWILSON, wouldn't the R/W pin be enough to control the 74HC245 direction?

Yes.

_________________
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  [ 8 posts ] 

All times are UTC


Who is online

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