1-pin PS2 Keyboard & 1-pin TV 40x25 - Released on OBEX
Cluso99
Posts: 18,069
This thread will now contain information about both the 1-pin Keyboard and 1-pin TV objects.
Release code: 21st Feb 2010
Please report any bugs here.
OnePinKeyboard
OnePinTVText
For testing, just connect to your existing propeller with PS2 Keyboard and TV and run the program. The existing circuits will work correctly although the other pins will be ignored. Pin changes in the demo code may be required.
Instructions for building the cables and circuits are on the RamBlade thread· http://forums.parallax.com/showthread.php?p=849265
31Mar2010: I have just posted v050 of the Debug version of the 1pin TV & 1pin KBD demo code. Please be warned... I used a twisted pair to bring the TV & KBD pins from my RamBlade to a breakout board and the interference caused the keyboard code not to work. It was bad practice and I paid the price in lost time to debug!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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) : 3/31/2010 6:11:32 AM GMT
Release code: 21st Feb 2010
- OnePinKbdTV_demo·· v040
- OnePinKeyboard······· v125
- OnePinTVText·········· v040
- isx_in
- isx_out
- 1-pinTV_calcs·· ······· v001
Please report any bugs here.
OnePinKeyboard
- Features
- Works with a PS2 keyboard using only 1 propeller pin (kbddata)
- A 16 character buffer is inside the cog
- Keycode conversion takes place inside the cog
- Optional keycode conversion for Up/Down/Left/Right/Home/Backspace/ClearScreen(ScrollLock) to ascii video codes
- Simple 1 long hub interface (mailbox/rendezvous)
- Minimal hub footprint
- Designed for SphinxOS, RamBlade, etc where alternate drivers can be loaded or changed on the fly without software changes
- Interface
- The standard prop keyboard interface can be used (as on the Proto Board, etc)
- Simple circuit uses 2 x 10K and 1 x 100R resistors
- 1 x 100R in series from the propeller pin to the keyboard data pin, with a 1 x 10K pullup to +5V at the keyboard data pin
- 1 x 10K pullup to +5V at the keyboard clock pin
- A simple external cable can be built with·resistors in the plug (see circuit and pictures below)
- The keyboard is not initialised, so the keyboard LEDs do not light up
- Requires the user to type a <space> to synhronise the keyboard
- Some USB keyboards support PS2 mode by a passive converter
- A USB socket can be forced into a minidin6 pcb - I need to check if the data pin needs to be rewired on this ???
- Operation
- Requires the user to type a <space> to synchronise the keyboard
- The keyboard is not initialised by the propeller, so the keyboard LEDs do not work
- Acknowledgements
- Scancode decoding based on original Keyboard.spin·by Parallax
- Thanks to Andy (Ariba) for some initial tests and ideas
- Thanks to kuroneko for helping me to·understand some features of the counters
OnePinTVText
- Features
- Works with a TV (composite video) using only 1 propeller pin
- B&W display only, NTSC default (PAL requires parameter changes)
- 25·lines of 40 characters (40x25)
- 8 x 8 font inside the cog
- Simple terminal code inside the cog (ASCII control codes, not VT100 compatible)
- Up/Down/Left/Right/Home/Backspace
- Enter (Carriage Return) causes scrolling if·on bottom line of screen
- Clear Screen is implemented by the ScrollLock key ($00 and $18)
- Blinking underline cursor
- Inverse video for bit8=1
- Simple 1 long hub interface (mailbox/rendezvous)
- Screen buffer (1000 bytes) in hub (allows other programs to directly manipulate the screen buffer if required)
- Minimal hub footprint
- Designed for SphinxOS, RamBlade, etc where alternate drivers can be loaded or changed on the fly without software changes
- Also usable for a simple (extra) debug display
- Interface
- The standard prop·TV (composite video)·interface can be used (as on the Proto Board, etc)
- Simple circuit uses 1 x 270R·resistor (other values can be easily used)
- 1 x 270R in series from the propeller pin to the video pin
- A simple external cable can be built with·the resistor in the plug (see circuit and pictures below)
- Acknowledgements
- Based on original OnePinTVText·by Eric Ball
- Uses AiChip 8x8 fonts
- Thanks to Phil Pilgrim (PhiPi) for the original hardware concept
For testing, just connect to your existing propeller with PS2 Keyboard and TV and run the program. The existing circuits will work correctly although the other pins will be ignored. Pin changes in the demo code may be required.
Instructions for building the cables and circuits are on the RamBlade thread· http://forums.parallax.com/showthread.php?p=849265
31Mar2010: I have just posted v050 of the Debug version of the 1pin TV & 1pin KBD demo code. Please be warned... I used a twisted pair to bring the TV & KBD pins from my RamBlade to a breakout board and the interference caused the keyboard code not to work. It was bad practice and I paid the price in lost time to debug!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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) : 3/31/2010 6:11:32 AM GMT
Comments
Here's one example that uses a full duplex serial channel, but the microcontroller to keyboard link is primarily for flow control.
www.multilabs.net/Files/ezKEY_User_Manual_Rev_B.pdf
The keyboard initialization sequence would be done on a reset. The Prop would need to reset the keyboard controller to reinitialize the keyboard. That would be easy to do if there were an extra pin, but the keyboard controller could also just be tied to the Propeller's reset pin.
I was trying to see if I could avoid the micro. I have a PIC10F222 (SOT23-6) and a MC9RS08KA1 & KA2 (SOIC8) coming for the job, just in case. Both are about 50c but they have to be programmed. The code is simple enough.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
4 cores = half a Prop.
Anyway, I am sure that it didn't do any thing complicated to reset anything and certainly the LEDs never lit. (bascom AVR)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Your Keyboard driver code works for my PS/2 Keyboard !
I have made some exeperiments with the Keyboard last week, and found that it needs no initialization. It sends keypresses
just with it's default settings after Power on.
Attached is a short Spin code, with the results I found on my experiments.
You can poll a keyboard with Spin only, and no additional Cog. Waiting for a keypress or abort a loop by keypress is very
simple with only some lines of Spin. But it is also possible to receive the scancodes with a short Spin loop.
Andy
Now I should be able to do a 1-pin keyboard and 1-pin 80x25 video. Nice, simple circuit.
Thanks for the code. I will have to digest the counter use. Looks good.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
The keyboard uses a 10-16.7KHz clock (~30-50us low and ~30-50us high) and sends the data serially, LSB first, with start, parity and stop, so 11 bits. The prop samples the data 15-25us after the falling clock edge.
How can we use this? If we were to wait for a·specific keycode, just like modems used to autobaud with the "AT", we could determine the clock frequency (close enough) to then just clock in the data without reference to the clock pin at all. The interface would actually be simpler than the current interface. 1 x 100R and 2 x 10K pullups.
Now to prove this can be done
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
All PC KeyBoard send only ROW-COLUMN codes to PC and some status data on LED´s and Control tangents
That must be translated to valid KEY´s. One KEY is 2 DATA bytes.
If I mind correctly some can be 3 Bytes if not all.
Third Byte have next all bit´s dedicated ..... LED´s CTRL, ALT, ALT-GR, Caps Lock, Shift, and some other I don´t mind ....
Are not at Home to Look in tables for that.
Regards
Christoffer
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
With AutoDetect baudrate ... I not see any problem to READ data from it.
And as You stated ... only problem ... It will be not posible to set LED states.
My concern are ..... Some of USB to PS2 KeyBoards ... ned initialisation to send as PS2 type data.
If You can organise that in reset state ..... KB controler can see it as PS2 ... You are done
Regards
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
My gut feeling says this has the potential to be unreliable. Most keyboards I've seen have used either a cheap resonator (not so bad) or an r/c circuit to derive the cpu clock. My experience with other such devices is that the clock frequency can vary not insignificantly with ambient temperature. If this was a device left on for long periods it would have to cope with the drift. Now, if you could talk to the keyboard from time to time then you could always re-measure the bit time edges and compensate on the fly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
Every negative edge of the clock puls generates a short negative puls on the Prop-pin.
If the Data Line is high (= open, because of the open collector output of keyboard), the puls is short: 10k * 100pF
if the Data Line is low, then the puls is a bit longer, because the 15k resistor builds a voltage divider with the 10k,
and the 100pF C needs longer to charge up to the threshold voltage of the prop pin.
Changes on data without a clock transition have no effect, because the voltage stays well over the threshold input voltage.
The software gets a puls for every bit and needs just to measure the puls length to determine if its a '0' or a '1'. This
can be made with the neg-detector mode of a counter very easy.
Andy
Edit: pulses in the timing diagram are inverted shown.
This is not tested. And when I rethink it, it needs perhaps additional pullups direct at the clock and data pin.
Post Edited (Ariba) : 12/8/2009 4:57:00 PM GMT
Brad: Drift over time is not an issue. I have done bit resyncing and autobaud before. The Apple //c was out of spec when initially released. I designed an Apple branded modem which had to work with both correct and incorrect clocks. I wrote a soft-coded autobaud bit resyncing UART for the MC68705 (no onboard UART).
Andy: My original thoughts were along similar lines to create a pulse on the negative going clock edge. It will require a pullup at the clk pin but I think the data pin will be fine as there is an effective pullup via your 10K (probably needs to be to +5V with a higher R value) & 15K. It think a 100R series to the PropPin will be required to prevent overshoot to 5V.
However, I think I will try the simpler hardware version as it only requires 3 resistors.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Certainly your method will work otherwise, so 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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Do you have the time to get this working? I think it would be a great addition to the OBEX
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Thanks Ariba (Andy) for the circuit idea. Works a treat.
Here is the concept code, with the circuit in the spin file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Glad to see, that you have made it by yourself!
Andy
I think ultimately I will remove the need for the rc circuit altogether by working out the timing, but that will be a job for later.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Here is working code using the RC circuit (also shown in the spin file).
Currently it only sends·the keycodes received from the keyboard. No translation is done in the pasm code yet. I intend to use the translation done in the keyboard.spin code by Parallax. The code retimes for every start bit received.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
Now we just need 1 pin mouse...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
Las - Large model assembler Largos - upcoming nano operating system
1-pin mouse should work without the keycode conversion.
I am just playing with using only the data pin (i.e. no RC network). Hopefully tomorrow I may get this bit running.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
Perhaps it's possible to do Mouse and Keyboard with 3 pins (Keyboard also with initialization): CLK to Mouse and Keyboard, DATA1 to Keyboard data, DATA2 to Mouse data.
Andy
Notes:
- There are issues with the locks (shift/num, etc) and I have not tracked this down yet
- You must type an "F1" (or right-hand Shift key, or indeed any keycode with a value of %xxxxxxx1 i.e. lsb=1) so the code can synchronise to the keyboard speed.
- The keycodes seem to be read correctly but as I said there are lock issues. It could just be that I have not set them correctly since I cut and pasted some of the Parallax keyboard.spin code directly in without much thought.
Mouse: Andy, it's a shame that the mouse must be initialised · The clk cannot be combined since the device (kbd or mouse generates the clk). I think this will require the small micro if anything is to be achieved here. And there is no point using 3 combined pins.▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Just cannot figure a way to drill the prop chip and attach·aerial wires to the silicon.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
The idea is to use the clk only for initilization. After that keyboard and mouse will only receive in 1 pin mode (so the clk can be used for something else, perhaps I2C?)
The new 1 pin version sound promising, and this one I can test without additional hardware.
Can you not use the Break code ($F0) to measure the speed? This is sent always as first Byte on key release.
- wait for the first Low bit, this is the begin of the pressed key message (1..3 byte)
- wait 20 miliseconds to ignore this message
- the next byte will be a $F0 (first byte of the break code)
Andy
I used F1 or othe keys that have a single 0 bit as the start bit followed by the lsb bit which is a 1 bit. This way I can check it is a valid start bit by being <100us. The spec says it can be 60-100us (10-16.7KHz). With 2 x 0-bits the timing could be 200us which can also represent 3 x 0-bits for the faster keyboards at 180us. So I must look for a single start bit as this is the only one that I can tell is a single bit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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