Topics

#MembershipCard #MembershipCard


Matt
 

Curious first timer with ELF and assembly.
Built out a membership card (including extra EEPROM) from Lee Hart's kit, but I don't know how to "RUN a Long Branch instruction to jump to 8000h".  Also, do I need to do that every time I want to boot up?


Bob Kay
 
Edited

"Run a long branch instruction to jump to 8000h" means to enter through the front panel a long branch instruction.  In assembly it would look like this:

    lbr   8000h

The machine language that generates is C0 80 00

Do this by powering up the MC, flip the WAIT and CLR switches up, and the READ/WRITE switch to WRITE.  Now flip the CLR switch down; this resets the system.  Flip the WAIT switch down, this places the CPU in "load mode" which allows you to enter code into memory via the eight data switches.
Enter "C0" into the switches (leftmost two data switches up, the rest down).  Press the IN button and C0 (in binary) should appear in the LEDs.  Now enter "80" into the switches, which is leftmost switch only up.  Press IN again; the 80 should be reflected in the LEDs.  Enter 00 into the switches, which is all switches down, and press the IN button.

Now flip the WAIT switch up, then the CLR switch; it's important to do that in that order.  This should cause the CPU to enter the monitor program at 8000h.  What happens next depends on which particular monitor program you're using, but odds are you just hit the "enter" key on your keyboard.  The monitor will then display its startup messages, and you're off and running!'


Matt
 

So when I power on, the LEDs show F9 (249) and do not change at all when I step through your instructions.  I start with all switches off, then step through what you laid out, but IN doesn't change the display.  Is it even in a state to receive instructions?  Based on what Mr. Hart said in his email, RAM at 0-32k and EPROM is at 32-64k.  All the jumpers are set according to his provided instructions - P2-P3 jumpers set for a 27256 32k EPROM, Vias cut between U2-LO and U8-HI, jumpered U2-HI and U8-LO.

This is my first foray into ELF and Assembly, but it looks kind of like a SEGFAULT of some sort.


Lee Hart
 

From: Matt <@oracledude>
So when I power on, the LEDs show F9 (249) and do not change at all when I step through your instructions.  I start with all switches off, then step through what you laid out, but IN doesn't change the display.  Is it even in a state to receive instructions?  Based on what Mr. Hart said in his email, RAM at 0-32k and EPROM is at 32-64k.  All the jumpers are set according to his provided instructions - P2-P3 jumpers set for a 27256 32k EPROM, Vias cut between U2-LO and U8-HI, jumpered U2-HI and U8-LO.
That all sounds correct. The F9 is just random data (whatever happens to be in RAM on power-up).

Try setting the read/write switch to READ. Then set run/clear to CLEAR, then set run/wait to WAIT. Now press the IN button. Each time you press it, it should read successive (random) bytes from the RAM starting at address 0000.

Bob Kay's step-by-step directions were excellent (he beat me to it).

Do the three programs in the Membership Card manual work? There are step-by-step directions there as well to load and run simple "test" programs.

Lee Hart


--
Excellence does not require perfection. -- Henry James
--
Lee A. Hart http://www.sunrise-ev.com


Matt
 

The first program didn't produce the expected result, then I realized the extra memory was added and not accounted for in the jumpers.  since then, it's always on F9 with no change.  The READ/CLEAR/WAIT/IN sequence hasn't changed anything with the display.  I'm wondering if the vias aren't fully cut through or something.


Matt
 

don't mind the kapton tape. Just using it to not short anything out in the tin.


joshbensadon
 

Matt,

You might also want to look at Youtube, there have been some very nice videos posted by Paul Schmidt and others.
Have a look and see if your unit can follow along the basic entry of data into the memory, simple Q LED program, etc.

Regards,
Josh


On Tuesday, August 25, 2020, 01:34:24 p.m. EDT, matt@... <matt@...> wrote:


Curious first timer with ELF and assembly.
Built out a membership card (including extra EEPROM) from Lee Hart's kit, but I don't know how to "RUN a Long Branch instruction to jump to 8000h".  Also, do I need to do that every time I want to boot up?


Matt
 

I had P2 on 1/2 and 3/4. moved it to 1/2 4/5 and got better results, but then my power jumper loosened up, causing a couple seconds of jitter.  Now I have no lights.  Are there spots I can check with a voltmeter to see if/where I fried it?


Lee Hart
 

Matt wrote:
I had P2 on 1/2 and 3/4. moved it to 1/2 4/5 and got better results, but
then my power jumper loosened up, causing a couple seconds of jitter.
Now I have no lights. Are there spots I can check with a voltmeter to
see if/where I fried it?
Hi Matt,

One step at a time... we'll get you there!

You have a 27C256 in U2; so P2 jumpers should be 2-3 and 4-5, and P3 jumpers should be 1-3 and 4-6. Try that. (The jumper positions are shown in the bottom left corner of the schematic in the manual on page 20).

From the photo, it looks like you have the jumpers at U2-HI and U8-LO in correctly. But it would be a good idea to check with a multimeter to be sure you cut the traces on the bottom of the PC board that used to connect U2-LO and U8-HI.

Intermittent power won't hurt anything. So my guess is that a loose power connection didn't break it.

Are you powering it with a USB-serial adapter at P4? If so, note that P4 pin 6 must be low or grounded to enable the Front Panel LEDs and the 1802's clock. If it's not, that accounts for no LEDs being lit.

Hope this helps!
Lee Hart
--
A designer knows he has achieved perfection not when there is
nothing left to add, but when there is nothing left to take away.
-- Antoine de Saint Exupery
--
Lee Hart, 814 8th Ave N, Sartell MN 56377, www.sunrise-ev.com


Matt
 

Ok, got the LEDs back, thank you for that.  Thought I made another expensive paperweight.

Stepped through the C0 80 00 from Bob Kay, then your follow up steps, but nothing happened.

10 up
09 up
08 up
09 dn
10 dn
1100 0000
IN - nothing happens here
0000 0000
IN - nothing happens here either
10 up
09 up

I've tried both via a usb-serial and just off a battery pack.  After it sits for a bit, IN appears to work once or twice.  Is the low power mode retaining something that a full discharge of the supercap flushes out?

Regarding the serial port - nothing's coming through.  Putty connects using 9600 8N1 but no text or garbled data comes through.


Matt
 

I just ran through the front panel check and everything tests correctly.  IN is oriented the right way, LEDs lit when IN is not pressed and go low once IN is pressed.

A couple voltage and continuity checks on the CPU board's P1 seemed ok.  U2/LO U8/HI traces are gone, tested via a continuity check.  They're jumped U2/HI U8/LO now.


Matt
 

Ok, not sure what clicked, but it looks like it's performing as expected in standalone.  No luck in getting programs input in via the switches, but at least the input and output matches when I hit IN.

Assembly seems to not click in my brain, but I do know BASIC, which gives me some hope, I suppose. 

Now, trying to connect via TTY.  DTR is sending a wakeup, turning Q green, but after I do the lbr 8000h, I get no joy in my serial session.  Enter isn't giving me anything.  9600 8N1, DTR.

After each attempt, I disconnect the USB-TTY adapter to turn Q off.  It looks like just disconnecting doesn't close the serial connection on the MC side.


Mark Moulding
 

The first language I learned was Basic (actually FORTRAN, but Basic is mostly a simpler, less picky form of the same).  In college, I bought a Neutronics Elf, which was very similar to the Membership Card.  The way I got up to speed on assembly for the 1802 was to write an assembler for it, in Basic.  Once I'd done that, including testing my results, I understood the assembly process pretty much inside out.  After that, assembly on other processors wasn't intimidating at all - not because the Elf is difficult (it definitely isn't), but because the mystery of the unknown had been removed.

After that, I went on to write a full-screen simulator for the 1802 (again, in Basic), and finally a Tiny Basic cross-compiler, once again in Basic.  I was an EE, not CompSci, so I pretty much invented each step as I went along.  Most things were pretty straightforward, but the expression analyzer for the Basic compiler took a bit of work.  I finally did solve it, but in a totally non-traditional way (I eventually took a compiler course, using the Dragon book for any CompSci majors out there).  Instead of building a tree of tuples by reading characters looking for terminators, I recursively solved the innermost parenthesized expression by processing strings, until everything was solved.  The results of each recursion would go on the stack, and then I just unwound the stack generating code as I went.  (Yes, recursion is possible in Basic - you just need to handle your own stack of the "local" variables.)  The idea of using an intermediate P-code didn't occur to me, but would have made the code generation a lot easier.

So, in short, please don't be intimidated by assembler - it's really very logical and, especially on the 1802, very basic (so to speak).  The biggest hurdle will probably be the mechanics of getting the first program working (the perennial "Hello, World" program).  On the 1802, that's probably something that blinks the Q LED, or perhaps makes it follow the EF4 flag (which is the input button).  The first step to is write out the few instructions by hand (or type them, if that's more comfortable).  Then, assemble them by hand into the machine code (hex digits), which you can then manually load into the 1802.  Once you've successfully done this, you're off and running!
~~

Mark Moulding


Lee Hart
 

Matt wrote:
Ok, not sure what clicked, but it looks like it's performing as expected
in standalone. No luck in getting programs input in via the switches,
but at least the input and output matches when I hit IN.

Assembly seems to not click in my brain, but I do know BASIC, which
gives me some hope, I suppose.

Now, trying to connect via TTY. DTR is sending a wakeup, turning Q
green, but after I do the lbr 8000h, I get no joy in my serial session.
Enter isn't giving me anything. 9600 8N1, DTR.

After each attempt, I disconnect the USB-TTY adapter to turn Q off. It
looks like just disconnecting doesn't close the serial connection on the
MC side.
Hi Matt,

Sounds like you're making progress! :-)

Intermittents:

Chuck Yakym mentioned something to me that is worth checking. See if you can slide a piece of paper between the two stacked boards. Nothing should touch between them except the 30-pin P1-J1 connector, and the two threaded standoffs for the 25-pin J2 connector.

If the pins of the P2 or P3 header on the CPU board are too long, or if any pins hang down too far on the Front Panel, they can cause shorts and erratic operation. Clip them as shorts as possible.

Here's a trick I use: I clamp my belt sander upside down in a vice, and use it to sand down the bottoms of each board to shorten the pins.

Green LED:

The green LED is an indicator for the state of the EF3 pin. It comes from your *external* serial input; either RX on P4 (TTL), or RXD on J2 (RS-232). It should be OFF when your serial input is idle, and ON when you send serial data to the 1802MC.

If your green LED is on all the time, then your serial connection has the wrong polarity; and that's why it's not working.

What are you using for your serial I/O? Is it a real RS-232 serial port; if so, use J2. Or a USB-to-TTL serial converter; if so, use P4.

Lee Hart


_._,_._,_
------------------------------------------------------------------------

--
A designer knows he has achieved perfection not when there is
nothing left to add, but when there is nothing left to take away.
-- Antoine de Saint Exupery
--
Lee Hart, 814 8th Ave N, Sartell MN 56377, www.sunrise-ev.com


Mark Moulding
 

The belt sander trick sounds good, if a bit terrifying...
~~

Mark Moulding


Paul Schmidt
 

Having built all of Lee's kits, my experience has been that the only things necessary are good soldering technique (don't apply excessive solder to the joints) and a good pair of flush-cut electronics cutters.

Sent from my Verizon LG Smartphone

------ Original message------
From: Mark Moulding
Date: Mon, Aug 31, 2020 2:40 PM
Cc:
Subject:Re: [cosmacelf] #MembershipCard

The belt sander trick sounds good, if a bit terrifying...
~~

Mark Moulding


joshbensadon
 

Power tools in a vice?  What can go wrong???  🙂  But, my 2 cents.  I use a cut off disk on my dremel to do the same thing... just a few pins at a time.  

PS. Always wear eye safety! no loose clothes, etc...  


From: cosmacelf@groups.io <cosmacelf@groups.io> on behalf of Mark Moulding <mark@...>
Sent: Monday, August 31, 2020 3:39 PM
To: cosmacelf@groups.io <cosmacelf@groups.io>
Subject: Re: [cosmacelf] #MembershipCard
 

The belt sander trick sounds good, if a bit terrifying...
~~

Mark Moulding


Matt
 

So I have non-conducting kapton tape on the back of the top board, removing the possibility of any shorts there.  I have the altoids tin lined with tape so nothing shorts there either.

I'm definitely using TTL on P4.  Been way too long since I actually had a serial port on a pc.  Tried a different cable, which actually had the pinout in order, minus GND being where your key is.  Popped that out and moved it to ground.  The LED turns on when putty connects to the port, and about 5-10 seconds after I close puTTY, the light goes off.

I keyed in "PROGRAM 3" and when I ran it, toggled switches printed various ASCII chars in the console, even going in reverse in certain combinations.  This leads me to believe serial comms are working ok.  I tried the ol' lbr 8000h and still can't get any sort of CLI in the serial connection. 

The 32k expansion has the stuff I need already loaded, right?


Hans Liss
 

Matt,

I noticed that the ROM doesn't look fully inserted in the photo you sent a while back. Has that been corrected? Those low-profile sockets can be a bit difficult.

/Hans

On 2020-09-01 05:06, Matt wrote:

So I have non-conducting kapton tape on the back of the top board, removing the possibility of any shorts there.  I have the altoids tin lined with tape so nothing shorts there either.

I'm definitely using TTL on P4.  Been way too long since I actually had a serial port on a pc.  Tried a different cable, which actually had the pinout in order, minus GND being where your key is.  Popped that out and moved it to ground.  The LED turns on when putty connects to the port, and about 5-10 seconds after I close puTTY, the light goes off.

I keyed in "PROGRAM 3" and when I ran it, toggled switches printed various ASCII chars in the console, even going in reverse in certain combinations.  This leads me to believe serial comms are working ok.  I tried the ol' lbr 8000h and still can't get any sort of CLI in the serial connection. 

The 32k expansion has the stuff I need already loaded, right?


Lee Hart
 

Hans Liss wrote:
Matt,

I noticed that the ROM doesn't look fully inserted in the photo you sent
a while back. Has that been corrected? Those low-profile sockets can be
a bit difficult.
That's a good point, Hans. The sockets I supply are high quality Mill-Max parts that cost more than the ICs. They have four gold-plated fingers that grip the IC pin on four sides.

As a consequence, they are very tight; especially the first time an IC is inserted.

Look closely at the IC in its socket. YOu should not be able to see any of the thin part of the IC's pin -- all of it will go inside the socket.

Also make sure none of the IC pins bent or folded under the IC instead of going in the socket. These create intermittents that can be hard to find!

Lee Hart

--
A designer knows he has achieved perfection not when there is
nothing left to add, but when there is nothing left to take away.
-- Antoine de Saint Exupery
--
Lee Hart, 814 8th Ave N, Sartell MN 56377, www.sunrise-ev.com