Topics

HP-HIL and USB


Anders
 

Thanks! What I though. This will suffice for now. I have one on the way from Mouser now. Should be here early next week. I will make space for that and also put in a footprint for a simple 4-pin header for flexibility. I am also pondering changing from a 48-pin lqfp patrt to a 32-pin for the USB bridge as it is easier to solder. The USB stuff will also be completely optional in case all you need is PS/2


Anders
 

I think I have a passable footprint now. That they never bothered to draw a view from above or below with the pins visible does not help a lot though. Also do the plastic pegs look wider on their drawing. I guess those are supposed to be melted on the solder side to provide additional support?


Adrian
 

Yes, the 3mm pegs are odd in that they have a quarter of the 'cylinder' removed for no obvious (to me) reason. I think I would simply use them as location pegs and add more conventional fasteners through the two adjacent holes to hold things down? The two grounding pins will do a pretty good job of adding retention anyway in that the shroud is quite well designed/attached.

Adrian

On 31/10/2020 17:04, Anders wrote:
I think I have a passable footprint now. That they never bothered to draw a view from above or below with the pins visible does not help a lot though. Also do the plastic pegs look wider on their drawing. I guess those are supposed to be melted on the solder side to provide additional support?


Anders
 

I have no cable to check, so can you see that I have understood it correctly. Ie the preliminary PCB layout, seen from the board side. Do I have the pins right?


Anders
 

Some explanations: It is supposed to fit in a Hammond plastic case.
J2 is HIL input. SDL connector or solder wires
J3 and j¤ are mouse and keyboard. There is a marking which is which on the reverse side
J1 is a dual USB connector
J9 is for programming the VNC2 chip, if need be, but that piece is so simple that I do not expect it to happen
J7 is ICSP to program the PIC
J6 is serial output (for debugging)
J5 bootloader serial
Sw2 is to set keyboard language

I plan to write a bootloader so that you can flash the PIC via serial

All the USB stuff can be omitted if you never intend to use USB, but both USB and PS/2 can be active so you can have dual keyboards and mice :)


Bruce
 

please let me know when it is available

do yu have a parts list (BOM) from Digikey or some other distributor?


Quoting Anders <anders.gustafsson@pedago.fi>:

Some explanations: It is supposed to fit in a Hammond plastic case.
J2 is HIL input. SDL connector or solder wires
J3 and j¤ are mouse and keyboard. There is a marking which is which
on the reverse side
J1 is a dual USB connector
J9 is for programming the VNC2 chip, if need be, but that piece is
so simple that I do not expect it to happen
J7 is ICSP to program the PIC
J6 is serial output (for debugging)
J5 bootloader serial
Sw2 is to set keyboard language

I plan to write a bootloader so that you can flash the PIC via serial

All the USB stuff can be omitted if you never intend to use USB, but
both USB and PS/2 can be active so you can have dual keyboards and
mice :)



Anders
 

My aim is to order prototype PCBs in a week or two, once I have checked everything. There will be a complete schematic and a BOM with manufacturer codes and Mouser (mostly) part numbers. 

I will also document what can be omitted in case you do not need USB.


Anders
 

I think I got the pinout of the SDL connector wrong, but this is what it looks like on page 2-6of the HIL docs. The picture there is marked (Bottom View) so here is the reverse side of the PCB:


Anders
 

Getting close now. I really could use a readymade SDL-cable to test, but those on eBay are prohibitively expensive. I might have to crimp one, but I am sure that there is a big stash of those cables, somewhere... :)


Anders
 

Well, mixed success. All the stuff I fretted really about, the HIL connector was just fine, but the footprints for the PS/2 connectors were wrong, so I had to desolder them and attach with flying leads.. :( But I can use what I have to fiddle with the FW whilst waiting for new boards...

At this point we need to come up with a keyboard mapping for PS/2 and USB that everyone is happy with. Comments? Refer to the graphic at http://www.dalton.ax/hpkbd/hil/ for scancodes. The schematic and code is there as well.
static const HID_KEY_TRANSLATION_TABLE_ENTRY keyTranslationTable[] = 
{
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_A,                                          0x5A },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_B,                                          0x30 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_C,                                          0x34 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_D,                                          0x56 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_E,                                          0x68 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F,                                          0x54 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_G,                                          0x52 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_H,                                          0x50 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_I,                                          0xC0 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_J,                                          0xD0 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_K,                                          0xD2 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_L,                                          0xD4 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_M,                                          0xE0 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_N,                                          0xF0 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_O,                                          0xC2 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_P,                                          0xC4 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_Q,                                          0x6C },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_R,                                          0x66 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_S,                                          0x58 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_T,                                          0x64 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_U,                                          0x60 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_V,                                          0x32 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_W,                                          0x6A },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_X,                                          0x36 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_Y,                                          0x62 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_Z,                                          0x38 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_1_AND_EXCLAMATION_POINT,                    0x7C },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_2_AND_AT,                                   0x7A },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_3_AND_HASH,                                 0x78 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_4_AND_DOLLAR,                               0x76 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_5_AND_PERCENT,                              0x74 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_6_AND_CARROT,                               0x72 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_7_AND_AMPERSAND,                            0x70 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_8_AND_ASTERISK,                             0xB0 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_9_AND_OPEN_PARENTHESIS,                     0xB2 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_0_AND_CLOSE_PARENTHESIS,                    0xB4 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_MINUS_AND_UNDERSCORE,                       0xB6 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_EQUAL_AND_PLUS,                             0xB8 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_OPEN_BRACKET_AND_OPEN_CURLY_BRACE,          0xC8 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_CLOSE_BRACKET_AND_CLOSE_CURLY_BRACE,        0xC6 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_BACK_SLASH_AND_PIPE,                        0xCA },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_NON_US_HASH_AND_TILDE,                      0x7E },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_SEMICOLON_AND_COLON,                        0xD6 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_APOSTROPHE_AND_QUOTE,                       0xD8 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_GRAVE_ACCENT_AND_TILDE,                     0x7E },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_COMMA_AND_LESS_THAN,                        0xE2 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_PERIOD_AND_GREATER_THAN,                    0xE4 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_FORWARD_SLASH_AND_QUESTION_MARK,            0xE6 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_SPACEBAR,                                   0xF2 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_CAPS_LOCK,                                  0x5E },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_LEFT_SHIFT,                                 0x0A },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_LEFT_ALT,                                   0x07 }, // Left extend
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_RIGHT_SHIFT,                                0x08 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_LEFT_CONTROL,                               0x0C },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_RIGHT_CONTROL,                              0x0C },



    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_DELETE_FORWARD,                             0xCE },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_RETURN_ENTER,                               0xDA },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_INSERT,                                     0xCC }, // Insert char
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_DELETE,                                     0xBA }, // Delete char
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_RIGHT_ARROW,                                0xFE },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_LEFT_ARROW,                                 0xF8 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_UP_ARROW,                                   0xFC },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_DOWN_ARROW,                                 0xFA },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_HOME,                                       0xDC },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_TAB,                                        0x4C },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_4_AND_LEFT_ARROW,                             0x10 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_1_AND_END,                                    0x20 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_8_AND_UP_ARROW,                               0x12 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_5,                                            0x14 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_2_AND_DOWN_ARROW,                             0x24 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_SCROLL_LOCK,                                0x0E }, // Break
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_9_AND_PAGE_UP,                                0x16 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_6_AND_RIGHT_ARROW,                            0x18 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_3_AND_PAGE_DOWN,                              0x28 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_PLUS,                                         0x26 },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_MINUS,                                        0x2E },
    { USB_HID_KEYBOARD_KEYPAD_KEYPAD_ENTER,                                        0x1E },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_ESCAPE,                                     0x3E },





    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F1,                                         0x98 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F2,                                         0x96 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F3,                                         0x94 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F4,                                         0x92 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F5,                                         0xA2 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F6,                                         0xA4 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F7,                                         0xA6 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F8,                                         0xA8 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F9,                                         0x4A },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F10,                                        0x42 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F11,                                        0x46 },
    { USB_HID_KEYBOARD_KEYPAD_KEYBOARD_F12,                                        0x4E },
};


Anders
 

On Wed, Dec 16, 2020 at 01:01 PM, Anders wrote:
I might have to crimp one,
Yes, that is what I did. I crump one.. Crimp, Crump, Crump..


Anders
 

Scancodes for USB and PS2 are different, so I have two tables, but my aim is to make the mappings identical. FWIW did I map "Break" to Shift-Scroll-Lock


Jack Rubin
 

As a lonely English Lit major rather than an engineer, I can finally make a contribution to this thread! The character above the 6 on the keyboard is a "caret" or "circumflex", not a vegetable.

Ok, now back to lurking.
--
Jack
www.computerarium.org


Anders
 

Have I written "carrot"?? Where? Yes, I know what it is.

Sent from my Fairphone


Have I written "carrot"?? Where? Yes, I know what it is.

Sent from my Fairphone



Steve Leibson
 

Jack, you are the least lonely English lit major I know.

--Steve



On 12/18/2020 6:12 AM, Jack Rubin wrote:
As a lonely English Lit major rather than an engineer, I can finally make a contribution to this thread! The character above the 6 on the keyboard is a "caret" or "circumflex", not a vegetable.

Ok, now back to lurking.
--
Jack
www.computerarium.org
-- 
Steve Leibson

Phone (Cell): 408-910-5992
Phone (Home): 408-292-4930


Please feel free to link to me on LinkedIn


History site: www.hp9825.com

#Iwork4Intel


Anders
 

So this is what the prototype looks like now:


 

Nice job, Anders.

-Rik


Anders
 

Thanks. Yes I feel pretty pleased, actually. This is what it looks, boxed. The Hammond box is a tight fit vertically. And why hide your PCB under the proverbial bushel when you can have a see-through box? :)


Anders
 

OK. I am still freting about the Keyboard mapping, especially for a very basic PS/2 keyboard. The one I have though has windows-keys and mulimedia ones, but as the PS/2 bacis keyboard has fewer keys than the ITF one, I need to come up with something. I started with the mapping HP used in the A2615-90039 manual and used the right Ctrl-key as a pseudo-shift. This is my suggested layout:


Anders
 

OK. It is done now. New PCB with proper footprints. Who want to betatest? You need to do the soldering yourself and program the PIC and VNC2. I have two extra prototype 2 PCBs that I can sell for what I paid, ie 6€ each. I also have two PCBs with the wrong footprint for PS/2, but can be used for PCB. If anyone wants them they can have them for free. I will try to finalise the BOM tomorrow,