Specifications
Goto position
0,0
String
pointer =
NULL
Print pointer at
cursor position
on the LCD
Increment
pointer
Position of
next character
> LCD
columns
Goto position
1,0
The next line
Pointer
= space
Calculate the
number
characters to the
next space
If greater
than space
left on line
Clear the rest of
the line
Clear the rest of
the line or lines
Exit
No
Yes
Yes
No
No
Yes
Yes
No
Figure 26 The print screen function
This function was developed and tested initially without the Nut OS running and
worked perfectly. When the code was tested with the Nut OS running it no longer
worked as required. It only printed some characters and some characters evolved into
weird ASCII characters. It was determined that the Nut OS must be context switching
between threads when the data transfer to the LCD was not finished. To solve the
problem the LCD routines were given the highest thread priority will printing and then
the thread priority was restored to its original value. This solved the problem and the
screen printed properly.
55










