TAMS / Java / Hades / applets (print version): contents | previous | next"Phrasendrescher"
DescriptionYet another gadget built around the PIC16C84 microcontroller.
It reads out text data from the ROM, scrambles the data, and shows
the (possibly funny) result on the text display.
The 64 KByte ROM holds a set of German sentences stored as ASCII text.
We have to use an external memory here, because the internal memories
of the PIC16 are simply too small. Also, this is a good demonstration
of how to interface the PIC16C84 to a few additional digital components.
All of the sentences use the same simple subject-predicate-object structure,
and three additional tables in the ROM indicate the start (and length)
of the corresponding parts of the sentences.
(All of the sentences deal with either computer engineering
or more or less funny incidents in our
department and/or the University of Hamburg and its infrastructure.
German people will know or might guess what a Fachbereichtsrat is...)
Usage:
Wait until the applet has started and displayed its welcome message
on the LC-display.
Then, click one of the four switches on the left.
From top to bottom, they activate the following actions:
- display the welcome message again.
- display one of the original sentences stored in the ROM.
- display a single scrambled sentence.
- continuously generate and display new scrambled sentences
(with a few seconds pause between sentences).
Naturally, you can switch between these modes while the program is running.
If necessary, click the currently activated switch again to deselect it,
then click another switch.
However, clicking a switch does not interrupt the processor.
It can take a few seconds before the program reacts to your clicking,
because the switches are only sampled between the software wait-loops.
The scrambled sentences are the result of using three pseudo-random
numbers to access the subject, predicate, and object parts of different
sentences.
At the moment, the random-generator uses a fixed initialization value,
so that repeated runs of the applet result in the same sequence of
scrambled sentences.
(One improvement would be to measure the time until the first button-click
or between button-clicks to re-iniatialize the random generator.)
Run the applet | Run the editor (via Webstart)
Impressum | 24.11.06
http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/72-pic/85-phraser/fast-phraser_print.html