Scrolling LCD
At the moment our program gets stuck when the cursor reaches the end of the line on the LCD. What we would like is for the line to scroll to the left as the text is written. It is actually possible to persuade the LCD panel to do this for us, but you will have to refer to the LCD data sheet for an example.
Auto Sync
There are a number of ways in which the program could be improved. I mentioned a couple on the previous page. You could let the program automatically detect the size of the dot and dash pulses. The way to do this is to measure the width of incoming pulses and the gaps between then. Once you have a few you should be able to tell which are dots 'cos they are much shorter. At this point you can back track over the timings that you got and pull out what the message means. This is a bit tricky, but not too difficult.
Audible Morse
You could improve the "morse experience" by adding code which makes a noise when the key is down. This can be achieved by borrowing code from our buzzer program. By increasing the frequency of the clock interrupts by changing the pre-scaler you can get the tones produced by the interrupt handler. If you do this you may need to do something clever to scale the rate at which the timer variable counts up however, in a similar way to the approach we used for the stop watch.
Mystic Morse
You could also add a facility where the PICmicro will output morse messages for your user to practice decoding. You could easily use the pattern and length arrays to allow you to convert a character into its morse representation. You also have the code in the "Mystic LCD" to allow you to store and select random phrases. It would therefore not be too difficult to create a "Mystic Morse" which displays one of a number of random messages to decode.
Serial Communications
The morse decoder we have created is a bit like a device called a Universal Asynchronous Receiver/Transmitter or UART. These are the components behind the RS232 serial ports in your PC. The difference is that a UART works by inspecting an incoming signal line at regular intervals (the baud rate) looking for 0 or 1 while we measure the width of pulses to spot dots and dashes. If you have two PICmicro systems you could use this morse mechanism to allow them to communicate, simply by wiring the output of a morse encoder (see above) to the input of a morse decoder. This would let you link two PICmicros together and send information between them.
A trio of PICmicros