with new problems.
I've splitted the display with a grid in 3 lines and build the CSArial.bas based on Font Arial with Size 10.
When I now set PORTE.0 high then the display should show the time on the left side from line 2. The time is shown on the left side of line 2 but the time has overdrawn some pixel from my grid.
When I now set PORTE.1 high, then the date is shown in line 1 but the line from the grid is also lost. That is not enought the time from line 2 loses the first 2 rows of pixel.
I don't know if you understand my problem so I show you some code that hopefully makes it clear.
Code: Select all
Device = 18F452
Clock = 20
#option GLCD_RS = PORTB.2
#option GLCD_RST =PORTB.5
#option GLCD_EN = PORTB.4
#option GLCD_RW = PORTB.3
#option GLCD_CS1 = PORTB.1
#option GLCD_CS2 = PORTB.0
#option GLCD_RST = PORTB.5
#option GLCD_INVERT_CS = true
#option GLCD_INIT_DELAY = 700
Include "GLCD.bas"
Include "CSArial.bas"
Private Sub DisplayDate()
GLCD.WriteAt(12,3,"Di. 28.11.2006")
End Sub
Private Sub DisplayTime()
GLCD.WriteAt(10,24,"18:32")
End Sub
Dim Ke As PORTE.0
Dim Zu As PORTE.1
ADCON1 = %0000111
TRISE = 1
GLCD.Cls
GLCD.SetFont(ArialBold)
GLCD.Rectangle(0,0,127,63)
GLCD.Circle(60, 52,7)
GLCD.Line(0,21,127,21)
GLCD.Line(0,42,127,42)
While true
If Ke = 1 Then
DisplayTime
End If
If Zu = 1 Then
DisplayDate
End If
Wend
CS
P.S.: I use a EasyPic4 with a 18F452 at 20 MHz