background image

8

   QEX – May/June  2010

Reprinted with permission © ARRL

PSK modem, Rick Hambly, W2GPS, 

for giving me guidance, and Steve Bible, 

N7HPR, for encouraging me to write up this 

project for the 2009 Digital Communications 

Conference.

Notes

1

Milton Cram, W8NUE, and George L. Heron, 

N2APB, “NUE-PSK31: A digital modem for 

PSK31 Field Operation...Without Using a 

PC!,” 2007 

TAPR and ARRL 26th Digital 

Communications Conference Proceedings

Hartford, Connecticut: ARRL.

2

International Morse code, 

“RECOMMENDATION ITU-R M.1677,” 

International Telecommunication Union, 

2004; available at 

www.godfreydykes.info/

international morse code.pdf

 

3

Morse code, Wikipedia, The Free 

Encyclopedia; 

http://en.wikipedia.org/wiki/

Morse_code

4

Keyboard 101- and 102-Key,

 IBM Personal 

System/2 Hardware Interface Technical 

Reference — Common Interfaces

, 1990; 

www.mcamafia.de/pdf/pdfref.htm

5

Keyboard and Auxiliary Device Controller, 

IBM Personal System/2 Hardware Interface 

Technical Reference — Common Interfaces

1990, 

www.mcamafia.de/pdf/pdfref.htm

 

6

Adam Chapweske, 

The PS/2 Mouse/

Keyboard Protocol

, 2003; 

www.computer-

engineering.org/ps2protocol/

7

Adam Chapweske, 

The PS/2 Keyboard 

Interface

, 2003; 

www.computer-engineer 

ing.org/ps2keyboard/

 

8

Adam Chapweske 

The PS/2 Mouse 

Interface

, 2003; 

www.computer-engineer 

ing.org/ps2mouse/

 

9

Jochen Jahn, “Keyboard-Game Interface,” 

Nuts & Volts Magazine

,

 Dec 2009, pp 30-34.

10

Adam Chapweske, 

Keyboard Scan Codes: 

Set 2

www.computer-engineering.org/

ps2keyboard/scancodes2.html 

11

SparkFun Electronics, MiniDIN 6-Pin 

Connector, SKU: PRT-08509; 

www.

sparkfun.com/commerce/product_info.

php?products_id=8509

 

12

SparkFun Electronics, MiniDIN 6-Pin 

Connector Breakout, SKU: PRT-08651; 

www.sparkfun.com/commerce/prod-

uct_info.php?products_id=8651

13

Saleae LLC, Saleae logic analyzer; 

www.

saleae.com/logic/

 

14

CWAV, Inc, USBee SX logic analyzer; 

www.

usbee.com/sx.html

15

CCS, Inc., PIC18F4520 Development 

Kit; 

www.ccsinfo.com/product_info.

php?products_id=18F452kit

 

16

Microchip Technology Inc., PICDEM 2 Plus, 

Part Number: DM163022; 

www.microchip.

com/stellent/idcplg?IdcService=SS_

GET_PAGE&nodeId=1406&dDocName=

en010072

 

17

Sure Electronics Co, Hybrid of PIC18F4520 

Dem2PLUS and Low Power Demo Board; 

www.sure-electronics.com/product/

goods.php?id=24

 and 

www.sureelectron 

ics.net/goods.php?id=24

18

SparkFun Electronics, 40 Pin PIC 

Development Board, SKU: DEV-00021; 

www.sparkfun.com/commerce/prod 

uct_info.php?products_id=21

 

19

SparkFun Electronics, 40 Pin PIC 

#include <18F4520.h> 
#use delay(internal=8MHZ) 
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7) 

#define PORT0_LED PIN_A0 
#define PORT1_LED PIN_A1 
#define PORT2_LED PIN_A2 
#define PORT3_LED PIN_A3 

#define DELAY 250 

void blink_port_LEDs(void); 

/* -------------------------------------------------- * 
 * this program continuously blinks all the port LEDs * 
 * -------------------------------------------------- */ 

void main(void) 

  delay_ms(DELAY); 
  printf(“Figure 7 sample program... hello\r\n”); 

  for (;;) { 
    blink_port_LEDs(); 
  } 

/* --------------------------------- * 
 * this routine blinks each port LED * 
 * --------------------------------- */ 

void blink_port_LEDs(void) 

  output_high(PORT0_LED); delay_ms(DELAY); 
  output_low(PORT0_LED); delay_ms(DELAY); 

  output_high(PORT1_LED); delay_ms(DELAY); 
  output_low(PORT1_LED); delay_ms(DELAY); 

  output_high(PORT3_LED); delay_ms(DELAY); 
  output_low(PORT3_LED); delay_ms(DELAY); 

  output_high(PORT2_LED); delay_ms(DELAY); 
  output_low(PORT2_LED); delay_ms(DELAY); 
}

Figure 7 — This is a sample 

C

 program for the PIC18F4520 using the CCS 

C

 compiler.

Summary of Contents for Keyer Paddle

Page 1: ...I was looking I would write a pro gram that runs on a PIC and that emulates a PS 2 keyboard using a keyer paddle for input Later on in the project I wondered if it was also possible to emulate a PS 2...

Page 2: ...ands the key board to light its Caps Lock LED when the Caps Lock key is pressed The PS 2 Mouse Protocol The standard PS 2 mouse device sends the host its movement and button informa tion as a three by...

Page 3: ...ternal 8 MHz clock within the PIC is used instead PIC Development Tools For the PIC programmer I used the Microchip PICkit 2 programmer debug ger 27 The PICkit 2 is inexpensive and was adequate for th...

Page 4: ...ddle input Clicking briefly pressing the left paddle lever generates a left mouse button click and correspondingly clicking the right paddle lever generates a right mouse button click Mouse pointer mo...

Page 5: ...n and purple connectors are connected to the corresponding purple and green female con nectors of the PS 2 keyboard and mouse to USB adapter Table 1 provides the parts list of readily available compon...

Page 6: ...8509 www sparkfun com commerce product_info php products_id 8509 12 SparkFun Electronics MiniDIN 6 Pin Connector Breakout SKU PRT 08651 www sparkfun com commerce prod uct_info php products_id 8651 13...

Page 7: ...ucts com embeddedcbook htm 33 Martin P Bates Programming 8 bit PIC Microcontrollers in C with Interactive Hardware Simulation Oxford UK Newnes Press 2008 ISBN 9780750689601 34 Chuck Hellebuyck Beginne...

Reviews: