Forum: Mikrocontroller und Digitale Elektronik GLCD geht nicht


von Jannis C. (klaxi33)


Lesenswert?

Hallo

Ich habe ein Problem mit meinem GLCD. Das Display heißt KS108. Ich habe 
ein Programm in Bascom AVR geschrieben und bin am verzweifeln, da sich 
auf dem Display nichts rührt.

Pogramm:
1
'-----------------------------------------------------------------------------------------
2
'name                     : ks108.bas
3
'copyright                : (c) 1995-2005, MCS Electronics
4
'purpose                  : demonstrates the KS108 based graphical display support
5
'micro                    : Mega323
6
'suited for demo          : no
7
'commercial addon needed  : no
8
'-----------------------------------------------------------------------------------------
9
10
$regfile = "m32def.dat"                                     ' specify the used micro
11
$crystal = 8000000                                          ' used crystal frequency
12
$baud = 19200                                               ' use baud rate
13
$hwstack = 32                                               ' default use 32 for the hardware stack
14
$swstack = 10                                               ' default use 10 for the SW stack
15
$framesize = 40                                             ' default use 40 for the frame space
16
17
Ddra = $b11111111
18
Porta = $b11111111
19
20
Ddrc = $b11111111
21
Portc = $b11111111
22
23
'some routines to control the display are in the glcdKS108.lib file
24
$lib "glcdKS108.lbx"
25
Wait 2
26
Print "Config"
27
28
'First we define that we use a graphic LCD
29
Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portc , Ce = 0 , Ce2 = 1 , Cd = 2 , Rd = 3 , Reset = 5 , Enable = 4
30
31
'The dataport is the portname that is connected to the data lines of the LCD
32
'The controlport is the portname which pins are used to control the lcd
33
'CE =CS1  Chip select
34
'CE2=CS2  Chip select second chip
35
'CD=Data/instruction
36
'RD=Read
37
'RESET = reset
38
'ENABLE= Chip Enable
39
Cls
40
Wait 1
41
42
'Dim variables (y not used)
43
Dim X As Byte , Y As Byte
44
45
'specify the font we want to use
46
Setfont Font8x8
47
48
49
'You can use locate but the columns have a range from 1-128
50
'When you want to show somthing on the LCD, use the LDAT command
51
'LCDAT Y , COL, value
52
Lcdat 1 , 1 , "123"
53
54
'lcdat accepts an additional param for inversing the text
55
Lcdat 2 , 1 , "123" , 1                                     ' will inverse the text
56
57
'Now use a different font
58
'Setfont Font8x8
59
'since the 16*16 font uses 2 rows, show on row 3
60
'Lcdat 1 , 1 , "2345"
61
'Lcdat 2 , 56 , "2345656"
62
Wait 1
63
Line(0 , 0) -(127 , 64) , 1                                 'make line
64
Wait 2
65
Line(0 , 0) -(127 , 64) , 0                                 'remove line
66
67
For Y = 1 To 20
68
   Circle(30 , 30) , Y , 1
69
   Waitms 100
70
Next
71
72
Wait 1
73
Glcdcmd &H3E , 1 : Glcdcmd &H3E , 2                         ' both displays off
74
Wait 1
75
Glcdcmd &H3F , 1 : Glcdcmd &H3F , 2                         'both on
76
'GLCDCMD accepts an additional param to select the chip
77
'With multiple, GLCDCMD statements, it is best to specify the chip only the first time
78
79
80
Showpic 0 , 0 , Plaatje                                     'show a comnpressed picture
81
End                                                         'end program
82
83
84
'we need to include the font files
85
'Notice that this is a testfont with only numbers defined !
86
'$include "smallfont8x8.font"
87
$include "font8x8.font"
88
'$include "font16x16.font"
89
90
91
Plaatje:
92
'include the picture data
93
$bgf "ks108.bgf"

Hat jemand eine ahnung woran es liegen könnte

von Spess53 (Gast)


Lesenswert?

Hi

>Hat jemand eine ahnung woran es liegen könnte

JTAG vom ATMega32 abgeschaltet?

MfG Spess

von Jannis C. (klaxi33)


Lesenswert?

geht leider auch nicht

von Jannis C. (klaxi33)


Lesenswert?

Das Display ist von Reichelt. Ich habe gehört, das es damit 
schwierigkeiten bei Bascom gibt.

von Sabri K. (salex)


Lesenswert?

Hast du hinten das Poti richtig Angeschlossen, und Funktioniert es 
überhaupt, und hast du schonmal die Ports an sich durchgemessen ?
Hab das gleiche Display, und hatte das gleiche Problem, da war das Poti 
schuld, weil es kaputt war, mess einfach mal durch.

Mfg Salex

von Sabri Kaygusuz (Gast)


Lesenswert?

Hallo,
nach fasst 2 Monaten freunde am Display ist mir in letzter Zeit wieder 
ein Fehler aufgefallen und zwar dass, das Display nach ca. 6 Minuten 
Einsatz zu Flackern anfängt und Pixelfehler ausgibt. Und sogar die Pixel 
einfach verschiebt, er muss immerwieder das gleiche Programm laden, also 
könnte es doch Theoretisch nicht an der Software liegen, oder ?
Mfg Sabri

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.