• Please review our updated Terms and Rules here

Single board computer

bbcmicro

Veteran Member
Joined
Apr 2, 2006
Messages
707
Location
Scotland
Recent activity on this forum has again made me want to build my own single-board computer, a wish expressed in a (much) older post.

I have been looking around, and I thought a good system to try was the Cosmac Elf, rather than designing my own which is waaay above my head. I was especially swayed when I read about the MicroElf kit (http://www.elf-emulation.com/) which would save me from painful wiring, BUT, they are sold out and the 1802 processor seems hard to get hold of, never mind all the parts.

Right now, I am looking for a minimalistic computer that just provides the basics, with cheap parts and not thousands of connections. However, preferences include programmability (Not just a flashing LED) and some sort of display (Binary or digital, doesn't matter) and potential expandibilty.

I realise I am being specific, and I don't really know what I am doing, but why not make a start now?

Any suggestions as to well documented projects?
 
I re-started off (after many years gap) with the basic stamps. First using the modules, then making boards for the chip & separate memory, it was from having problems (corrupting programs in a commercial environment) with them, that I had a look at the chips, discovered they were PICs and started programming PICs in machine code, still using the same boards, and the same chips, but putting the code in myself.

There are various PIC basic compilers and PIC "C" around and you're welcome to a home made pic development board for the PIC16F84. dead easy code to learn, with only a few quirks. Flash memory >1000 times programmable, In circuit programming on 5V, (there are some software parallel port programmers available, but I haven't used them) I've got some spare chips, & leds too. Thinking about it I have routines for driving small LCD displays (and displays) Have a look at the datasheet & see what you think. Also pic programming skill is VERY saleable.

I know it's not quite vintage, but you can always move backwards.

Alternatively look out for a "micro-professor 1" (MPF1) it was a great little Z80 dev kit, obsolete, but fun. Expensive on Ebay, but occasionally findable on computer fairs.
 
PIC programming would be very useful. We use PICs in our Systems and Control classes in school, although considering the majority of our class inept, we are removed from the entire programming and manufacturing process. We are just given the finished PCB, the PIC and components, and told to solder them together, then whatever you are making (I am making a score-keeping table top golf game using a PIC and a LDR for my GCSE) works like magic. I think it's a shame.

It would be nice to learn how to use them and how they work. It would also be a good rung on the ladder to learning how to handle EPROMs (And more probably EEPROMs in my case, no expensive UV box!) Which I intend to do as soon as a sort out the spaghetti lingo they use, which chips are most common and which I would actually use. And when I can afford a programmer!

Incidentally there is a rather nice 8 bit ISA card for XT with and EPROM programmer, but the bids are getting rather high.

I have watched a couple of complete Micro-Professors with docs, binders etc. go on eBay for £50+ with envy. I want one!

The BASIC stamp in the form of something like this: http://www.parallax.com/detail.asp?product_id=28103 seems like a good start. But, like a lot of things in this hobby the price is too steep for me. (I can't wait till I get a job this summer! then I can afford the things I want :) ) Drawing on Nige's experience with BASIC stamps, I think learning to use PICs would be a good start, then move up (Or down, chronologically!).

I am curious about the BASIC stamps though, could one easily interface a keyboard/pad, and LCD display to these and use them as a computer in their own right with only 32 bytes of RAM?

Thanks for the input! Keep it coming, I'm learning loads today!
 
Yes, it's surprising what you can do with 32 bytes. (consider how many variables you use in the average small basic program!)

The bigger PICs have a bit more memory, and some have EEPROM you can use yourself.

As far as interfacing a keyboard to a "stamp" or a pic indeed, it's pretty straightforward, a 16 key keyboard can be done with 8 pins 4 in and 4 out in a matrix (and you can double up the 4 outputs to drive LEDS etc) the stamp also has serial in and out routines so you can use a terminal, You don't even need to use any hardware except a capacitor on the output to drive from a PC because you can select the serial routine to invert the output (ie more like a low level RS232) if neccessary.
 
Hey. This is a vintage board, right? Are PIC's vintage? :)

The COSMAC ELF is a cool computer. I built this one:

http://www.sparetimegizmos.com/Hardware/Elf2K.htm

Mike Riley (elf-emulation) doesn't make ELF boards anymore because this design is a little nicer. Mike does contribute a LOT of GREAT software for this platform, though. I also built the RTC/NVRAM/CF Card board to go with it. I am partial to the CDP1802, though, having built my own COSMAC Elf from the PopTronics articles back in 1978, when I was 14.

There's a great yahoo group dedicated to the Elf:
http://groups.yahoo.com/group/cosmacelf

I am also eyeing the Apple1 replica board here:
http://www.brielcomputers.com/

I have a fondness for the 6502 CPU, as it was the 2nd CPU I learned to program on (A PET 2001).

-steve
 
Again, the problem of price comes up. I did see the spare time gizmos kit a while ago, but getting all the parts costs well more than I can afford. Vbriel's replica 1 especially. Uber cool, but with an Uber pricetag

Would a keyboard matrix need another IC, or could it be interfaced directly to the stamp to carry out basic funtions?

I really am starting to like the sound of the stamp, it sounds like a gentle learning curve, and easy(ish) to interface to. But again, I can't afford it, unless I get a stamp on its own which seems impractical for a beginner like me with no means to use it.

Nig, could you expand on your home made development board? It sounds blinky and cool but I'm not going to pretend I know what it does! :)

In preparation for the construction of a computer that may never happen, I have a book from thhe early 80's called "Microprocessor Interfacing" about nearly everything I could want to know about the Z80, 8080A, 6502 and 6800...if only I understood all of it! I do however get the gist, but any technical detail is lost on me.

Matty.
 
Yes I appreciate that pics aren't exactly ancient, but it is a means to an end. If it'll get Beeb going on micros, on pocket money, all well and good. We all use modern english (and occasionally 133t 5p33k ??) here as a means of conveying information, if we all used ancient greek, it would be a truly elite and very tiny forum.

And... I stand corrected, I just WIKI'd the pic micro, and find it dates from 1975, and in it's modern form, 1985.... truly ancient. Actually when I started programming them, they were well established & it was on a relatively 'modern' 486DX2-66, using dos based tools downloaded from a bulletin board.


oopps been message hopping, just off out, but I'll expand on my dev board & other kit in email form tomorrow.
 
There is a crapload of information over at www.6502.org if you want to use the 6502 CPU.

I would recommend it for a first single board computer because it's a very simple processor (that and I love it) and doesn't have the legacy problems of the Z80 from the 8080. There are a lot of instructions that don't make much sense on the Z80 because they're based on 8080 instructions.

The only tricky part is memory mapped devices but this is easily solved with a few 74LS138's, but this makes a full 64K RAM a little difficult to achieve, unlike the Z80/8080. This usually isn't a problem if you're using your own ROM monitor and not a full OS. It's almost required on the 8080/Z80 if you want to run something like CP/M.

The BBC Micro is 6502 based if I recall correctly ;)
 
I still can't believe I spent close to 6 months MANUALLY disassembling "Space Invaders" on an early Apple. Never do this!! By the time you have it all figured out, you are totally sick of the game. Anyway, the 6502 is great fun.
 
Thrashbarg: I'll take the 6502 into account when I actually get to the designing process (May never happen!)

Chuckcmagee:pardon me, but why did you need to dissasemble Space Invaders? Curiosity?

Nig: Care to carry on where you left off? ;)


I found and downloaded the original schematics in an electronics article for the Cosmac Elf 2. It was very informative and I learnt a lot, also that it isn't as complicated as I intially thought (Still very complicated though)
 
ok,

The pic dev boards are not hugely exciting, a socket for the 16f84 or a pin-equivalent device, a voltage reg, an R-C clock, components to make a simple serial interface (you have to wiggle the legs up and down at the right time) and a breadboard area about 1.5 inches square with power and ground running up the middle, that said they have been useful for me.

There are also a heap of "dice boards" I made, with just a pic, 7 current-limiting resistors, and a big 7 segment display on. you can tag things to it.

I'm very willing to send a heap of bits but.... YOU've got to do some work!

If you have a look out on the net, you'll find freebie allsorts, emulators compilers, assemblers, complete tutorials, the works, but when you get down to opcode level, it takes patience, determination and tenacity. and the first program that anyone writes on a new sbc is usually to flash a led! (believe me, it took me all day and all night till 7am once to get an LED flashing on a new micro - datasheet and assembler had an absolute jump instruction in it that wasn't supported by the chip)

after that, you know that you are using the tools correctly. then it's 5 to 20 lines an hour at best, and you have to test constantly. it really is hard slog
but a rewarding one, at opcode level, you are in almost complete control of the chip, no OS getting in the way. It's a bit like playing "lemmings", you have an objective, a limited set of tools, and a brain that can only keep so much detail afloat at any one time.

On the subject of a 6502 SBC though, you do already have one in the BEEB, but you need to do some research, get a memory and peripheral map found, and start using the built in assembler. Just start doing somple jobs on a free area of memory, and work out. 6502 assembler is nice!
 
If you wanted to build a single board with like 6-8 IC's then the z80a with a simple key board interface and maybe a 2-4 parralel LCD module should be within your reach if you get a little help.I can't think of anything right now that can make simple graphics on a NTSC or PAL t.v. like COSMAC ELF can but if your looking for simplicity then the z80a,BASIC STAMP,or a MCU will probably be your best bet.
 
So far, I've never found a keyboard interface that's simple enough for me to grok. Does such a thing exist?

Anyways, the A/L code can even be used in the Beeb's BASIC without much hassle, using it's in-line assembler.

--T
 
Yes there is.Its called homemade keyboards.The VERY basics ones consist of a key matrix and a multiplexer (it converts it to binary).That should be simple enough.
 
A couple of dead simple keyboard circuits to use on an I/O port.

just set up a regular scan of the columns, and look for a connection to the rows.

first is as simple as it gets, you can even omit the diodes if there is a current limited output, and/or omit the pull downs if there are internal pull ups on the input port (but you have to scan a low across the columns & look-for a low coming out of the rows)

the second one will work if there's CMOS levels coming out of the port, it uses a divide by 10 counter which clocks a 1 across all the outputs in turn, you reset it to zero at the end of a scan.

you could use a 4 to 16 decoder to get up to 56 keys scanned on an 8 bit i/o port.

after you've done a scan, and found a key to be pressed, you must do something else for 5 - 10mS while the contacts stop bouncing, otherwise you end up with multiple key presses registered.
 

Attachments

  • simple keyboard circuits 1.pdf
    10.5 KB · Views: 1
I'm very willing to send a heap of bits but.... YOU've got to do some work!

No problem.
Especially so because I think this will be a geniunely useful skill. If I can see the point in something (And more importantly, I agree with that point) I don't have much trouble with perseverance and application, especially with a little gentle nagging.

Also, I can imagine it being a challenge. Interesting if not fun, and a rewarding blinky LED that you made all on your own at the end of it :)

I would appreciate the bits immensely :D

Also, there is a book by stroke of luck on ebay at the moment called something along the lines of "how to build your own computer and really understand it" That I am watching. BTW Nig, I missed out on the Pascal book as I was strapped for cash, but I think I might be able to persuade my parents to allow me this book as a Christmas prezzie.

There is a hobbyist ASCII keyboard on UK vintage computing eBay right now. Maybe you could apply some interfacing techniques to it.

Off topic,
Did anyone else see the KIM-1 on ebay?
 
BTW, I'm not in any rush accomplish this (Building a SBC). I've given myself a timeframe of ~5 years. No sense rushing things when you're not an expert.
 
Last edited:
If budget is that important, why not go with AVR brand microcontrollers by Atmel. For around $10 you can get a dongle connector and connect it up to your printer port and get free AVR STUDIO 4 software to program it! There are free C compiliers too. The controllers themselves are usually under $6 depending on what you need in I/O and the learning curve is pretty easy like the pic. So, no need for an expensive programmer like the pic needs.

Ok, I use them alot so I'm a little one sided. Still, if you do it right, under $20 gets you a connector for your printer port and a microcontroller. wire it up to a breadboard and you will be blinking lights before you know it. I opted for the full blown development board STK500 and that was a wooping $99 and can program many of the AVR series controlers, comes with 8 LED's and 8 switches. Warning, once you start you will get hooked.

As a mater of fact, I just designed two projects to involving Apple 2 keyboards. One replaces bad encoder boards that are prone to shock and the other converts a standard Apple 2e matrix keyboard into an ASCII keyboard with 30ms rising strobe output.

Vince
 
Back
Top