Re: [cosmacelf] Membership Card-2k
- Super cool mark, thx for posting.
On 2013-09-29, at 10:42 PM, "Mark G Thomas" <mark@...> wrote:
I just posted more pictures (once approved by the moderator), detailing
completion of the project by installing it in a small project case case,
with a home-made Lexan front panel, rechargeable batteries, a MAX232
de-9 rs-232 interface, and charger/regulator electronics on some perfboard
the size of a postage stamp. This ended up being a tighter fit than
I expected, but with care it all fit!
The MAX232 card still required a logic inverter (to remain compatible with
the unmodified elf2k ROM), so I glued a 4093 upside down on top of the
surface mount MAX232. The interface cards were qty 5 for $12 + $2 shipping
on e-bay from China. I also used a CP2104 USB to TTL serial adapter for
some preliminary testing. These are less than $3 each on e-bay, have both
Mac and PC drivers, and might be more desirable for others than rs-232.
I used a LP2950CZ-5.0 low-dropout 100ma 5vdc regulator and the necessary
caps, diodes, and resistor, to power the membership card at 5VDC, and
provide a current limited (~7.5V) trickle charge to the 6 AA cells. This
is not the ideal way to charge NiMh or even NiCd batteries, but I'm sure
the cells will last for years anyway. I guess I should post schematics for
the ROM wiring, the serial interface module, and the regulator/charger
module. This charges the batteries and/or powers the membership card
from a 9VDC-12VDC wall wart.
The plastic case (270-1805), six NiMh AA batteries, and the DPDT mini
toggle switch came from Radio Shack. The Lexan for the front came from
Home Depot. I also ended up mounting a small SPST switch above the DC
power jack, after having odd results getting the membership card to
consistently sleep at <1ma.
I wanted it to be battery powered and self contained, but with the serial port
provides an easy way to load and even develop software, thanks to the awesome
collection of utilities on the 32K elf2k ROM chip that sits piggy-back on
the membership card's 32K SRAM.
On Sat, Sep 14, 2013 at 03:18:14PM -0400, Mark G Thomas wrote:
> I'm extremely excited about my latest Membership Card modification!
> Please see the posted photos.
> I installed an Elf2k ROM (from Spare Time Gizmos) on the Membership
> Card. I soldering it piggy back on the RAM, and adding a transistor
> and resistor. It works wonderfully, with no further modifications to
> the card needed. The chip adds some thickness, but not much, and my
> planned enclosure is deeper than an Altoids tin anyway.
> For testing I used an el-cheapo USB to TTL serial adapter and a 4093
> wired as an inverter to the Q and EF3 lines for a serial port. I
> believe the DE9+MAX232 interface I plan on using in my final enclosure
> probably won't require the 4093.
> I'm tempted to install a faster xtal clock oscillator instead of the
> ceramic resonater oscillator. With the stock oscillator, the ROM
> serial port auto-baud detection works fine at 1200 bits per second.
> There has been plenty of discussion here about using a parallel port
> or other custom hardware to facilitate Membership Card software loading
> and development. This serial/USB solution seems to me like a simpler
> and easier way to go. To launch the ROM Monitor, I toggle in a LBR 0x8000
> (C0 8000), then flip the switches to RUN.
Mark G. Thomas (Mark@...)
On Sun, Sep 29, 2013 at 08:27:08PM -0700, David Keith wrote:
> Thank You Mark, job well done !!! I just ordered the CP2104 USB to TTL
> serial adapter. I am glad to see the drivers at their site listed on
I just posted crude but hopefully legible schematic drawings of the additions.
Here are some additional notes:
I carefully bent back pins 1, 20, & 27 on the ROM then soldered all
the remaining pins in parallel with the corresponding RAM pins.
ROM pin #1 needs VDD, which I jumpered to nearby pin #28.
ROM pin #27 needs to go to A14, available on P3 pin #6.
ROM pin #20 goes to the drain of the additional transistor, and a 100k pull-up.
1x AT27C256R-45PU OTP ROM (programmed with elf2k v88)
1x MOSFET, N-channel 2n7000 Jameco 119423, same as original Q1
1x 100k 1/8W resistor
RS232 or USB interface:
2x 10k 1/8W resistors
1x 4093 quad 2-input NAND gate (wired as a level inverter)
1x either a CP2104 TTL/USB converter or a MAX3232 TTL/RS232 converter.
(These are less than $5 on e-bay.)
To launch the ROM monitor, load in: C0 8000, then CLEAR, then RUN. The card
then performs the elf2k initialization tests, leaving a 0x16 on the LEDs,
waiting for an ASCII CR on EF3 for auto-baud detection, before outputting
the startup screen on Q. Mine works fine at 1200 and 2400 baud, running at
5VDC, with the maximum membership card clock speed.
Elf2k manual: http://www.sparetimegizmos.com/Downloads/Elf2k.pdf
Elf2k ROM contents: http://www.sparetimegizmos.com/Downloads/v88.hex
Mark G. Thomas (Mark@...)
- I added a trace profiling function to my visible 1802 emulator. It's a bit crude but if someone needs it...I've spent a few hours looking at the generated code for the dhrystone benchmark and running the profiler on it.When I started, each pass thru the benchmark executed 7,150 1802 instructions. At roughly 100k instructions per second that clocked 14 Dhrystones per second.I got a huge improvement by recoding one library routine in assembly and by tweaking the multiply routine to perform better if one of the operands is small(which happens a lot for subscript calculations). Those two changes got me down to about 5300 instructions or 18.8 dhrystones/sec.I have a simple peephole optimizer which I've used to implement eight or nine special cases where the compilers code could make better use of the 1802. These just have way less impressive payback - each one removing maybe 10 or 20 instructions. out of the 5,000 odd. It's also disappointing that they have almost zero effect on my other self test benchmark so they may not be general at all.I'm shutting down for now with my best effort being 5,198 instructions/pass or 19.2 dhrystones/sec. I'm still targeting a 50% improvement(3575 instructions) but I'm not sure the peephole stuff will get me there.(Outlook consistently wants to correct dhrystone to rhinestone, by the way, so when this version of the compiler is ready it will be released as the Rhinestone Edition.)