6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 27, 2024 7:28 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Oct 01, 2013 10:39 pm 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
I have a few trivial questions regarding speed:

I barely have my colorful breadboard system running for a few days, I couldn’t resist running it at a higher speed. So my MOS 6502 2684 runs stable at a 1,8432 MHz clock which is generated by an ATmega 168 and produces a nice symmetric square wave. Is that a problem for this sweet little CPU? Will it have a shorter life span or will it give up very quickly?

If I want a system to run at 2 or 4 MHz, how can I interface with a 6581 SID which of course needs about 1MHz? Is it as simple as feeding a separate 1MHz to PHI2 of the SID? Or should I reduce the system clock to 1MHz while using the SID? At least it doesn’t feel any warmer.

Edit: Changed title

_________________
Marco


Last edited by lordbubsy on Wed Oct 02, 2013 5:43 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 01, 2013 10:57 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8520
Location: Southern California
The higher speed isn't going to hurt anything, especially on NMOS whose current is not proportional to the speed. If you want to see how fast you can reliably go, use a variable-frequency oscillator as shown at viewtopic.php?f=1&t=2013&p=17478#p17478 or the link in that post and slowly turn it up until you start having problems, measure it with a frequency counter or other somewhat accurate method, and then back it off 20% or so, so it won't malfunction later if the voltage sags or the ambient temperature is higher.

The phase 2 signal to the SID cannot be at a different frequency. It must be the same phase 2 the rest of the system runs on. You might be able to use a wait state or clock-stretching when you address it, but see if it needs a consistent phase-2 rate within its speed range to operate correctly. (I am not very familiar with it myself, so you'll have to check the data sheet and timing diagrams.)

_________________
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: Wed Oct 02, 2013 5:39 pm 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
Nice to hear that it can run at that speed without any concern.

I looked at the 6581 datasheet and it states that PHI2 acts as an active high chip select and all oscillators and envelope rates depend on it. It should be connected to a nominal system clock of 1MHz.

I also looked at the schematics of the C128, for now I only could see that PHI from the 6581 is connected to 1MHz.

I’ll address that at a later time when I actually prototype a SID to my system.

_________________
Marco


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 02, 2013 5:49 pm 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
I think it would be best that I keep one single thread with all my newbie questions.

My first prototype existed only in my head and EAGLE, it was too complex for a first build with some useful results. So for gathering experience I chose a more simple setup.

RAM $0000-$7FFF
I/O $8000-$BFFF (ACIA $8800)
ROM $C000-$FFFF

I chose this memory map to match the SYMON 6502 System Simulator.

MARC-1 consists of the following components:
• MOS 6502 2684
• 27C256 (half of it)
• 62256
• R65C51P2
• 74HCT00
• 74HCT138
• ATmega168 with 3,6864 MHz crystal

Attachment:
222.png
222.png [ 57.95 KiB | Viewed 502 times ]


The ATmega168A provides a nice stable TTL clock of 1,8432 MHz. it’s derived from the 3,6864 MHz crystal divided by two. It’s fed to PHI0 of the 6502 and XTLI of the 6551. I’m pleased that it runs at that speed. I’v adapted EhBASIC to operate at 19200 baud.

The atmega also provides the RESET signal at power on (750ms) and the manual RESET (250ms).

What I’d like to do next is to have some kind of ml monitor, the kind like VICMON or those from the C64 / C128. Is there any documentation on programming a monitor, like commented source code or any books or old magazines from Jim Butterfield?
Is the ROM from the KIM or UK101 commented somewhere? I also looked at Daryl’s SBC-2 Operating System, which is probably the most useful for me at this point.

_________________
Marco


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 02, 2013 7:37 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8520
Location: Southern California
On the '51, RTS is an output, so don't ground it. For hardware handshaking, you'll want at least RTS and CTS, and your MAX232 (it seems like you said elsewhere that you were using the MAX232-- or was that someone else?) has enough channels to do TD, RD, RTS, and CTS, which is usually enough. The only handshaking I've used is hardware. I've never used software handshaking myself.

_________________
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: Wed Oct 02, 2013 9:59 pm 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
GARTHWILSON wrote:
On the '51, RTS is an output, so don't ground it.
Thanks, I hope that didn’t damage it?

GARTHWILSON wrote:
For hardware handshaking, you'll want at least RTS and CTS, and your MAX232 (it seems like you said elsewhere that you were using the MAX232-- or was that someone else?) has enough channels to do TD, RD, RTS, and CTS, which is usually enough. The only handshaking I've used is hardware. I've never used software handshaking myself.

No, that’s me, but I only wired TxD and RxD. Now I switched to a USB to UART bridge, so I don’t need the MAX232 anymore. However, I’ll connect RTS and CTS for future use.

I don’t know very much about RS232 in detail, but am I correct that, with current setup with EhBASIC, I don’t use any flow control at all. And that’s why I have lost characters without delaying the stream I paste in hyperterm?

And by software flow control you mean the XON/XOFF setting and by hardware flow control you mean RTS/CTS control?

Do you have any code examples which use RTS/CTS control?

_________________
Marco


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 02, 2013 10:14 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8520
Location: Southern California
lordbubsy wrote:
GARTHWILSON wrote:
On the '51, RTS is an output, so don't ground it.
Thanks, I hope that didn’t damage it?

I don't know, but I'd give it a reasonable chance that it survived.

Quote:
Now I switched to a USB to UART bridge, so I don’t need the MAX232 anymore.

So the bridge uses TTL levels?

Quote:
I don’t know very much about RS232 in detail

I have an RS-232 primer at http://wilsonminesco.com/RS-232/RS-232primer.html.  My apologies-- the first portion hardly has any illustrations.  It should be pretty clear though.

Quote:
but am I correct that, with current setup with EhBASIC, I don’t use any flow control at all. And that’s why I have lost characters without delaying the stream I paste in hyperterm?

I am not familiar enough with those to say, but I'd give it a good chance that that is indeed the case.

Quote:
And by software flow control you mean the XON/XOFF setting and by hardware flow control you mean RTS/CTS control?

Generally (but not universally), yes.

Quote:
Do you have any code examples which use RTS/CTS control?

There is code for the receive side in my 6502 interrupts primer, after the 3.1 heading.

_________________
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: Wed Oct 02, 2013 11:15 pm 
Offline

Joined: Wed Sep 11, 2013 8:43 pm
Posts: 207
Location: The Netherlands
Yes it’s TTL compatible.

http://shop.myavr.com/Programmer%20and% ... tID=200024

Thanks for the links, that’s a very thorough description and I think I understand how CTS/RTS works now.

_________________
Marco


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 28 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: