1-pin Keyboard: OBEX Candidate - Could you please test this for me...
Cluso99
Posts: 18,069
Update: Please see the end post for new test code, thanks. This is an OBEX candidate.
A problem has been reported that a PS2 keyboard does not work with my driver.
After investigation with a number of keyboards I have been able to test, I found some timing discrepencies.
Would you mind downloading the attached test program and running it for me and post the timing results. The program is designed to work with standard PS2 hardware such as the Prop Proto Board, etc. If your crystal speed is different to 5MHz please just change this and recompile. The keyboard is on pins 26 & 27 but this can be changed also.
So you know what I am after, here is a print of one of my Din5 keyboards...
Instructions:
Note: A USB to PS2 converter can be used for many newer USB keyboards. A Din5 to PS2 converter can be used for older Din5 keyboards.
Thankyou.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Post Edited (Cluso99) : 4/23/2010 7:30:46 AM GMT
A problem has been reported that a PS2 keyboard does not work with my driver.
After investigation with a number of keyboards I have been able to test, I found some timing discrepencies.
Would you mind downloading the attached test program and running it for me and post the timing results. The program is designed to work with standard PS2 hardware such as the Prop Proto Board, etc. If your crystal speed is different to 5MHz please just change this and recompile. The keyboard is on pins 26 & 27 but this can be changed also.
So you know what I am after, here is a print of one of my Din5 keyboards...
waiting for idle =1 ready for key 80MHz 84us, 90us, 181us, 90us, 90us, 90us, 262us, 128825us, 446us, 1963us, 84us, 90us, 181us, 90us, 90us, 90us, 262us,
Instructions:
- Change xtal and pin definitions if required
- Compile and load/run the program
- Run PST (Parallax Serial Terminal) or your favourite program
- When the program loads and the message "ready for key" is displayed, please press <space> and the results should be printed on PST
- Cut and paste the results to the forum
Note: A USB to PS2 converter can be used for many newer USB keyboards. A Din5 to PS2 converter can be used for older Din5 keyboards.
Thankyou.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Post Edited (Cluso99) : 4/23/2010 7:30:46 AM GMT
Comments
Tested on demo board, 80MHz, 2 different keyboards:
[noparse][[/noparse]code]
·61us1-pin Keyboard
·30us
·7us
·3us
0000202E 8238 102us
000011E1 4577 57us
waiting for idle =1
ready for key
80MHz 71us, 77us, 151us, 77us, 75us, 77us, 229us, 107680us, 376us, 3406us, 71us, 77us, 151us, 77us, 75us, 77us, 229us,
waiting for idle =1
ready for key
[noparse][[/noparse]/code]
[noparse][[/noparse]code]
·61us1-pin Keyboard
·30us
·7us
·3us
0000202E 8238 102us
000011E1 4577 57us
waiting for idle =1
ready for key
80MHz 74us, 74us, 149us, 74us, 74us, 74us, 225us, 172013us, 374us, 2344us, 74us, 74us, 149us, 74us, 74us, 74us, 225us,
waiting for idle =1
ready for key
[noparse][[/noparse]/code]
Hope it helps...
Alessandro
Test 1-pin Keyboard
61us
30us
7us
3us
0000202E 8238 102us
000011E1 4577 57us
waiting for idle =1
ready for key
80MHz 73us, 80us, 156us, 80us, 77us, 80us, 237us, 117161us, 389us, 3526us, 73us, 80us, 156us, 80us, 77us, 80us, 237us,
waiting for idle =1
ready for key
Perfect timing! I was just packing up all keyboards for a move, I had them all in one place.
I was able to test 5 keyboards with a Demo Board and a 5 MHz crystal. Results in the .txt file.
Jim
Thanks guys. My original keyboard (guess what - it's interstate!) had an equivalent start bit which I used to do the timing. The first 2 times are the start bit, followed by the first bit. They were identical in my original keyboard.
However, what I discovered, and what Antoine's first keyboard and Mike's keyboard is showing is that the start bit is a little shorter. Since I am using that to time the remaining bit samples, the timing runs out over the character and gets an incorrect character received (parity error). It seems that I will need to time the first bit, not the start bit.
BTW the timing spec states a valid bit time is 60-100us. My original window due to rounding losses was about 61-98us. I have now opened the window to 57-102us although I may trim slightly. I am now calculating this time in code using the clkfreq value so that it is xtal independant (i.e. run time independant instead of compile time independant). Why do I want run-time independant... because SphinxOS programs will not know the frequency at compile time.
Please keep up the results I have one old Din5 keyboard that pulses (spikes) the signals and unless others find this too, I am going to ignore this, so it will not work for keyboards that do this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Jim
or any char, but having different and non-overlapping windows for multiples (e.g. 58..102, 116..204, 174..306, etc)
this way every window has a weight 1,2,3,etc and the total can be still averaged
the closest thing is the Y key (0x15) that would allow to measure first 6 bits including start
The 2 Compaq & Monorail keyboards both use unequal 0 & 1 bit times. The second Compaq is out of spec (too fast 47/51us s/be 60-100us) and is the only one I have seen do this. Some keyboards use a shorter start pulse than the remainng bit times which has been the cause of my problems.
I used the <space> key because it is an easy key to use (and hopefully remember) and provides the first two bits as 0 (start) and 1(bit1). The next 2 bits are 0. e.g 01001010001 as start12345678paritystop.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Could you please try this and letme know if it works for your keyboards. If no, please post a copy of the screen.
I am not verifying you type a <space> at the moment - just presuming you did and using it's values. I have notices a few keyboards do not adhere to the specs, particularly, would you believe Compaq.
All keyboards work here except one - it pulses the data line so I cannot determine it's timing. I am not going to bother as it is a very old no-name with a Din5 connection. So I have 2 PS2's, 1 Din5 and 1 USB working here and 1 failing Din5.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Jim
Test 1-pin Keyboard v0.052d
Hit <spacebar> to synchronise key
...Synchronised (33,79us 3503,8232clks)
Type any keys to confirm the keyboard is working
the quick brwon fox jumped over the lazy dogs back
same enabling the 1pinTV bits,·sync nicely on two small TVs (8" b&w crt and·7" color LCD wide)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
It should work with almost all keyboards, so please let me know if it works or not. I do have a keyboard which does not work, but since it is a very old Din5 and it pulses the lines I have not tried to make this work. It works on my other Din5, PS2 & USB keyboards.
This code·tests the keyboard in spin for a <space> key and sets the timing in hub before loading the cog. The user program can preset the timing if the same keyboard is being used which saves the requirement of hitting <space> to initialise the timing each time. If user specified timing is used, note that it is xtal specific.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
then again using 5951,5984 for init:
same with the other keyboard, values were 5678,6132.
regards
Alessandro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz