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

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: design a 6502 SBC
PostPosted: Mon Oct 04, 2004 9:39 am 
Offline

Joined: Mon Oct 04, 2004 8:25 am
Posts: 6
Location: Grobbendonk, Belgium
hello,

I would like to build my first 6502 based SBC. I want to use a 8K 27c64 EPROM on address E000 - FFFF, a 8K 62c64 SRAM on address 0000 - 1FFF and a 32K NVSRAM (free samples from TI) on address 2000 - 9FFF.
I also want to use a 6551 ACIA, a 6525 and LCD display.
the intention is to write terminal a program in the EPROM which controls the ACIA and display which makes it possible to store a hex file into the NVSRAM. This should make it easy to test and update programs.
I also want to make it expandable by using a bus system, but do i need drivers to increase the fan in and fan out? If yes, which types? 74245, 4050...). In the futere, I want to expand it with lots of PPI's and some ACIA to communicate with 89c51 microcontrollers etc..
Some suggetions / remarks?

thanks,

Seppe


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 04, 2004 7:58 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
I think you will find the address decoding to be easier and have less propagation delay if you put the 32Kx8 RAM from 0-7FFF and put the 8Kx8 RAM above that. Remember also that going for a bigger SRAM does not mean you have to use it all. For example, since there's no 16Kx8 SRAM, you can use a 32Kx8 in its place and just not use all of it. Or you put in a 64Kx8 NVRAM and only use 40K of it for example.

I don't know where you're going to find a 6525 unless you already have some. They have not been made in probably 20 years. What is being made now (and has no end in sight) is the 65c22. It only has two parallel ports instead of three, but has two multi-mode timer-counters, seven interrupt sources, a synchronous serial port, and parallel port handshaking.

As long as you only connect ICs with MOS (CMOS, NMOS, etc.) inputs, you will not need any bus buffering. If you use the 65c02 (CMOS) instead of 6502 (NMOS), you'll get a strong bus-driving capability anyway, in addition to lower power, more instructions, more speed, NMOS bugs fixed, etc.. With the modern CMOS parts, there's no reason to use logic that has bipolar inputs like the 74xx and 74LSxx do. You'll do better with 74HCxx or 74HCTxx. 4000-series CMOS can handle the wide voltage range when you need 15V, but it's very, very slow compared to 74HC/HCT/AC/ACT.

You can see my own workbench computer at http://www.6502.org/users/garth/projects.php?project=1 . The links to the schematics are there too. It has three 65c22's, three 65c51's, 16Kx8 SRAM, 32Kx8 EPROM, an LCD, keypad, beeper, printer port, MIDI port, RTC, I²C port, fast A/D and D/A with socketted anti-alias filters, and wireless serial port. There's more coming too. The pictures are outdated. I'll update them when I get the next round of additions completed with a mezzanine board.

You can see my "Tips" column starting at http://www.6502.org/forum/viewtopic.php?t=342 . Take a few evenings to look through the archives here on the forum too. There are several very knowledgeable people here on the forum who will be glad to answer your questions. (You would do well to use the "search" feature though, since many of your questions may have already been answered.)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 07, 2004 8:42 pm 
Offline

Joined: Mon Oct 04, 2004 8:25 am
Posts: 6
Location: Grobbendonk, Belgium
thanks Garth,

now i'm thinking to use only a 32K NV-RAM starting from address 0000 to 7FFF and want to use a GAL16V8 as address decoder. I also want to use some inputs of the GAL to disable parts of 8 KBytes of the memory and inputs to disable writing to parts of the memory. This should protect the parts of the NVRAM which contains the program memory. I also want to use a JK-FF to divide the clock frequency. This makes it possible to work with 2 MHz or 1 MHz.
And about the 6525, not available in my shop, but bought 6522.
I've also a question about a real time clock, you can build one using a timer of the 6522, but i need one which still counting by a battery when the power is switched off. I know there exists an IC which contains a real time clock with a battery input and own oscillator, but cant find the type anymore. Any idea?

thanks,

Seppe


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 07, 2004 9:04 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Maxim (at www.maxim-ic.com ) is one of several companies that has a lot of RTC variations. I personally have used the Saronix RTC58321 in a 16-pin DIP with the crystal inside and a 4-bit parallel interface; but that one did not have the automatic write-protect circuitry onboard, and the parallel interface was so slow I had to slow the processor way down to access it when it was on the processor's bus. If I were to do it again, I'd use one of Maxim's ICs with a synchronous serial interface (either SPI/Microwire or I²C) and its own power-down write protect and battery back-up circuitry. If the IC you want is not available from someplace like Digi-Key (at www.digi-key.com ), you can buy small quantities directly from Maxim at their website with a credit card.

Another idea (which I have not tried) is to still use the 65c22's T1 for a software RTC but have the processor sleep most of the time and only wake up long enough to do the small amount of RTC housekeeping every time the VIA's T1 times out. It would take more power than the dedicated RTC, but only a fraction as much power as is needed to keep the computer active all the time. You would use the 65c02's WAIt instruction.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 11, 2004 9:04 am 
Offline

Joined: Mon Oct 04, 2004 8:25 am
Posts: 6
Location: Grobbendonk, Belgium
hi,

about the RTC, I go wait till i know how to use I²C. I've no experience with this protocol. The most RTC's I've found haves a serial interface.
Now I want to build the first PCB which contains the CPU, oscillator, reset ciruit, ROM and RAM. After this one, i go build a second one with a 6522, LCD interafce and ACIA. I've put a schematic of the first pcb on the internet. I hope its error-free.

my sbc:
http://users.telenet.be/omloop/6502/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 11, 2004 9:05 am 
Offline

Joined: Mon Oct 04, 2004 8:25 am
Posts: 6
Location: Grobbendonk, Belgium
hi,

about the RTC, I go wait till i know how to use I²C. I've no experience with this protocol. The most RTC's I've found haves a serial interface.
Now I want to build the first PCB which contains the CPU, oscillator, reset ciruit, ROM and RAM. After this one, i go build a second one with a 6522, LCD interafce and ACIA. I've put a schematic of the first pcb on the internet. I hope its error-free.

my sbc:
http://users.telenet.be/omloop/6502/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 11, 2004 3:10 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Interesting-- I guess it would save cost if you make your computer with absolutely no I/O of any kind. :wink: Seriously, it'll take special equipment to even tell if it's working at all... hmmm... but then, I guess if there's no I/O, maybe it wouldn't matter if it didn't work. Ahhh, so many ways to be happy!

I²C is one of the popular synchronous serial interfaces. Do not confuse it with asynchronous like RS-232. There are almost no timing requirements for synchronous serial like there are with asynchronous. Synchronous is very easy to bit-bang with an I/O IC like the 6522. The data sheet for the synchronous I/O part will show you exactly what you need to do.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 12, 2004 8:45 pm 
Offline

Joined: Mon Oct 04, 2004 8:25 am
Posts: 6
Location: Grobbendonk, Belgium
mmmm.. I/O.. good idea
I added a schematic on my site with some basic I/O (ACIA, LCD and VIA). I want to use a 40 pins header connector to link CPU-PCB to I/O-PCB and later some extra I/O-cards. My only problem now, can it work what's drawn in the schematics... I want to make the PCB's, it's faster and easier than build it on a breadboard. I only have to use the protel DXP's autorouter...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 13, 2004 12:39 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Making the project modular in that you don't have very much on each board may make it more manageable. For the hobbyist who cannot devote full time to it, that's always a major factor in getting such projects finished and working. I can speak from experience on both sides, as one who has started some projects that turned too large (ie, too large for a home project) and seemed hopeless, and other ones where I was able to get something useful going in a reasonable amount of time and improve on it later. I've also done much bigger projects for work where I could work on it full time (and get paid for all that fun) and failure was not an option. (see http://www.6502.org/users/garth/projects.php?project=6 )

Certainly with the modular approach, if some part needs re-doing or you want to add something, it won't require re-doing the whole thing. If 2MHz is truly as fast as you think you'll want to go, having various small boards that plug into a backplane is a good path to take. Running the processor's own busses through the large connectors and over the backplanes is not coducive to operation at the higher speeds however because of capacitive loading and the inductance of the lines.

A few comments on the I/O board schematic:
1. The LCD may not work at 2MHz. 1MHz is the fastest I could go when I connected LCDs directly to the processor bus as you show. Again, maybe higher speed is not one of your interests-- just be aware for whatever you might want to do with it later. You'll have to look at the timing diagrams for the LCD. If you want to go faster, you will need to interface the LCD through a VIA.

2. The ACIA will probably need at least one capacitor in the crystal circuit. See my notes at http://www.6502.org/users/garth/project ... chematic=4

3. On IC3 (U3) of the I/O board, you'll need to connect the GAL's inputs to the higher address bits, not the lower ones, to make sure that I/O does not get selected resulting in bus contention when you're trying to address memory. For example, the I12 should go to A15, I11 to A14, etc. A0...3 should not affect the GAL's output, at least not when a VIA is selected.

4. I can't quite make out all the little letters on the lines going to the LCD, but the LCD needs an enable line (positive logic, high for enable) and a register-select line. The enable should just be one line coming out of the GAL. The register-select line (RS) should just be one of the address lines not used by the GAL.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 13, 2004 7:00 am 
Offline

Joined: Mon Oct 04, 2004 8:25 am
Posts: 6
Location: Grobbendonk, Belgium
I'll change the address lines on the GAL and the capacitor on the ACIA soon :)
about the LCD: Maybe it's better to drive it by a 6522 then. Then I can use 1 VIA to drive LCD (4 bits databus), keyboard and maybe buzzer and LCD backlight. Also it's timers as real time clock (maybe temporary) and a watchdogtimer.
About the construction: I think I go buid a backplane like you told, but maybe it's better to buffer the data, address an controlbus on the backplane? I've checked my CPU, it's a 6502 (no 65C02), so think NMOS.
I'll change my schematic this evening or tomorrow.
And thanks for your help! I really appreciate it.


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