Hi Jürgen,
probiere mal.
$hwstack = 64
$swstack = 128
$framesize = 16
$regfile = "m2561def.dat"
$crystal = 16000000
'#########################
'4 - Definition of used ports and pull up resistors
'At our
boards we are using Port B for the SPI-communication to the LCD.
'Now we need
to select Port B as to an output port (data output to the display)
Ddrb = &B01100110 'DDR = Data
direction register; Port B1, B2, B4, B5, B6 switched to output (1) as
needed by the display .B7 neu an aus...
Portb = &B10001001 '... the
other ports of Port B are inputs with switched on pull up resistors
Ddra = &B00000000 'switch all
8 Ports of Port A to input (0), Pin (PA.0 - PA.7)
Porta = &B11111111 'All port
pins have individually selectable pull-up resistors. Here we enable
these pull-up-resisitors, so these Pins are always at logical 1
'You need to
pull these Pins against ground (GND)
Ddrc = &B00000000 'switch all Ports of Port C to
input
Portc = &B11111111 'all pull-up-Resistors turned on
Ddrd = &B00000000 'switch all Ports of Port D to
input
Portd = &B11111111 'all pull-up-Resistors turned on
Ddre = &B00000000 'switch all Ports of Port E to
input
Porte = &B11111111 'all pull-up-Resistors turned on
Ddrf = &B00000000 'switch all Ports of Port F to
input
Portf = &B11111111 'all pull-up-Resistors turned on
Ddrg = &B00000000 'switch all Ports of Port G to
input
Portg = &B11111111 'all pull-up-Resistors turned on
$include Init21_display3000.bas
Enable Interrupts
' Display PWM
Config Timer1 = Pwm , Pwm = 8 , Compare C Pwm = Clear Up , Compare C Pwm
= Clear Down , Prescale = 1
Config Clock = Soft
Config Date = Dmy , Separator = .
Date$ = "04.02.09"
Time$ = "17:35:00"
Call Lcd_print( "LCD UHR" , 1 , 0 , 2 , 2 , 2 , Dark_red , White)
'font 1, double height & width
do
.... eigene Prog-Zeilen
Call Lcd_print(date$ , 15 , 74 , 1 , 2 , 2 , Bright_yellow , Black)
Call Lcd_print(time$ , 15 , 93 , 1 , 2 , 2 , Bright_yellow , Black)
....
loop
end
$include Glcd21_display3000.bas
$include Glcd21_fonts.bas
'Dummy Data um Fehlermeldungen bei der Kompilierung der Standardroutinen
zu vermeiden
'Die Tabelle wird dann bei Nutzung eines indizierten Grafikdatei mit
"echten" Daten ausgetauscht
Colortable:
Data 0
Gruß
Kurt