geekhack

geekhack Projects => Making Stuff Together! => Topic started by: gator456 on Sun, 17 October 2010, 23:48:57

Title: DataHand Upgrade Project
Post by: gator456 on Sun, 17 October 2010, 23:48:57

At the beginning of this year my RSI became severe enough that I had to do something.  I tried a Kenisis contour and a Goldtouch split keyboard.  Neither of these provided the relief I was looking for.  I got lucky and found a used DataHand Personal on Ebay.  I was able to get a unit in pristine condition for half the price of a new one (at this price I could resell it for close to what I paid, if needed).  The difference with the Personal is that it has a fixed QWERTY layout whereas the professional allows reprogramming of 20 keys.  The current model also has USB whereas mine has P/S2. 

Learning the DataHand was pretty difficult.  After 20 years of touch typing you don’t really think about key locations.  However, like most things in life, it was mastered with time and persistence (my RSI also kept me well motivated).  After about 4 weeks I was using the DataHand part time and after 6 months was at 45 WPM (I was at 55 WPM on a traditional keyboard before I started).  During this period I found some things with the DataHand key layout that I, personally, found sub-optimal.  At this point I had a choice.  For $180 I could have upgraded the unit to the Professional firmware to enable key reprogramming and resolved most of my issues.  Or I could build my own controller.

I have am a EE by trade with many years of software and electronics experience.  I innocently decided that designing my own controller would be a easy, quick project.  The electronics part was easy but this was my first embedded software project.  I have learned a lot and it has been fun, but writing Embedded C code was neither quick nor easy.

I searched the internet and found several keyboard projects based on the Atmel AVR platform.  Because of these examples I picked the AVR.  (I learn best from examples)

My first task was to reverse engineer the DataHand.  I found that to be a fun challenge.  The DataHand consists of 2 halves with 26 keys each.  The DataHand used optical couplers instead of physical switches.  This helps reduce the key force but also eliminates ghost keys.  The two halves combine to create a single 13x4 keyboard matrix.  The DataHand has a large 15 pin DIN cable to connect the left and right halves (The large cable is one thing I plan to streamline).  There is one good thing about the 15 pin DIN cable: it makes a great debug port.  (You see I have only one DataHand and I did not want to take it apart every time I wanted to work on my microcontroller.)  So, in the evening I would just unplug the left hand and reconnect it to the 15pin DIN on my breadboard.  This allowed me to do about 90% of my code development with the DataHand fully assembled.

My first AVR was the ATMega644 but I could never get the USB working.  I then discovered the Teensy2.0++ from pjrc.com. 
(https://lh3.googleusercontent.com/19JqU2An7fJuewz05T2FAj6XIasYZqye_Dt0rEMewvy2_8V6mdsj9NK7qqC7d0hYu9xroke13Crx54SPDLAeK6twBPhv2Km_mSdBwFZDZ9rApZGtRlZku8fzJG6YziSGrl2nfOSwhso=w2400)
The Teensy is fantastic.  It gave me an AVR with a ton of IO in a 40 pin DIP foot print and an onboard USB connector.  Pjrc also included some debug utilities which turned out to be a real live saver.  The DataHand uses a 40 pin 8051 as the microcontroller. 

(https://lh3.googleusercontent.com/VSRNaX350JQp2HQ3VVZK1dw6mikUGRbYOVDBHCercM3LyQGQg_q3i8NDtVlYE3P2ZmlWNVPa1bZ36uJThJ8T7WFhgEC6D-3cgPybOdlL1FXCZ1a-7EMYfaw3nrLuBeRdhmB_N-L66JA=w2400)

I was able to make an adapter using a 40 pin dip socket. 

(https://lh3.googleusercontent.com/H1Y2nZLThj3qhKCjgfOSDb5IvdDH25sQYzS-i7JxBERMgvnOYfWxtN1rdVkgb7L3U8aIkREIYbIi3NF3mFZJrZOOAGkRYDVcpByEO-TQjABcadNPrT8LAV67xsawmQG__aJA79Z32EQ=w2400)

With the adapter I can plug the Teensy directly into the DataHand circuit card. 

(https://lh3.googleusercontent.com/OWCoxZD2zsGm_GTDYOZQ00okWL_4YBL0iw762C1mIjTqI1wrpucKB3nFgW2WleRhXM3U_Aw5qGvo2YqwOBrI8zJbwYBwQM_YBlaOrDO6WIDk7OuYwLxchwV_U0halB1yHZN0iJ-BN8M=w2400)
This was soooo much easier than making a new circuit card.  Right now the cable for the Teensy snakes out the top, but eventually I will run it out the back.

(https://lh3.googleusercontent.com/QNJ0Xat7rpkSGxLhCwTEpQSrk8x20JnN_pgGha4jGPmTkaIwj-XgSFRyCrsXIwVv5_g4FZMF-2SLOVuZc-6dUH0gaqniWEr1ODZHH8bKcnv6jMA4CJyk00hOr-TDzUwFbHK-3MCCcEg=w2400)

At this point the project has the following:

The new layout I have settled upon is below.  I highlighted in green the keys I moved.  This text is very close to what my Perl script reads in.

(https://lh3.googleusercontent.com/U-N5yeSK5APXNtjl7VbZToslz_83CZyVfcXNsC-ftMfqTBr_MOtfGXYB3e7yTqu7VXxfremxi1dCaAky7MsKMDVrflVOZzSDuLqluCs_egYp_gGWZKJauIlccSHfKaZzPc6fycW98dM=w2400)

The things that drove my new layout were: 

With this problem solved I went after the only real shortcoming I have found with the DataHand: the mouse.  Don’t get me wrong, the DataHand is a fantastic keyboard.  However, I tried the built in mouse keys but they did not work well for me.  It was like walking through Jell-O.  I tried adjusting the speed of the mouse keys, no luck.  I tried several things to solve the mouse problem:  I first moved my external mouse to the left side (This gave a much needed break to my right hand).  Next I purchased an ergonomictouchpad.com (recommendation from a DataHand user).  This is a good device, but I could not find a good place to put it.  The last thing has been the best.

I mounted a trackpoint from a IBM KPD8923 just below the ‘c’ key. 

(https://lh3.googleusercontent.com/i0qa1OfilYnLjktC3-OW5wilVXMC93f-fgzESS4qPrurCI3uoFNJyNwfYGLQLzpAjHKU0ks-IpxCVOw6Yn1ky7Vlzk8pWHfRBYRCqCwO4WfS0jdCnxSM20FpiUuLKIjS2PMUuilPDek=w2400)

(https://lh3.googleusercontent.com/QXWCNFBr9FLasyh09zpcPlvyA-fop5jiPvHZNalCCuaKAcBIJGxlPoTq70FjViKMQy6Q5S66gTvlmeznM4tH-TanTs9nFxEVDUSXylspnxUxisZscZNCHG7Opis-WgBhhXe_NVS06VQ=w2400)

As you can see, the mounting point is over the edge of the DataHand PCB.  So, I had to create a mounting plate.  Here is how the TP is held in place on the IBM keyboard.

(https://lh3.googleusercontent.com/pyFjDNrvFLsf6lu9GXVr4jiwHsK6oph2277tTNRyitghTy9qWz_zqfE9lUOVHN66AJrd-uKHhEQvrBRStx2HS7hlIg-5TxBwF6ukR9u9o0yCjTw_vApYYtWXT9ReMf_f5AsOjZPmhfw=w2400)

I cut out the chunk to which the TP was mounted.  I then mounted this on the backside of the DataHand circuit card.


(https://lh3.googleusercontent.com/wivR09rozFThKaXGPP_96viJ9JS_yioq6Ph8QP1edOlrClAwtCUCNwm0cFx_ANPpjEhRiyw3aUJ88sOIrLbusy4FAS_ASZKHncI_bYxe-1OVFyu2YJyxR1NihgTpxTvATmVT_bZrVRo=w2400)

It has been in place just a few weeks and I am really liking it.  The addition of the trackpoint makes the DataHand a comprehensive keyboard/mouse solution.  I just have to move my middle finger a small distance from the home row to access it.  I have the 3 mouse buttons assigned to the right hand.

Some things I would like to do in the future:

The DataHand at my desk

(https://lh3.googleusercontent.com/c4KW4kvwkLE5JtlTUBNcb_iJpRw2tvfeJjx_lOENpBT04uIhBLO_-w0bO0bEzOJ8DEN4PgiYa_H3YN9KG0RsGTioye5FHgRNjiSHLuGIlU7bCJfT6o4vEN6pvvdO3IVjyeFRTVpV31M=w2400)

[/FONT][/SIZE]
Title: DataHand Upgrade Project
Post by: itlnstln on Mon, 18 October 2010, 07:23:52
Awesome!  Great job.  You have more balls than me modding something as expensive as the Datahand.  I wonder if Webwit has seen this (I think he has the upgraded one, though).
Title: DataHand Upgrade Project
Post by: kriminal on Mon, 18 October 2010, 07:50:17
yeah some pretty impressive stuff..
way above what im currently capable of right now.
Title: DataHand Upgrade Project
Post by: unicomp on Mon, 18 October 2010, 08:04:33
Amazing. I really want to try a DataHand but they seem fairly unavailable unless you want to spend circa $1000 on one.
Title: DataHand Upgrade Project
Post by: Rajagra on Mon, 18 October 2010, 09:44:35
Excellent work! Getting the Trackpoint in in such a tidy way is amazing.
Title: DataHand Upgrade Project
Post by: lowpoly on Mon, 25 October 2010, 07:13:49
Quote
Design a PS2 -> USB controller so I can add acceleration to the TP

In theory it should be possible to feed the TP into some unused Teensy pins. There are some libraries availabe at avrfreaks.net, IIRC.
Title: DataHand Upgrade Project
Post by: gator456 on Tue, 26 October 2010, 22:02:32
The Teensy I already have in there could be used...  The problem is the Teensy is in the right hand box and the TP is in the left hand box.  There are some un-used wires in the 15 pin DIN but they are connected to ground.   I would have to cut traces on the the datahand.  Dont want to do any more than I have to.

I have written some very crude Teensy code to read the PS2 and send it back out the USB.  The problem which I debugged but did not fix, was the USB host would eventually issue an interrupt while the controller was reading the TP.  Then it locked up.

I have done some experiments with the AVR's 2wire protocol (very cool stuff).  I was able to setup a 2wire interface between a ATMEGA644 and the Teensy.  A key press on one controller would light up an LED on the other.  My thought would be to design another left hand control board that would use a 4 wire cable, like USB, to communicate between the left and right half.  Then I would have the horsepower and pins to read the TP.
Title: DataHand Upgrade Project
Post by: lowpoly on Fri, 29 October 2010, 05:09:30
Quote from: gator456;239204
I have written some very crude Teensy code to read the PS2 and send it back out the USB.  The problem which I debugged but did not fix, was the USB host would eventually issue an interrupt while the controller was reading the TP.  Then it locked up.

Do you think it would be possible to fix it?

Quote
Show Image
(http://i1184.photobucket.com/albums/z335/gator4567/geekhack/dh_tp2.jpg)

I had that same sheet metal left over from my miniguru mod. Tough stuff. Hand lever shears, however, cut it like the proverbial hot knife cuts butter.
Title: DataHand Upgrade Project
Post by: zefrer on Fri, 29 October 2010, 09:03:49
There is some ps2 reading code for the Teensy++ here (https://code.google.com/p/diyps3controller/source/browse/#svn/trunk/ps-2) that reportedly works ok.

In that code repository he maps the PS2(port) events to the ps3's usb controller events. You would need to map them to USB HID events instead for use with the datahand.
Title: DataHand Upgrade Project
Post by: gator456 on Fri, 29 October 2010, 09:16:08
Yes it can be fixed.  Just Software.  My skill with embedded C and timers is pretty weak.
Title: DataHand Upgrade Project
Post by: geoffff on Fri, 28 October 2011, 13:42:14
gator456 (http://geekhack.org/member.php?3654-gator456), that's awesome (http://blog.makezine.com/archive/2011/04/the-awesome-button.html)!  I'm seriously thinking of doing this to one of my DataHand keyboards, so I can use it on a Mac.  To use it with a Mac I'd need to convert it to USB, and add a third modifier key (Control, Command, Option).

Would you mind sharing the details of your Teensy microcontroller code?  Also, the 40-pin socket converter -- did you have to jumper-rearrange more pins than that?  It looks like you only moved GND or something.
Title: DataHand Upgrade Project
Post by: froot on Sun, 30 October 2011, 03:58:28
Geoffff,

I am not the OP but his post inspired me too and I have built a very
similar adapter.

The hardware part is fairly simple. With the right orientation the 40
pin socket converter can be used with an almost 1-1 mapping, I only
had to use jumper wires for one of the data pins and GND. This results
in a somewhat jumbled data pin arrangement on the teensy side but to
me the simple hardware was worth a little ugliness in the code.

I wrote my own firmware based on the teensy HID examples. Like you I
also badly wanted an extra modifier so I made the F thumb shift
non-modal and used the now free N thumb shift as the "GUI" HID
modifier which shows up as Super under Linux.

I made a couple other minor tweaks to the layout involving Q, DEL, ESC
and KP_ENTER but this would be easy to change back if desired. I
haven't implemented the numpad mode and the built in mouse controls
because I never used them. I made some effort to ensure that the
various key Shift/NAS press/release sequences that I tend to use
during quick typing work right so to me at least the new firmware
feels less glitchy than the original.

I can't figure out how to make the forum accept the URL so just
google for "dhteensy github"
Title: DataHand Upgrade Project
Post by: gator456 on Mon, 12 December 2011, 11:10:18
To all

I am sorry for being silent for so long.  Work was pretty crazy for awhile and I have 4 kids.  Both get priority over the DataHand :-(

I have a second datahand  (ebay aprox. $500).  I have now build my own circuit card for the left and right hand units.  It eliminates the bulky 15 pin cable and uses a two wire serial interface.  The firmware has progressed since my last post.  I can adjust the speed of the mouse keys and wheel.  ( still dont use DH mouse)

I can now remap keys and record macros.  I have 2 layouts.  It has a command mode.  It can print the layout:

Command List(case insensitive):
  L - List commmands (prints this list)
  I - Status of internal variables
  K - Reprogram a key
  O - Reflash firmware

  P - Print active matrix
  7 - Print bank 1
  8 - Print bank 2

  E - Increase mouse wheel speed
  C - Decrease mouse wheel speed
  R - Increase mouse slow speed
  v - Decrease mouse slow speed
  U - Increase mouse fast speed
  M - Decrease mouse fast speed
  . - Exit

It seems the forum removes the spaces:

     \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
NORM \        +----+               +----+               +----+               +----+
NORM \        | Q  |               | W  |               | E  |               | R  |
NORM \ +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+
NORM \ |Del | A  | [  |     |Esc | S  | B  |     | `  | D  | T  |     | '  | F  | G  |     |Rtrn|Lshf|Tab |
NORM \ +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+
NORM \      | Z  |               | X  |               | C  |               | V  |          |NORM|Lshf|Lctr|
NORM \      +----+               +----+               +----+               +----+          +----+----+----+
NORM \
NORM \
NORM \
NORM \                           +----+               +----+               +----+               +----+
NORM \                           |MACR|               | I  |               | O  |               | P  |
NORM \ +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+
NORM \ |Lalt|NAS |FUNC|     | H  | J  |MB1 |     | Y  | K  |MB3 |     | N  | L  |MB2 |     | ]  |  ; | \ ?|
NORM \ +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+     +----+----+----+
NORM \ |Bksp|NAS |Spac|          | M  |               | ,  |               | .  |               | /  |
NORM \ +----+----+----+          +----+               +----+               +----+               +----+
NORM \
NORM \  
     \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Title: DataHand Upgrade Project
Post by: Input Nirvana on Mon, 12 December 2011, 12:18:32
Wow. So with key remapping, 2 layers, and macros, this sounds similar to the Kinesis Advantage controller, and HumbleHacker. It also sounds like the GH-project-that-shall-not-be-done, which basically is to have a controller that can be 'added' to any keyboard and have the sophisticated functionality you have now listed. Interesting overlap...except that you are actually doing it.

I'm thinking that your controller should be a Group Buy :)
Title: DataHand Upgrade Project
Post by: geoffff on Mon, 12 December 2011, 17:00:10
I just now found that there's a 2nd page of comments here answering my questions -- whoops!  :)

Thanks so much, Froot & input nirvana, for those details.  Amazing that only one pin (ground) needs to be moved.

I think I'm well on my way now to getting this working.

-- Geoff
Title: DataHand Upgrade Project
Post by: bryanangler on Sat, 28 January 2012, 23:22:50
So I just purchased a datahand PRO II on ebay and it doesnt appear even with the pro that you can reprogram all of the keys.  specifically, the delete, tab, control, and thumb up lever cannot be remapped.  So, it looks like the only alternative is this Teensy method gator so brilliantly pioneered.  gator can you confirm that those keys all can be customized through the teensy?  

I have some basic experience with the teensy and manipulating the firmware c code -- I grafted a teensy-controlled microswitch to my mouse to give it an extra hotkey button.  But this datahand is in a whole different league.  gator I am wondering if you would be willing to share the teensy c code you came up with to remap the datahand so i can use it as a starting point --  I would be willing to paypal you 100 bucks for your trouble.  I dont need anything fancy or anything to do with mousing, I just want to be able to remap the keys
Title: DataHand Upgrade Project
Post by: hoggy on Sun, 29 January 2012, 02:40:36
bryanangler,  Apologies if you've already looked, but you might be able to do most of that with autohotkey (I'm pretty certain that the thumb up can't be remapped though).  Don't get me wrong, I love pics of customised keyboards.
Title: DataHand Upgrade Project
Post by: Input Nirvana on Mon, 30 January 2012, 01:06:16
Quote from: bryanangler;502096
So I just purchased a datahand PRO II on ebay ....

Did you get the Pro II that just sold this last week?
Title: DataHand Upgrade Project
Post by: bryanangler on Mon, 30 January 2012, 08:29:36
Quote from: input nirvana;502972
Did you get the Pro II that just sold this last week?

I did -- and I love this thing!  I am using it though in a pretty unconventional way -- as a one-left-handed keyboard.  Looking at my usage habits over the years I am a heavy "power mouse" user.  Specifically a Logitech MX revolution and now a G700, where i have maybe 50 common actions mapped to the mouse buttons through both direct access and chording of them.  

Being tired of constantly moving my right hand between mouse and keyboard, i wanted to try out left-one-handed-keyboarding.  So i created a cusom standard keyboard layout based on the DVORAK left-one-handed layout, and have been using that for the last few weeks.  it has been a learning process to say the least, but i can tell i am improving on it every couple days.  still several keys are hard to reach so after learning about the existance of the datahand it occured to me that could be the ultimate one-handed device given the drastically reduced finger travel distance.

so I pulled the trigger on a used datahand for $900, and now have it mapped to roughly mirror the DVORAK left-one-handed layout.  If i can get control of that thumb-up key for a third layer it will be complete.  My goal is to be able to type as fast with one hand on a datahand as with two on a normal qwerty keyboard.  geekhack wont let me upload a picture, so here is a link to the other thread I have about it:

deskthority.net/viewtopic.php?f=2&t=1747&p=32442#p32442
Title: DataHand Upgrade Project
Post by: bryanangler on Mon, 30 January 2012, 08:42:29
Quote from: hoggy;502201
bryanangler,  Apologies if you've already looked, but you might be able to do most of that with autohotkey (I'm pretty certain that the thumb up can't be remapped though).  Don't get me wrong, I love pics of customised keyboards.

and yes i was able to do them all but the thumb up through Autohotkey -- thanks hoggy :)  another nice thing using autohotkey is i made the thumb layer buttons dual-purpose.  meaning if i just press and release the L1 thumb key, it is a period, but if i hold down the L1 thumb key and then press one of the finger keys, it spits out the L1 key and releasing L1 doesnt spit out a period (see picture in link above)
Title: DataHand Upgrade Project
Post by: Input Nirvana on Mon, 30 January 2012, 17:47:16
Autohotkey equivalent for Mac?
Title: Re: DataHand Upgrade Project
Post by: Bandikoto on Tue, 03 June 2014, 14:48:19
The real problem with that 17-pin connector is that the associated cable that runs between the hand units will get flakey with use - call it a decade or so.  I have one unit that is in need of repair and the other one is probably fast behind it.  Flexing cables eventually break. 
Title: Re: DataHand Upgrade Project
Post by: luisbg on Tue, 03 June 2014, 22:03:59
That is really cool! Congrats on such a great build.
Title: Re: DataHand Upgrade Project
Post by: Stone on Sat, 25 October 2014, 09:36:12
Got a couple of Datahands in need of upgrade. Looking forward to trying this out!

Stone
Title: Re: DataHand Upgrade Project
Post by: dpanse on Mon, 27 October 2014, 06:46:07
Would one be able to program the keys for a Mac? With the Command key (⌘) ?
Title: Re: DataHand Upgrade Project
Post by: dorkvader on Mon, 27 October 2014, 10:12:52
Would one be able to program the keys for a Mac? With the Command key (⌘) ?

command key for mac is the same as "super" key, or "windows key". The USB scancode the KB sends is the same.
Title: Re: DataHand Upgrade Project
Post by: dpanse on Mon, 27 October 2014, 21:38:45
Sounds good. Waiting for the Teensy board to arrive. Will keep you posted.
Title: Re: DataHand Upgrade Project
Post by: dpanse on Sun, 24 May 2015, 18:58:23
After a log hiatus (Moving houses, etc) I thought I'll take up this project ... but I cant see the pictures on it anymore.
Can we get the pictures back please? Would appreciate it.
Title: Re: DataHand Upgrade Project
Post by: dorkvader on Sun, 24 May 2015, 19:37:27
After a log hiatus (Moving houses, etc) I thought I'll take up this project ... but I cant see the pictures on it anymore.
Can we get the pictures back please? Would appreciate it.

man that's unfortunatel. I remember the photos here were very good.

Looks like he deleted the photobucket album they were on.

Fortunately Archive.org saves the day again!
https://web.archive.org/web/20150411041301/https://geekhack.org/index.php?topic=12212.0

I recommend saving the webpage locally to make sure it doesn't get lost again.
Title: Re: DataHand Upgrade Project
Post by: vivalarevolución on Sun, 24 May 2015, 21:46:15
NEEEEEEEEECRO!!!!!!!!!!
Title: Re: DataHand Upgrade Project
Post by: dpanse on Sun, 24 May 2015, 22:27:42
Thank you! Saved. Anyone there that can help me get this project started?

Here're some links to get your initial setup done:
https://www.obdev.at/products/crosspack/index.html
http://interactive-matter.eu/how-to/developing-software-for-the-atmel-avr-with-avr-eclipse-avr-gcc-avrdude/
https://github.com/imarko/dhteensy.git
Title: Re: DataHand Upgrade Project
Post by: dpanse on Mon, 25 May 2015, 00:09:09
In the pictures, is the PF7/ADC7 pin connected to PE7/INT7 pin? Are they meant to be shorted like that?
Title: Re: DataHand Upgrade Project
Post by: dorkvader on Mon, 25 May 2015, 03:39:07
In the pictures, is the PF7/ADC7 pin connected to PE7/INT7 pin? Are they meant to be shorted like that?

I suspect one of those outputs is disconnected on the physical datahand PCB, so instead of "shorting" it's just "moving". Look yourself or take a photo of both sides and someone might be able to take a look at it and see.

---
Edit: looking again I think he installed that 40-pin chip carrier backwards and the wire is for power or ground (note that the teensy is backwards compared to the atmel chip). Look at where power and ground are on your datahand PCB before plugging a teensy++ in there. Moving an IO pin doesnt make sense but moving power or ground does.
Title: Re: DataHand Upgrade Project
Post by: dpanse on Mon, 15 February 2016, 17:50:49
I tried to do the "ground move" and uploaded the dhteensy software. But it doesn't seem to be working right.
If I press a key, Im seeing 2 keystokes picked up. Some some keypresses it's not picking up anything.
Is there anyone that can help me with this? Thanks.

[attachimg=1]
Title: Re: DataHand Upgrade Project
Post by: gator456 on Tue, 16 February 2016, 17:55:38
To all

I went back and looked at the picture.  the 8051 was in backwards when I took the picture, sorry.  The teensy is in the correct orientation.  I corrected the picture. 


Several question have popped up with subsituting the teensy for an 8051.  Two issues existed that  had to be solved:

issue 1: the pins on the teensy's from pjrc.com were too big for the socket on the DH pcb board.  I solved this with a dip socket

issue 2: the pinout of the 8051 and the teensy dont line up quite right.  The 8051 has pwr/gnd at pins 40/20, but the teensy has gnd/pwr at 1/40. The 8051 has necessary data pin at pin 1.  To fix this the wiring, the teensy had to be changed. 



Also here is the pinout mapping:

Teensy    Datahand     8051  8051    8051      8051    Datahand             Teensy
funct     function     fctn   pin     pin      fctn    function             fctn

GND       SEND DEC A   P1.0     1      40      VCC     VCC                  VCC
PB7       SEND DEC B   P1.1     2      39      P0.0    LED RH NAS           PB6
PD0       SEND DEC C   P1.2     3      38      P0.1    LED RH NORM          PB5
PD1       SEND DEC D   P1.3     4      37      P0.2    LED RH FCTN          PB4

PD2       RH RCV 0     P1.4     5      36      P0.3    LED RH 10K           PB3
PD3       RH RCV 1     P1.5     6      35      P0.4    LED RH unused        PB2
PD4       LH RCV 0     P1.6     7      34      P0.5    LED RH unused        PE1
PD5       LH RCV 1     P1.7     8      33      P0.6    LED RH unused        PE0

PD6       Reset button RST      9      32      P0.7    ?                    PE7
               
PD7        mse data    P3.0    10      31      VPP     ?                    PE6
PE0        mse data    P3.1    11      30      ALE     ?                    GND
PE1        kybd data   P3.2    12      29      PSEN    ?                    AREF
PC0        Reset       P3.3    13      28      P2.7    MSE clk              PF0
PC1        kybd clk    P3.4    14      27      P2.6    ?                    PF1
PC2        kybd clk    P3.5    15      26      P2.5    ?                    PF2
PC3        RAM         P3.6    16      25      P2.4    ?                    PF3
PC4        RAM         P3.7    17      24      P2.3    LED D15 LH (CAPLK)   PF4
PC5        XTAL2       XTAL2   18      23      P2.2    LED D13 LH (SCRLK)   PF5
PC6        XTAL1       XTAL1   19      22      P2.1    LED D6  LH (NUMLK)   PF6
PC7        GND         GND     20      21      P2.0    LED D14 LH (MSE)     PF7


Note:
Teensy pinout:
http://pjrc.com/teensy/teensypp20.gif
8051 pinout:
http://www.engineersgarage.com/sites/default/files/imagecache/Original/wysiwyg_imageupload/1/8051_3.gif
Title: Re: DataHand Upgrade Project
Post by: gator456 on Tue, 16 February 2016, 18:43:41
Dpanse:  For your question I suggest you add some debug statements to your code to see what is going on.  Use the pjrc keyboard with debug example: 

http://pjrc.com/teensy/usb_keyboard.html
Title: Re: DataHand Upgrade Project
Post by: adzenith on Tue, 22 January 2019, 22:31:48
I know this is a super-old thread, but I just wanted to say that I did this Teensy conversion and it worked great. I also ported QMK (the firmware that Ergodox and other fancy keyboards use) to the DataHand/Teensy combo (link (https://github.com/qmk/qmk_firmware/pull/4847)). This lets me use all of the fancy features from QMK, and it makes it easy to make custom layouts etc. Let me know if you need any help getting it running.
Title: Re: DataHand Upgrade Project
Post by: jerryboi on Mon, 21 March 2022, 11:11:33
The project looks, dope mate! www.geelongtilerspros.com (https://www.geelongtilerspros.com/)
Title: Re: DataHand Upgrade Project
Post by: brianjake on Wed, 11 January 2023, 07:26:19
Impressive tough stuff!
Title: Re: DataHand Upgrade Project
Post by: claussen on Sun, 26 February 2023, 16:06:23
Ahoy fellow DH dorks!
I still haven't integrated pointing on my stuff but I love this trackpoint placement!

If you haven't already seen it, JesusFreke built a fantastic DH re-imagining called the lalboard.  A few folks have built their own, and we have a discord where folks are swapping ideas and whatnot.

I'd love to try to get units in the hands of old school DH users at some point for design feedback -- lalboard is much more customizable to individual hand geometry, and I'm trying to make it productionizable as well. 

Come join us on the discord and say hi!  There are literally dozens of us!

https://discord.gg/DnGcHM4Rg8