Working the design options -------------------------- Feb 24, 2005 I have uploaded three iterations of the "membership card" schematics to the cosmacelf.com website. My thanks to Dave Ruske for converting them from .EPS Orcad files to .PDF files. Each "membership card" is a complete Elf computer, with the usual 8 data, Load, Run, Memory Protect, and In switches; 8 data and 1 Q display, an 1802, and at least 256 bytes of memory. Each has other features, as described below. MEMBER.PDF This is my first proposal from a couple weeks ago. It is the smallest, cheapest, simplest, and has the lowest parts count. I/O and memory are both partially decoded, limiting expansion. By socketing the DIP switch and LED bargraph, you can unplug them and use the sockets for generic I/O ports. [Here's the parts list:] CPU 1802 Memory 256 bytes (two 5101's) Inputs 8-bit DIP switch; Load, Run, MemProtect slide switches, Input pushbutton; RS-232 (on EF4) Outputs 10-segment LED bargraph; 8 for data, 1 for Q; RS-232 (on Q) Expansion 40-pin edge connector, 0.1" centers, for IDC flat cable Power 3-6v at <10ma (mainly LEDs); can be powered from RS-232 data Cost $8.51 parts cost (less 1802 and PC board) Size 6.5 square inches (3.375 x 2.25" board at 85% component density) LCD.PDF This is a micropower version with an LCD display. The 8-digit 7-segment LCD has 0.4" high characters, displays "0"-"7" for a 1 in bit 0-7, and has pins like an IC, for easy mounting. [Here's the parts list:] CPU 1802 Memory 256 bytes (two 5101's) Inputs 8-bit Data, Load, Run, MemProtect miniature toggle switches; In pushbutton Outputs 8-digit 7-segment LCD for Data and Q Expansion uses 1802 socket Power 3-6v at 1-1000 microamps (depends on clock speed) Cost $17.33 parts cost (less 1802 and PC board) Size 10 square inches (5.5" x 3.1" board at 59% component density) DEV.PDF This is the latest version (though I'm sure there will be more! :-) It has expanded memory, subminiature switches (in between DIPs and miniature in ease of use and cost), and a connector so it can downloaded from a PC's parallel port. The board size was expanded to get the component density down to make it much easier to assemble.[Here's the parts list:] CPU 1802 Memory 256 bytes (two 5101's); or one bytewide RAM (6116=2k, 6264=8k, or 62256=32k bytes); or one EPROM (27C16=2k, 27C32=4k, 27C64=8k, 27C128=16k, or 27C256=32k bytes) Inputs 8-bit Data, Load, Run, MemProtect subminiature toggle switches; In pushbutton. 10-pin header to use for PC download or as a generic input port. Outputs 8 T1-3/4 LEDs for data, one T1-3/4 LED for Q Expansion uses 1802 socket Power 3-6v at 1-100 microamps (depends on clock speed) without LEDs Separate power pin for LEDs to turn them off when not in use. Cost $9.74 parts cost (less 1802 and PC board) Size 7 square inches (3.9" x 3.1" board at 59% component density) I hope one thing is clear from the above. It really *is* possible to build very small, very cheap 1802 computers! Feb 25, 2005 Gemeny, Steve wrote: > Schematics look good for all, from my perspective. Thanks! Since they are chronological (2 weeks ago, 1 week ago, yesterday), you will see the ideas evolving. The first is the least finished, and the last is the most ready to build. Before actually laying out any of them, they need to be checked for errors. Plus, the earlier ones should be updated to reflect what was learned in the later ones. For example, I decided that PC downloading is simpler with a parallel port than serial port; so I am taking the RS-232 port out of the MEMBER.PDF schematic. This cuts its size, cost, and parts count still further. I think the goals for this board should be "small, simple, cheap". I also rearranged the gates along the lines used on the DEV.PDF board, which I think is a better design. > As I'm sure you recall, I'm particularly partial to the LCD version > and will sign up for a couple of boards depending on what it takes > to get a reasonable price on a run. > > One question occurred to me on the LCD display and I wanted you to > think just a bit about... If I understand correctly, each digit > will display its position (i.e. 0, 1, 2... 6, 7) when the bit it > represents is a "1" and will display nothing when it is a "0". > Is this correct? Correct. > In the past when I've been teaching HEX to young kids it has been > helpful to them for me to assign a DECIMAL value to each bit (i.e. > 1, 2, 4, 8). The small step of adding these digits to arrive at the > value of the HEX nibble became much more intuitive at that point. Yes; for learning hex I think having it display "8 4 2 1 8 4 2 1" when all bits are set might work better. > Perhaps even displaying a "1" or a "0" for each bit might even be > less confusing to those attempting to do the "head math" of Binary > to HEX conversion. And this can also be done. With a static LCD, you can connect the segments any way you like, to display whatever you like. There are no doubt *many* ways it can be done. If we put it to a vote, we'd probably have half a dozen competing ideas, and no two alike! But if we're actually going to lay out a board, we ultimately have to just pick one method, and go for it. All is not lost, however. The whole idea here is the journey; not the destination. Such a crude limited display may well encourage the student to build a better one. At least this design is "transparent" enough so he can see how it works -- and so, he'll have a basis for designing a better one. -- Feb 27, 2005 It is easy to use a PC's parallel port to operate the 8 data switches and In button, and so to load a program into the Elf. Is there an equally easy way to *upload* programs from the Elf to the PC? Or, to be able to use a PC as the Elf's "terminal" for keyboard/screen I/O (send bytes back and forth under program control)? The basic PC parallel port has 8 data outputs (D0-D7), and 4 control outputs (Select, Init, AutoFeed, and Strobe). D0-D7 and Strobe can be used for the Elf's 8 data switches and In button respectively. But there are only 5 inputs (Busy, Ack, PaperEnd, SelectIn, and Error). We'd need 9 inputs for a simple-as-dirt byte output transfer. Later PC parallel ports are bidirectional, but I don't know how they work or when manufacturers started using them. Besides, I know some of my older PCs don't have bidirectional ports. One obvious method that comes to mind is to use 4 PC input bits for a nibble of data, and the 5th as a strobe. For example: - Elf outputs the low nibble on Busy, Ack, PaperEnd, and Error, and sets SelectIn low (hey PC; I have a low nibble for you) - PC sees the low on SelectIn, reads the low nibble, and sets Strobe low (Ok Elf, I got it; continue) - Elf outputs the high nibble on Busy, Ack, PaperEnd, and Error, and sets Select In high (hey PC; here's the high nibble) - PC sees the high on SelectIn, reads the high nibble, and sets Strobe high (Ok Elf, I got it; continue) Would this work? It would seem to avoid any timing problems or sensitivities to the clock speeds of either Elf or PC, and so should work as fast as each computer handshakes. Further; should the PC also have the remaining 3 of its output bits (Select, Init, and AutoFeed) control the Elf's Load, Run, and Memory Protect switches? Feb 27, 2005 Thanks for the corrections. I have uploaded rev.A of the Membership card schematica MEMBER.PDF in the "Membership" folder on the cosmacelf.com website. Changes: - replaced the serial I/O with parallel download from a PC - improved the switch debounce circuits - reduced the size, cost, and parts count - fixed the multiple "U8A" designators - tied the unused 5101 chip selects high/low One more thought. Can someone who has any of the skinny-DIP 28-pin thru-hole 32k RAMs actually plug one into a breadboard and see how much power they really take? If we can find one that is reasonably inexpensive and available, we could use it on the MEMBER card to save a chip. What I would do is plug it into a solderless breadboard socket, wire all of its inputs to +5v or GND, and measure its supply current first with ChipEnable wired high (should be low power), and then with ChipEnable low (active, but static). Also, if anyone has one wired up and in a working Elf, can you vary the supply voltage and see how picky they are about supply voltage. It offends my engineering aesthetic sense to use a chip that requires 5v +/-5% and draws 100+ma on such a tiny computer! :-) -- Mar 20, 2005 I've been working on ways to interface a very simple 1802 Elf to a PC's parallel port. I think I have a good, workable scheme, but would like people's comments. If it sounds good, I'll build a board and do some testing. If that goes well, I'll lay it out and so can provide boards for others! Based on the (limited) documentation I have, here are the specs on the standard PC parallel port (at the PC's DB25 connector): pin name dir. bit Elf port --- ---- ---- --- -------- 1 Strobe output "In" button, /EF4 pin 21), and MUX 2 Data 0 output D0 INP3-D0 3 Data 1 output D1 INP3-D1 4 Data 2 output D2 INP3-D2 5 Data 3 output D3 INP3-D3 6 Data 4 output D4 INP3-D4 7 Data 5 output D5 INP3-D5 8 Data 6 output D6 INP3-D6 9 Data 7 output D7 INP3-D7 10 Ack input D6 OUT3-D2 (Strobe=0), OUT3-D6 (Strobe=1) 11 Busy input D7 OUT3-D3 (Strobe=0), OUT3-D7 (Strobe=1) 12 Paper input D5 OUT3-D1 (Strobe=0), OUT3-D5 (Strobe=1) 13 Select input D4 OUT3-D0 (Strobe=0), OUT3-D4 (Strobe=1) 14 Autofeed output "Clear" switch (0=Clear, 1=Run) 15 Error input D3 Q pin 4 16 Init output "Load" switch (0=Load, 1=Run) 17 SelectIn output "MemProtect" switch (0=write, 1=read) 18-25 Ground ground Basically, this says that the PC's parallel port can operate the switches and read the lights of an Elf. Thus it can operate the Elf with ZERO software in the Elf itself (no ROM or bootstrap loader program in the Elf is needed). To load data, the PC would 1. set Init=0 and Autofeed=0 (resets the Elf) 2. set SelectIn=0 (MemoryProtect allows writing to RAM) 3. set Autofeed=1 (set Load mode) 4. set Data0-Data7 to the desired data 5. set Strobe=0, then Strobe=1 (rising edge writes the data into the Elf's 1st RAM location) 6. repeat steps 4-5 for each successive RAM location you want to load To read the data, the PC would 1. set Init=0 and Autofeed=0 (resets the Elf) 2. set SelectIn=1 (MemoryProtect prevents writing to RAM, i.e. read) 3. set Autofeed=1 (set Load mode) 4. set Strobe=0, then Strobe=1 (rising edge reads the Elf's 1st RAM location into OUT3) 5. while Strobe=1, read Busy, Ack, Paper, and Select (reads D4-D7 of OUT3 6. set Strobe=0, and read Busy, Ack, Paper, and Select (reads D0-D3 of OUT3). Now the PC has the byte read from RAM. 7. repeat steps 5-6 for each successive RAM location you want to load To run the program loaded into the Elf's memory 1. set Init=0 and Autofeed=0 (resets the Elf) 2. set SelectIn=0 (MemoryProtect allows writing to RAM) 3. set Init=1 and Autofeed=1 (sets Run mode). 1802 begins execution starting at address 0000. If the PC wants to send data to the Elf's running program (for example, as "keyboard" input for Tiny BASIC), the PC puts the data byte on Data0-Data7 and sets Strobe=0, then Strobe=1. The Elf program reads the data on IN3 when it sees the 1->0 edge on /EF4. If the Elf wants to send data to the PC (for example, output data from Tiny BASIC), it writes the byte to OUT3 and sets Q=0, then Q=1. The PC reads the high and low nibbles respectively by setting Strobe=1 and Strobe=0 respectively. This seems to be a workable protocol that requires minimal software in the Elf, and makes no assumptions about the Elf or PC's clock speeds. I.e. it is far simpler that a bit-banger serial protocol using EF4 and Q, for example. The hardware to do all this is trivial. I only had to add one chip, a 74HC257 quad 2-input multiplexer to my membership schematics published earlier. What do you think? Mar 21, 2005 > But What kind of program > would it take to work on the PC side,.... I don't know. That's why I feel I'd have to breadboard it, write some code, to find out if it actually works. The Elf side is easy, but all sorts of bizarre stuff can happen in a PC. What I'd try first is to write a program to control the Elf from QuickBASIC in DOS. If that works, then I have the hardware correct. Then it becomes the usual challenges of fighting with Windows for control. Apr 2, 2005 awasson2001 wrote: > While I was looking for some parts the other day I found that you > can get FND500 Common Cathode displays for less than a buck a piece. The LED display itself can be very cheap. Electronic Goldmine (www.goldmine-elec.com) has MAN6110E *dual* 7-segment displays, common anode, 0.56" high digits, #LED1100 for $0.49 each. > for the price of 8 leds for a binary display (@ .25 each) $0.25 each is what I paid for white ultra-bright LEDs. Run-of-the-mill individual LEDs are $0.02 each. > All that's needed is the decoding chips and you're done. Yes. But that's the problem. Hex to 7-segment decoder chips are as rare as hen's teeth, and cost several dollars each. So, most people use the HP or TI hex LED display chips that cost a few dollars each and use 100ma or so. We discussed other alternatives (use an EPROM, or a preprogrammed dedicated micro, or an LCD), but these destroy the "purity" of the classic old design. Plus, there are already several Elfs with the HP or TIL displays. So I didn't feel I need to duplicate them again. Why the fixation on low cost? Just as a challenge; to see how inexpensively one can make an Elf. I think if it is cheap enough, more people will try building one, and perhaps get "hooked" on computing like I did as a kid. Here's a further update on where I stand on my "membership" card idea: - Present design has 9 ICs, spread between two 3.5"x2.125" boards. - The boards stack, and fit inside a Callard & Bowser "Altoids" tin (3.65" x 2.25" x 0.75"). - The top board is the actual computer; 1802, bytewide RAM, 74HC373 address latch, 4013 flip-flop for "load" mode, 74HC132 quad NAND for the clock and misc. "glue". A 16-pin header connects it to the I/O board. The top board also has holes for the switches and LEDs, to serve as a template for drilling the holes in the cover of the Altoids tin. :-) - The I/O board has the switches loose LEDs, input and output ports, and PC parallel port connector. The ICs are 74HC244 input buffer, 74HC273 output latch, 74HC257 mux for the PC port, and 74HC32 for "glue" logic. - Component density is only about 50% on each board, to make them easier to build and solder. However, the two board nest together pretty snugly, component sides facing each other, and the switches and LEDs pass thru holes in the top board to poke out the top of the case. - Ordered a couple dozen 1802's from Arron McLaughlin. They haven't arrived yet. - I already have most of the rest of the parts to build about 25-30. I don't know what the final cost for a complete kit will be, but am sure it won't exceed $50. I'll publish the plans, and will offer bare boards at cost if folks are interested. I have an unwired breadboard, and it's really cute! A tiny Elf that you can drop in you pocket, run off a couple AA cells or even solar cells, and play with anywhere. What do you guys think? May 2, 2005 If you mean my "membership" card, I am still working on it. I am breadboarding one up before layout of a PC board to make sure everything works (specifically, so I can test/debug the ability to control it from a PC's parallel port). May 27, 2005 "craigsherenow" wrote: >> I was wanting to find out what ever happend to the business card >> Elf if any one went as far as to start making and selling them? Andrew Wasson wrote: > I came in kinda late for this project but... I'm really interested > in where it goes. The last posts on the subject I saw were from > Lee Hart who was putting together a little unit that would run off > a pair of AAA cells and I imagine would run at a fairly moderate > speed. I think it was to be pocket sized fitting an Altoids case. Yes, it was me. I'm building a wire-wrap version to test the circuit. It is sitting in front of me as I speak. First, it lets me make sure everything actually fits. The wirewrap doesn't fit in the Altoids box, but it looks like it will actually consist of two boards, with the parts on each facing the other, and stacked about 3/4" apart. Also, I wanted to test the parallel port interface to be sure I picked bit assignments that will work (given the large variations between supposedly "PC compatible" PCs. I do plan to do a PC layout and sell boards and some of the key parts when it is finished. I already have enough toggle switches and 1802s to make a few dozen kits, and the rest of the parts are generic 74HC and so easy to get. So, work is progressing, if a bit slowly. This is a hobby, after all. And, I have other projects absorbing a lot of my spare time -- see www.bestoutreach.com (our Big Race is this coming Saturday, and I'm mentoring two teams!) Jul 24, 2005 Peter de Vroomen wrote: > I am working on a schematic (in Eagle CAD) for my soon-to-be > Cosmac ELF... I thought I'd start by drawing the original > schematic first... For some reason, I just received this post today (Jul 24), though it was dated a week ago (Jul 17). > According to the TIL311 datasheet, the inputs could pull 1mA max. > Should I add the buffers, or can I get away with leaving them out > for the TIL311? The display data pins are driven by the memory chip, not the 1802. The 1802 OUT instruction does a memory read, and also selects the TIL311 so it captures the data. Pretty much any memory chip can drive the TIL311 ok, so it will work without the 4050 buffers. The main reason for the buffers was so you could expand the Elf. It doesn't take long before you have a dozen chips tied to the data bus. Every chip loads the bus a little. Using buffers keeps the TIL311 from using up all the drive just for itself. > the 1802 datasheet it says that on output low, the 1802 sinks 2.2mA, > while at high, it sources -0.55mA. If I understand these figures > correctly, it means that the 1802 will sink 2.2mA when low and sink > 0.55mA when high. This would mean that I at least need some pullup > resistors on the databus, doesn't it? No, not for TTL compatibility. The standard TTL load requires 1.6ma sink, but only 0.04ma source. The 1802 exceeds both of these numbers, so it can easily drive a normal TTL load either high or low. The reason you should have pullup resistors is for lower power consumption and higher noise immunity. There are times when no device is driving the data bus. Without resistors, the lines then "float", and can thrash around aimlessly. CMOS devices with their inputs neither high nor low draw extra supply current. The probably left the resistors out of the original Elf to save parts, and didn't care about power consumption. > the 4050 IC5 behind the RUN switch and the inverter circuits > behind the LOAD and INPUT switches have their output connected > back to the input. Does this do a kind of key debouncing? Yes. Switch contacts "bounce". As the switch contacts bounce open and closed during the transition, the 4050 buffer's output could oscillate high/low, causing logic errors (for example a single push of the IN switch could produce multiple /EF4 pulses). By connecting the 4050's input to its output, the input stays at its last output value during the time when the switch is halfway between positions (when neither high nor low contact is closed). For example, as the switch moves from high to open, the 4050 output stays high. When the switch finishes moving and its low contact actually closes, its resistance is so much lower than the 4050's output resistance that the input if forced low despite the input-output connection. Once low, it stays low even if the lower switch contact bounces open-closed. --