From: jlb31348@uxa.cso.uiuc.edu (Jim Brain)
Subject: TECH: U o' I PGSI Special Update (Grin)
Originator: hlab@stein.u.washington.edu
Organization: University of Illinois at Urbana
Date: Thu, 17 Dec 1992 18:38:03 GMT


Yea, I know I told you I was shutting down the news feed for the semester,
but I have one more update.  (Hmmm, Jim, what could that mean ?)

Before you read on, I want you to do a few things for me.  Sit back,
relax for a minute, get in a peaceful state of mind, and then hit the
space bar for nn, or whatever for rn



The PowerGlove Serial Interface (PGSI) is ..... ALIVE!!!!

I managed to work on it during finals.  (Boy are my grades gonna suffer for
this).  I did not want to study, like everyone else, so I set out to get this
thing finished.  Let me first tell you what had been done before this week.

I had taken pg.asm from the Menelli code and extensively modified it to the
point where it both did not look the same, and did not work. (Go figure)

I had completed the soldering on the first PGSI board.  No error checking.

So, on Monday after my first exam, I re-downloaded pg.asm from the
Menelli stuff and re-modified it, putting all the lessons learned last
time to good use.  The first thing I did is put in the interrupts for
the seial port, then added the AGE command set, then modified the
packet length to give all 9 bytes of info, then added the interrupt
that does the 400 Hz for the SEGA glasses.  After all that, I decided
to try once more to get the PG read part of the program in to an
interrupt (I tried once before and it died).  I put in the code, and
IT WORKED.  So then, I added in the ADports and all the rest of the
PGSI stuff, excluding the two glove support.  Then I started working
on the actual board after I got that working.

After most of last night determining all the traces that were broken
and trying to figure out how to program an HC11E2, I popped a chip
into the socket on the prortype, and fired it up.  IT DID INDEED FIRE
UP.  Never before had (beep, beep, beep, beep, sift click .....) been
so musical.  I spent the rest of the night cleaning things up, and
working on the rest of the circuit, namely the SEGA part.  Now, to
tell you what I have.

The GLOVE part works.  Now, before I had some major glitching, but
that is all gone now.  How did I get rid of it?  Well, this may sadden
some of you, but I set the interrupt to only occur 23 times a second
for polling the glove.  I spent this morning trying to figure out the
maximum times, and here is what I found:

Glove with fingers out :        Max 27 frames per second
GLove with fingers all in:      Max 23.1 frames per second

If someone can get more than 27 frames per second, buy their device. The unit
will operate at higher frequncies, but the program  works as follows:

        Check for 0xA0
        Get rest of packet.

If you operate at a higher frequncy, it just checks for the A0 char more
often before receiving it. So, I am afraid those are the times for now.
maybe I will figure out a way around it.

Although I have not done this, I think I will set the interrupt to fall to
23 /sec when the fingers are below a certain threshold, and go up to 27/sec
when they are above the threshold.  Tell me what you think.  It only happens
when all 4 fingers are completely closed.

Now, this posting is not the BIG Posting.  The unit is not done competely.
I still don't have the SEGA circuit working completely, but I feel that is t
trivial compared to the complexity of the PG.  For the technical minded, I
do have a 400 square wave out of the HC11, and the 4030 seems to be working
OK, but the SEGA glasses dim BOTH lenses when I activate either pin.  I think
it is just a short.  Yes, the voltages are there, just not in the right order.

Now, I have been working on all the small details with selling this these
past few days, but I am not ready just yet.  However, I wanted to post this, so
all those who thought this thing would never make it can recapture some
hope.  It is still not over (knock on wood), but I am a lot closer today
than I was on Monday.  And when I say NO GLITCHING, I mean it.  This baby
is rock steady.  

Here are some questions:  Please answer if you want to.

Do you think it is better to do 27/23 frames, 27 all the time, or 23 all the
time, or have a command switch ?

I ditched the ability to do all kinds of goodies from the keypad, I am going
to put in a command to reset to defaults and switch to Menelli with some
key combo.  I think that is helpful.  Reason, the code wouldn't fit in 2K of
EEPROM.  Does this bother anyone ?

I am going to try the 9.843 MHz crystal tomorrow while I pack.  Anyone need
38.4 Kbps ?  I am not even sure it will work.

I am thinking of ditching the code for the SEGA square wave frequency change 
Anyone ? Anyone ?

I will try to put in two glove support in time, but the code is fuctional now, 
so I saved it in a backup file.

I am thinking of putting a character delimiter between the original
packet stuff and the extension.  Anyone like this idea?

All the AGE commands are still supported.  IS there asnything I missed?

So, things are lokking great (If I would have had your phone numbers last night,
I would have called you all, I was so excited when it worked.

However, I do need to study for my last final tomorrow morning, and then I wil
be going home to finish the manual and write some demos.  Also, I will try to
tackle the faster crystal and the two glove support.  I will
also get the SEGA stuff finished.

Just thought you might want to know.

Jim (relieved) Brain

-- 
Jim Brain                           "If you build it, they will come."
brain@cs.uiuc.edu
Senior, Computer Engineering                                    Field of Dreams
PowerGlove Serial Interface Designer and Co-Project Leader.                     
University of Illinois at Urbana-Champaign       Dox available on request
Newsgroups: sci.virtual-worlds