6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Apr 24, 2024 5:34 pm

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: New to SBC projects
PostPosted: Thu Feb 04, 2010 8:18 pm 
Offline

Joined: Thu Feb 04, 2010 8:10 pm
Posts: 2
I wanted to see if anyone could provide me with good information with getting started in Embedded Systems work and SBC projects. Im currently an EE student working on a project and we are planning on using a pre-built SBC for a project we are working on.

I have done some coursework in digital electronics and microprocessors, I can program in C and have done some assembly on a Motorola chip. I would like to get more involved in this type of work and would greatly appreciate any advice, names of good books to read, good web resources anything of the sort that can help me move towards making my own SBC rather than purchasing one. I don't mind reading other peoples designs; however, I would prefer any information that could lead me towards designing my own before I read too much of other peoples work. Id like to be able to specialize a board to a task. Thanks for your time and any help that anyone can provide. I hope that was not too scatter brained.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 04, 2010 8:31 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8427
Location: Southern California
That's not the fastest way to learn, but it's probably the best. Newbies tend to make it more complicated than necessary, and then after all that, end up with something that's not very useful. Been there, done that, and my ideas still continue to evolve and improve after 25 years!

I don't know of any one book or web page or set of answers to start you out with, but hang around here and ask a lot of questions and tell us what you're up to, and you'll no doubt get a lot of guidance-- most of it good.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 05, 2010 6:50 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8141
Location: Midwestern USA
GARTHWILSON wrote:
I don't know of any one book or web page or set of answers to start you out with, but hang around here and ask a lot of questions and tell us what you're up to, and you'll no doubt get a lot of guidance-- most of it good.

Although you indicated you didn't want to be overly influenced by others' work, it would be profitable for you to go to the projects page and look at some of the designs that have been concocted. Before you launch into scratch-designing your own device, it's helpful to look at prior art to see where things work out and where they don't. As I've opined in the past, you need to get your single-engine plane flying before building that jumbo jet.

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


Top
 Profile  
Reply with quote  
 Post subject: Thanks!
PostPosted: Fri Feb 05, 2010 3:33 pm 
Offline

Joined: Thu Feb 04, 2010 8:10 pm
Posts: 2
Well thanks for your replies. I really just need a starting point and you have both supplied that. I am sure that fairly soon I will have better and more interesting or at least specific questions. Thanks again for taking the time to reply. I am looking forward to learning about SBC's.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 06, 2010 3:25 am 
Offline

Joined: Wed May 20, 2009 1:06 pm
Posts: 491
GARTHWILSON wrote:
That's not the fastest way to learn, but it's probably the best. Newbies tend to make it more complicated than necessary, and then after all that, end up with something that's not very useful. Been there, done that, and my ideas still continue to evolve and improve after 25 years!


I'm in the same boat. I have two old Commodore 64's that work from the old days. I miss the old ways of how some things were done. I don't know where to get all of the hardware and $200 eprom programmers seem to put it out of reach. I found that there are other microcontroller platforms that make this quest look more reasonable. I've looked at the Parallax Propeller and in some ways it is good but I'm looking for something better. Someone suggested an NXP LPC 2478 for $14.91 at Digikey (72 MHZ) and an Atmel AT91 RM 9200 $23.76 180 MHZ Max.

The other possibility is an Arm 9 or a higher end ARM to interface with the 6502 family if electronically possible.

I've looked at the Beagleboard and other systems like the Minimig, the future Natami and newer Amiga that is promised.

The problem I get with experienced microcontroller guys is they dis the 6502 family and they say the newer microcontrollers are better but they don't suggest what chips to replace them with. They tell me to get an IBM and program that. Let me go back to the beginning; I like the old days and how some of the things were designed and made. The other problem is I request information on chips and company reps want me to tell them how I am going to use it before they are willing to tell me how the chip works or suggest a better one. Since they have other paying customers, they don't want to keep communicating with me.

I request:
(1) The names of books that I can find on Amazon that would help me learn.
(2) What available chips, components and devices are available to help me on my quest.
(3) What other microcontrollers could be used to interface with the 6502 and more modern variants to create a single board computer?

My goal is to work on a computer equal to or better than a Commodore 64 with off the shelf parts.

I'm involved in Parallax and Microchip microprocessors. I'm interested in getting Atmel and Timex microprocessors or the ones I mentioned above.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 06, 2010 5:39 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8141
Location: Midwestern USA
ChuckT wrote:
I'm in the same boat. I have two old Commodore 64's that work from the old days. I miss the old ways of how some things were done. I don't know where to get all of the hardware and $200 eprom programmers seem to put it out of reach.

You can get 50 dollar EPROM burners on eBay. Caveat emptor, of course.

Quote:
The problem I get with experienced microcontroller guys is they dis the 6502 family and they say the newer microcontrollers are better but they don't suggest what chips to replace them with.

New technology isn't necessarily better (or even good) technology, and it's not uncommon for people to criticize technology about which they know little or nothing. WDC makes several microcontrollers that are powered by a 65C02 or 65C816 MPU, if you want to go that route. You can also scratch-build something with a 65C02 or 65C816, which isn't all that difficult.

Quote:
They tell me to get an IBM and program that.

Cross-development is pretty much the way it's done. I write and assemble my 6502 code on my UNIX system (using vim for editing).

Quote:
Let me go back to the beginning; I like the old days and how some of the things were designed and made. The other problem is I request information on chips and company reps want me to tell them how I am going to use it before they are willing to tell me how the chip works or suggest a better one. Since they have other paying customers, they don't want to keep communicating with me.

If you know what silicon you want to use you can usually download data sheets without having to tell stories to a salesman. Assuming you were going to scratch-build something using discrete logic and such, all of the required information is readily available.

As for the old days, be careful about staying too close to the past. Things have changed a lot and mostly for the better. Although I thoroughly enjoy working with the ancient 65xx architecture, i also enjoy an assembler that rips through 10,000 lines of source code in about a second. Compare that to the many minutes a similar assembly would require on the C64 running MADS, assuming the symbol table didn't overflow before the end of pass one. :)

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 06, 2010 10:37 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8427
Location: Southern California
Chuck, I use both— microcontrollers, and a 6502 workbench computer that I use for controlling experiments, taking data, and developing products. They have their separate functions and there's a place for each. It would be difficult to impossible to use an off-the-shelf microcontroller for the things I use the workbench computer for. And as much as I would like to use the 6502 for embedded control in the products (actually I did a couple of times, before the microcontroller scene was what it is today), the sad truth is that it would take too many parts and too much PC-board space, and the parts cost would be too high, to justify going that route today. The last one I did with the 6502 was in 1993. It was justifiable at the time. It had a 65c02 processor, 65c22 I/O IC, 27c64 EPROM, 6264 SRAM, 93c06 serial EEPROM for non-volatile storage of variables, a 74HC00 quad NAND for glue logic, and a few resistors and capacitors. The clock speed was set by a resistor and capacitor pair on pins 3, 37, and 39 of the processor. I took advantage of the Schmitt-trigger RST\ input to simplify the RST circuit. Here's a picture of the SBC:

Image

(The EPROM socket is on the back.)

Quote:
The other problem is I request information on chips and company reps want me to tell them how I am going to use it before they are willing to tell me how the chip works or suggest a better one. Since they have other paying customers, they don't want to keep communicating with me.

I ran into that when I was trying to choose a microcontroller for the product mentioned above. One of the manufacturers basically told us, "Get lost. Your company is too small for us to be interested."

Quote:
They tell me to get an IBM and program that.

It would be difficult to use a PC for the workbench work, because there's too much you don't have full info on, and you don't have full control. Interrupt latency is terrible too. I don't have time to try to keep up with a consumer market that doesn't sit still long enough to really learn the insides the way I would need to. Lack of market stability causes other problems too; like if you decide you want to buy two more plug-in gizmos identical to the one you have, well, tough, because they were discontinued long ago. "But the new is better!" they say, and call you a dinosaur, never mind that the old one did the job just fine and now you have to re-write your software. I also don't want even a laptop on the workbench. It's too big. Although I host my workbench computer from a PC, the PC is on a desk, not taking room on the workbench.

What I find with the microcontrollers is that most of them lack in either the I/O or the memory (or both) of a home-made 6502 system. Some allow you to put more memory externally, but that requires forfeiting I/O pins for the address and data buses and control lines. Some of the microcontrollers these people advocate lack other resources as well. I am very familiar with PIC16's after having brought quite a few products to market with them, and I can tell you their decrepit processor is not the reason I use them. Contrary to what Microchip claims, they are not hot performers when you compare them to modern 6502's or 65816's, and they usually take twice as many clocks to get a job done as the 6502, if the PIC can do it at all. The only way to do a lot of things on the PIC is really mickey-mouse compared to the 6502.

So why do I use PICs at all? It's for tiny control jobs where an 28- or 18- or even 8-pin microcontroller has enough I/O, and it's nice to have the onboard support circuitry for things like reset, brown-out, watchdog timer, and even being able to generate their own clock without external components. They're available in many variations from many stocking distributors. But for bigger jobs, it doesn't make sense to use them.

The 6502 is going into consumer, automotive, and even medical products today at the rate of hundreds of millions of units per year, in custom ICs. The fastest of them run at over 200MHz. There's no need to apologize for it.

Oh, and BTW, there are no microcontrollers in my 6502 workbench computer, but I do use it to program the PICs for our products. It sets the voltage under program control too, so it qualifies as a production programmer which has to do the verify at the voltage extremes.

Quote:
My goal is to work on a computer equal to or better than a Commodore 64 with off-the-shelf parts.

Better in what way? Better in raw processing power is easy. But if I had to make the computer self-supporting in keyboard, big display, and write my own full-featured text editor and macro assembler, that would be a big job. I do hope to do basically that in the next few years; but for now I use an old PC running DOS (actually almost any old computer with RS-232 will do) for writing and storing the programs, and run them over on a serial link when I want to run them on the workbench computer. It can take the commands and more code to assemble or compile or execute at the same time that it's doing a time-critical real-time job on the workbench. Keep in mind however that the power of the processor is only a small part of determining the power of the whole computer. Other important factors include the software, the I/O capabilities, and other hardware issues.

Quote:
I request:
(1) The names of books that I can find on Amazon that would help me learn.

Download the programming manual from WDC's website, westerndesigncenter.com .

Quote:
(2) What available chips, components and devices are available to help me on my quest.

  • 65c02 or 65816 processor
  • 74HC, 74HCT, 74AC, 74ACT, etc. logic families (there's no reason to use 74LS anymore) Examples: 74HC00 quad 2-input NAND gate, 74HC04 hex inverter, 74HC14 hex Schmitt-trigger inverter
  • 65c22 as your main I/O avenue, but not necessarily the only one. Other things can be interfaced through it. You can have several if you want (but probably don't need as many as you think you do).
  • 62xxx SRAM (like the 62256 32Kx8)
  • 27xxx EPROM or 28xxx EEPROM (like the 27c256 32Kx8 EPROM)

Quote:
(3) What other microcontrollers could be used to interface with the 6502 and more modern variants to create a single board computer?

Single-board computers were common long before microcontrollers were. So far I have never used a microcontroller in an SBC. I do plan to in the next one, but that's to pre-load RAM because I want the computer to operate too fast for the available ROMs, meaning I can't use ROM for the start-up code. I don't recommend that you use a microcontroller in your SBC. If you really, reeeeeeealy want to though, you could use virtually any of them.

I have a few pages of tips starting at viewtopic.php?t=342 . Some show an unexpected way to do something, some just help keep you out of trouble, some are for troubleshooting, developing, rigging various types of I/O, etc..

My project pages on this website are at http://www.6502.org/users/garth/ . I've sent material to Mike to update them, and hopefully he will have that up soon.

_________________
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?


Last edited by GARTHWILSON on Sun Feb 07, 2010 10:02 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 06, 2010 10:48 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
I'm starting to think there are at least three ways in these days
    traditional, with soldering iron and 74-series logic, using circuit diagrams, need at least an EEPROM programmer
    modern, with CPLD for glue logic, using verilog or VHDL, need a PC and a cable to program
    integrated, using an FPGA for everything, again verilog or VHDL, again PC and cable
    futuristic, using propeller or XMOS running parallel software to emulate hardware, again a PC and cable to load code or a means to program a serial EEPROM

Hmm, make that four!

Of course, it's more of a continuum than that. If you use breadboard (at low clock speeds!) or a development board, you don't need a soldering iron. If you bootstrap with toggle switches you don't need an EEPROM.

In fact, couldn't you program a tiny bootstrap into an EEPROM using switches - no need for a programmer? If you have a serial port you only need a loader.

With the propeller, you get pretty much that bootstrap idea already in ROM on chip.

To take the propeller as an example, something like the pacman project puts everything inside, whereas the laptop project uses propeller only for glue, and otherwise is fairly conventional.

To close with some practical advice: study at least a couple of existing projects first. Even better if they describe some of the problems they found and overcame. I can't think of a specific book: the first one I bought was The Art of Electronics by Horowitz and Hill, but I'd already picked up a lot from reading about projects and soldering up a kit. And that book is a lot wider and deeper - and more expensive - than you need.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 06, 2010 11:17 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Garth, in your tip link above, in tip #1 one where you say you can mix the data and address lines, what do you mean exactly?

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Feb 07, 2010 12:51 am 
Online
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1679
Location: Sacramento, CA
Here is an example. Check out the CY7C1049's address pins. (scroll down a little)
http://sbc.rictor.org/sbc31/sch.html

They don't match the actual address lines that I connect. Since its RAM, it doesn't matter that adjacent addresses are not stored in adjacent memory cells. Same goes for the data pins, as long as only the processor accesses them. On my board, the CPLD also accesses RAM, so I left the data lines wired properly.

Now, scroll down on this page to the top layer trace routes.
http://sbc.rictor.org/sbc31/pics.html
Notice how the pins from CPLD to SRAM have minimal crosses?

It made routing those traces much simpler. I did have to ensure that the EEPROM's address and data pins were in the correct place.

Hope that helps

Daryl


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Feb 07, 2010 4:46 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8427
Location: Southern California
Quote:
I'm starting to think there are at least three ways in these days:
  • traditional, with soldering iron and 74-series logic, using circuit diagrams, need at least an EEPROM programmer
  • modern, with CPLD for glue logic, using verilog or VHDL, need a PC and a cable to program
  • integrated, using an FPGA for everything, again verilog or VHDL, again PC and cable
  • futuristic, using propeller or XMOS running parallel software to emulate hardware, again a PC and cable to load code or a means to program a serial EEPROM

I'd say only the first one is an option for the beginner. CPLD's, FPGA's, VHDL, emulation (as opposed to simulation) can come later. And, for digital (as opposed to analog work), wire-wrap works better than soldering.

Quote:
In fact, couldn't you program a tiny bootstrap into an EEPROM using switches - no need for a programmer?

That's actually how I made my first EPROM programmer in 1985 (although I used DIP switches)—set the address and data with the switches, then press the button that triggered a timed 50ms pulse to program that byte on the EPROM. It was so slow and prone to human error however that I didn't get any useful service out of it—not when my friend had made a programmer that was controlled by his HP-71 handheld computer and he offered to help me! I assembled the programs by hand and read him the hex code as he entered it. This was before I owned a working computer of any kind). If I really had to start from absolute scratch again though, I might still go for the switches.

Quote:
Garth, in your tip link above, in tip #1 one where you say you can mix the data and address lines, what do you mean exactly?

Daryl covered it pretty well. The point is that as long as address lines go to address pins, and data lines go to data pins, it doesn't matter which ones. If you do that with (E)EPROM though, you'll have to make a programming adapter to mix them around such that the (E)EPROM will get read properly when put in the target system.

_________________
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  
 Post subject:
PostPosted: Sun Feb 07, 2010 6:03 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8141
Location: Midwestern USA
GARTHWILSON wrote:
...but for now I use an old PC running DOS (actually almost any old computer with RS-232 will do) for writing and storing the programs, and run them over on a serial link when I want to run them on the workbench computer.

That's basically what I do with my POC SBC. I use an old (and I do mean *old*) Wyse 60 dumb terminal running through one of the two serial ports to act as the console. The other port can interface to one of the serial ports on my UNIX shop server for code downloads.

Quote:
74HC, 74HCT, 74AC, 74ACT, etc. logic families (there's no reason to use 74LS anymore)

Also available in some glue logic is 74ABT, which is about as fast as you are going to get. I tend to stick with 74ABT and 74AC. Many are also available in SOIC packages...a bit more a challenge to solder, but more economical with board real estate.

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Feb 07, 2010 9:55 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8427
Location: Southern California
Quote:
Also available in some glue logic is 74ABT, which is about as fast as you are going to get. I tend to stick with 74ABT and 74AC. Many are also available in SOIC packages...a bit more a challenge to solder, but more economical with board real estate.

From Mouser, I just ordered some 74ABT573's in DIPs, and some 74ABT00's and 04's in SOIC since they didn't have them in DIP. I will probably get the SOIC-to-DIP adapters for the SOICs. I would still like to find the '521 and '138 in ABT, if anyone knows a source. I wouldn't particularly recommend that a newbie try to go with such fast parts though.

_________________
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  
 Post subject:
PostPosted: Sun Feb 07, 2010 5:21 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
I haven't checked, but maybe someone here would know off the top of their heads. Any magnitude comparators in ABT technology? That'd make address decoding quite rapid for discrete-chip SBCs, allowing for greater clocking flexibility.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Feb 07, 2010 10:40 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8427
Location: Southern California
Quote:
Any magnitude comparators in ABT technology?

That's what the '521 I referred to above is. The '688 is the same thing. If anyone finds a source (where they actually have it in stock), please tell us.

_________________
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  [ 33 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

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