3 ; pin 21 (per-pic-led, RD2/PSP2/C1IN) states: high H = green, low L = red, float Z = black
5 include /usr/share/gputils/header/p18f458.inc
6 include ../iwjpictest/clockvaries.inc
11 bcf TXSTA,6,0 ; p181, set 8-bit mode
12 bsf TXSTA,5,0 ; transmit enable
13 bcf TXSTA,4,0 ; asynchronous mode
14 bsf RCSTA,7,0 ; serial port enable (p182)
15 bsc_txsta_brgh ; set high or low baud rate
17 ; set SPBRG to get correct baud rate
20 ; set pin 24 to low (transmission allowed from computer)
25 ; set current letter to a
27 ; check whether allowed to transmit (check pin 27 low)
28 ; add current letter to TXREG
29 ; check current letter - if z, go to main; if <z, increment