Bus: PC keyboard interface library.
Connections: two pins (KBD/KBC) and ground.
Output type: open drain/open collector.
Pull-up resistors: NONE, keyboard has internal pull-ups.
Maximum voltage: 5volts.

This library interfaces PC keyboards. A PC keyboard operates at 5volts, and has it’s own internal pull-up resistors to 5volts. The keyboard issues a clock signal that drives all transactions, the library includes a time-out (v0h+) so the Bus Pirate won’t freeze if the keyboard doesn’t respond.

Syntax Description
A/a/@ Toggle auxiliary pin. Capital “A” sets AUX high, small “a” sets to ground. @ sets aux to input (high impedance mode) and reads the pin value.
D/d Measure voltage on the ADC pin (v1+ hardware only).
W/w Capital ‘W’ enables the on-board power supplies. Small ‘w’ disables them. (v1+ hardware only).
R or r Read one byte with timeout. (r:1…255 for bulk reads)
0b Write this binary value with timeout. Format is 0b00000000 for a byte, but partial bytes are also fine: 0b1001.
0h/0x Write this HEX value with timeout. Format is 0h01 or 0×01. Partial bytes are fine: 0xA. A-F can be lower-case or capital letters.
0-255 Write this decimal value with timeout. Any number not preceded by 0x, 0h, or 0b is interpreted as a decimal value.
, Value delimiter. Use a coma or space to separate numbers. Any combination is fine, no delimiter is required between non-number values: {0xa6,0, 0 16 5 0b111 0haF}.
& Delay 1uS. (&:1…255 for multiple delays)
(#) Run macro, (0) for macro list
Macro Description
0 Macro menu
1 Live keyboard monitor (v0h+)
Advertisements