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.