Author Topic: SONY NEWS keyboard converter  (Read 1614 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 947
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
SONY NEWS keyboard converter
« on: Thu, 05 January 2012, 23:14:27 »
SONY NEWS is a BSD workstation with 68K/MIPS from late 1980s. http://en.wikipedia.org/wiki/Sony_NEWS

This converter allows NEWS keyboard to be connected to modern PC via USB. It works with NWP-5461 and NWP-411A.

NOTE: I found buzzer(Speaker) works on 5461 but with very low volume(with TTL 5V). UART 12V is needed for power?
NOTE: Buzzer can also be controlled with BZ pin?
NOTE: LEDs on NWP-5461 is not supported.
NOTE: NWP-411A was also tested and worked.
NOTE: You might need to turn DIP switch on NWP-5461 all OFF.
NOTE: Mouse connection is not supported.

Source code is available at Github. See under sony_usb/ directory.
https://github.com/tmk/tmk_keyboard

It will work on USB AVR family like ATMega32u4 or AT90USB, though I use a PJRC Teensy board due to laziness.


NEWS keyboard protocol is a usual asynchronous serial communication. You can receive data from the keyboard easily with UART of micro controller.
- TTL level
- 9600bps
- 1-start bit
- 8-data bit
- non-parity
- 1-stop bit.

Cnnector is an EIA 232 type. This is a pic from NWP-5461.


You need only 3 lines(1-VCC, 9-GND and 3-Keyboard) to use the keyboard. 3-keyboard line should be connected to AVR USART RXD pin.
RXD pins is PD2 in case of Teensy.



Pinouts
-------
EIA 232 male connector from NWP-5461
|-------------
|\ 1 2 3 4 5 /
| \ 6 7 8 9 /
|  ---------
1 VCC
2 BZ(Speaker)
3 Keyboard Data(from keyboard MCU TxD)
4 NC
5 FG
6 Unknown Input(to keyboard MCU RxD via schmitt trigger)
7 Mouse Data(from Mouse Ext connector)
8 Unknown Input(to Keyboard MCU Input via diode and buffer)
9 GND
NOTE: Two LED on keyboard are controlled by pin 6,8?

EIA 232 male connector from NWP-411A
|-------------
|\ 1 2 3 4 5 /
| \ 6 7 8 9 /
|  ---------
1 VCC
2 BZ(Speaker)
3 Keyboard Data(from keyboard MCU TxD)
4 NC
5 FG
6 NC
7 Mouse Data(from Mouse Ext connector)
8 NC
9 GND
NOTE: These are just from my guess and not confirmed.


Its scan code is one byte consists of 1-bit release(break) flag at MSB and 7-bit code.
For example 0x29 is sent when 'a' key is pressed and 0xA9 when released.
Code: [Select]
   MSB         LSB
    7 6 5 4 3 2 1 0   bit
    | | | | | | | |
    | +-+-+-+-+-+-+-- scan code(00-7F)
    +---------------- break flag: sets when released

Code: [Select]
Scan Codes
----------
SONY NEWS NWP-5461
,---.   ,------------------------, ,------------------------. ,---------.                   
|Pow|   | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| | F11| F12| ,-----------.
`---'   `------------------------' `------------------------' `---------' |  *|  /|  +|   
,-------------------------------------------------------------. ,---. ,---------------|
|Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|  BS | |Hlp| |  7|  8|  9|  -|
|-------------------------------------------------------------| |---| |---------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|Del|   | |Ins| |  4|  5|  6|  ,|
|---------------------------------------------------------'   | |---| |---------------|
|Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  `|Return| |Clr| |  1|  2|  3|   |
|-------------------------------------------------------------| |---| |-----------|Ent|
|Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|   |Shift   | |PgU| |  0|  .| Up|   |
|-------------------------------------------------------------| |---| |---------------|
|Alt  |Gui |Alt |         Space     |          |Gui|App|Ctrl  | |PgD| |Tab|Lef|Dow|Rig|
`-------------------------------------------------------------' `---' `---------------'
 
,---.   ,------------------------, ,------------------------. ,---------.                   
| 7A|   | 01 | 02 | 03 | 04 | 05 | | 06 | 07 | 08 | 09 | 0A | | 68 | 69 | ,-----------.
`---'   `------------------------' `------------------------' `---------' | 64| 65| 52|                                   
,-------------------------------------------------------------. ,---. ,---------------|
| 0B| 0C| 0D| 0E| 0F| 10| 11| 12| 13| 14| 15| 16| 17| 18|  19 | | 6A| | 4B| 4C| 4D| 4E|
|-------------------------------------------------------------| |---| |---------------|
|  1A | 1B| 1C| 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27|   | | 6B| | 4F| 50| 51| 56|
|---------------------------------------------------------'   | |---| |---------------|
|  28  | 29| 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34|  35  | | 6C| | 53| 54| 55|   |
|-------------------------------------------------------------| |---| |-----------| 5A|
|  36    | 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41|   42   | | 6D| | 57| 59| 58|   |
|-------------------------------------------------------------| |---| |---------------|
| 43  | 44 | 45 |       46          |    47    | 48| 49|  4A  | | 6E| | 66| 5B| 5C| 5D|
`-------------------------------------------------------------' `---' `---------------'
« Last Edit: Sat, 23 November 2013, 20:05:12 by hasu »
⚠ My Engrish is broken.    tmk keyboard firmware project(ADB,PS/2,X68K,PC98,M0110,HHKB,GH60)

Offline hasu

  • Thread Starter
  • Posts: 947
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: SONY NEWS keyboard converter
« Reply #1 on: Sat, 23 November 2013, 19:57:38 »
I just got my second NWP-5461 now. I found this NEWS keyboard on auction after 1 year since I got my other NWP-411A. I'm typing on this.

I found it clicks with very low volume from its speaker when I type keys today. I didn't found this click before. I guess it needs UART voltage 12V to drive the speaker properly. Clicky Topre! it is fun.

⚠ My Engrish is broken.    tmk keyboard firmware project(ADB,PS/2,X68K,PC98,M0110,HHKB,GH60)