6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 10:00 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Jan 19, 2013 10:30 pm 
Offline

Joined: Sat Jan 19, 2013 10:20 pm
Posts: 4
Hey guys, please excuse my noob-ness.

I am just getting around to playing with my 65c02 and I am going to attempt to make my 65c02 perform a bunch of NOPs just to see if it's working.

Instead of using a separate oscillator and random components for various tasks I'm using an attiny24 microcontroller. I like the idea of mating old 8 bit tech and newer stuff. It's just fun experimenting for me ;)

Question: For reset I have created a small program that will software debounce a button, the RESB pin on my 65c02 is attached to a pin on the attiny that will be held to ground for 80us when the button is pressed. Avoiding the need for extra stuff on my board. Can I simply hook the attiny24 pin (that I is sending the reset pulse) right up to the RESB pin on the 65c02 without any resistor? I am a bit unsure if there will be too much current... I want to make sure I don't fry anything!

Also, I am using the attiny to provide a 1Mhz clock (with an 8mhz external crystal) on the uC's CLKOUT pin. I'm sure that people have done this before... I haven't read anything advising against it, is it an OK practice?

Thanks very much guys, I'm looking forward to spending countless hours building a homebrew 6502 computer :)


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 19, 2013 11:40 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
The reset circuit is fine - I did it that way on my SBC-4 (from an ATMega162). Also, I don't see any reason the clock would not work. Give it a try (it should not hurt either IC).

Have fun!

Daryl

Edited - changed ATMega324P to ATMega162

_________________
Please visit my website -> https://sbc.rictor.org/


Last edited by 8BIT on Mon Jan 21, 2013 12:47 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 20, 2013 2:21 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8513
Location: Midwestern USA
blark wrote:
For reset I have created a small program that will software debounce a button, the RESB pin on my 65c02 is attached to a pin on the attiny that will be held to ground for 80us when the button is pressed.

As Daryl indicated, that should work fine. I'd increase the time that RESB is held low—100 to 250ms is more typical of hardware reset circuits, which gives the Ø2 signal plenty of time to stabilize.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 20, 2013 4:38 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
BigDumbDinosaur wrote:
As Daryl indicated, that should work fine. I'd increase the time that RESB is held low—100 to 250ms is more typical of hardware reset circuits, which gives the Ø2 signal plenty of time to stabilize.[/size]


Yes, I agree. I had focused on the hardware side of the question but BDD is right. The DS1813 (econoreset) has a 150ms pulse width and has served me quite well.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 21, 2013 12:06 am 
Offline

Joined: Sat Jan 19, 2013 10:20 pm
Posts: 4
Thanks so much for your answers!

I have one more question now regarding the Bus Enable. Is it also OK to tie the Bus Enable to an AVR pin rather than an pull up resistor?

I want to do so in order to allow my microcontroller to write to RAM without damaging the 6502. One of the projects that I'm really keen on building is a hardware SID player (like this one: http://code.lardcave.net/entries/2012/10/06/173014/ which is a simple enough starting point for me) however I want to alter it slightly.

On the page I linked, Nicholas describes a problem with writing to the 6502 bus that he had to deal with, I believe it can be overcome using the 65c02 and BE but I was hoping to have some verification.

Thanks again!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 21, 2013 12:46 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
I used the ATMega162 on the SBC-4 to load the system RAM while holding the 65816 in Reset. Once the load was done, the ATMega162 tri-stated its outputs and raised the Reset and the 65816 started running. The 65C02 could be controlled the same way. Notice on the schematic ( http://sbc.rictor.org/pschem4.html ) that I tied the BE and RES pins together.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 21, 2013 3:50 am 
Offline

Joined: Sat Jan 19, 2013 10:20 pm
Posts: 4
Awesome. Thanks again for the help.

I think I'm going to use an atmega32a to make a slightly modified version of Nicholas' hardware SID player (writing the SID to RAM directly). Along with onboard bluetooth and a 65c02 + SID and some logic for the address bus.

Also Daryl, I've been browsing your site all day - awesome and inspiring stuff!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 21, 2013 4:04 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
Happy to help and thanks for the nice words!!!

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 21, 2013 4:35 am 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
blark wrote:
Along with onboard bluetooth and a 65c02 + SID and some logic for the address bus.

Is the Bluetooth already worked out on the ATmega32? The problem with Bluetooth is that it is defifintely not hacker/hobbyist/workbench friendly. I've tried with a couple of companies who offered development kits where everything is supposedly done for you, yet I ended up giving up, telling my employer I wasn't going to try any longer, at the risk of losing my job. (I didn't lose it.) Then I found out that he gave me the job because another engineer had tried and told him the same thing, and he didn't believe him, and didn't want to tell me. The data sheet for the module was a couple hundred pages, and after getting through it, you have more questions than answers, and no idea of how to get to certain requirements. They thought they had made it really easy; but they were not viewing it from the perspective of someone who has had no background in Bluetooth. I exchanged emails with their support people many times, and they would say things like, "All you need is this AT command to go into mode XYZ." And my response is, "What is mode XYZ, and how do I know if I need it? That info is not in the data sheet!" RS-232 is extremely easy by comparison.

_________________
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: Mon Jan 21, 2013 5:49 am 
Offline

Joined: Sat Jan 19, 2013 10:20 pm
Posts: 4
GARTHWILSON wrote:
Is the Bluetooth already worked out on the ATmega32?


Yeah, it's a very simple bluetooth serial port module that I will interface with the atmega32... I've played with it a bit and it's really easy to use. I'll likely use Python to send SID files over like Nicholas does with his player...

http://www.seeedstudio.com/depot/serial ... th=139_142

They even have an eagle part for it in their library so it's easy to add to a PCB.

Thanks for the concern!

Mark


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

All times are UTC


Who is online

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