??? 03/25/06 23:36 Read: times |
#113090 - There's another approach Responding to: ???'s previous message |
How about TWO SRAMs, 64Kx8 each, and whatever 64Kx8 or other size FLASH you want. Externally decode I/O space so you can recognize when the entire code space has been copied onto itself, such that the FLASH is selected by nPSEN and the external data RAM, just one of them, is selected on writes, i.e. when nWR is active. Once a write to 0xFFFF has happened, the FLASH goes away, and the current SRAM becomes write-protected. Concurrently, the second SRAM becomes Read/Write memory. Now decode the top 8 locations in DATA space, i.e. drive the inputs on a 74133 or PAL with A(15..3) and use the output as nIO. Use nIO and A(2..0) to drive the nG1A inputs on two 74138's, and use nWR and nRD to drive the nG1b inputs. Use nPSEN to drive G2. Now you have eight nRD and eight nWR outputs timed with the MCU read and write strobes. Those will be useful for various things, not the least of which will be turning enabling the read and write to the program space RAM. Now, I'd use a CPLD to do all this decoding, etc, so I can do some of the tricks inside in buried registers. You don't have to do things this way, but a CPLD will allow you to change the interconnections as well as the logic without ever changing a wire.
Those SRAMs should cost about $0.80US each in handfuls, and 32Kx8's cost $0.45 or so as of my last buy, though that was 3 years ago or so. Do something imaginative, e.g use a DS89C4x0 type rather than a "garden-variety" MCU. Those can run slowly enough so you can use slow external peripherals if you must, but I'd recommend against it. If you must use old and slow, be sure to look at the 8155 and 8156, both of which were intended for use with the old-slow 805x rather than the earlier and slower 8080, as was the 8255. The 8155/56 have identical features except for the chip select, which is '0' on one and '1' on the other. If that doesn't suit you, have a look at the NMIY-0031 board at http://www.newmicros.com/index2.ph...DNMIY-0031 You'll see that they already have most of what you've mentioned, except for the ancient silicon that's not readily available any longer. That board comes with a debug monitor and jumpers in place for memory configuration. It also has an LCD plug and a place where you can attach a 4x5, or fewer, matrix keypad. Additionally, it is RS232C and RS422/485 capable. The cost in single quantity is just under $40 US, and I doubt you can build a wire-wrapped version for much less than that if you include the cost of analgesics, laxatives, and spirits to get you through the task of building the first one. Of course, you can put a pair of 8155/56's on that board, or a couple of 8255's. You can also put on an 8259 if you must. Keep in mind, however, that the 82xx's will limit the speed at which you can run your MCU. Don't pay attention to the naysayers who claim you can't build a good circuit the first time out using wire-wrap. It takes many years to learn proper PCB design and most of the layout types never learn. Building PC board is not cheap. Fixing mistakes, or revising them isn't either. ON wire-wrap it's easy and costs nearly nothing. It's no easier debugging firmware/software on PCB than on a wire-wrapped circuit. I did very decent work when I was a beginner. You can, too. RE |