EA DIP128-6 zeigt nichts an

kollesch

Neues Mitglied
24. Nov. 2009
9
0
0
Sprachen
Hakko zusammen,
ich bin seit kurzem in die Welt der Atmega´s eingestiegen, Also bitte nicht gleich mit dem Hammer drauf hauen. Ich habe seit einigen Tagen mein Display zum laufen versucht, ausser ein hell beleuchteter Bildschirm kommt nichts. Nach einer gewissen Zeit zuckt mein Amperemter an der Spannungsversorgung, und dann geht alles aus, und meine Spannungsversorgung meldet Überlast ?!?

Ich habe meine Verdrahtung nochmasl genau nachgeschaut und habe auch mein Display auf der Rückseite mit Isolierband mal abgeklebt. Sor ichtig weisss ich jetzt aber auch nicht mehr weiter.

Da ich mir nicht ganz sicher war mit dem programmieren, habe ich mir das Beispiel von Bascom angepasst.

Ich hoffe ihr könnt mir helfen ....

Den Code den ich übertragen habe, ist folgender:


CodeBox BASCOM

'-----------------------------------------------------------------------------------------
'name : ks108.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : demonstrates the KS108 based graphical display support
'micro : Mega323
'suited for demo : no
'commercial addon needed : no
'-----------------------------------------------------------------------------------------

$regfile = "m32def.dat" ' specify the used micro
'$crystal = 8000000 ' used crystal frequency
'$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space


'some routines to control the display are in the glcdKS108.lib file
$lib "glcdKS108.lib"


Wait 2

Print "Config" ' printing will still work as only the receiver pin is disabled


'First we define that we use a graphic LCD
Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portc , Ce = 2 , Ce2 = 3 , Cd = 4 , Rd = 5 , Reset = 6 , Enable = 7

'The dataport is the portname that is connected to the data lines of the LCD
'The controlport is the portname which pins are used to control the lcd
'CE =CS1 Chip select
'CE2=CS2 Chip select second chip
'CD=Data/instruction
'RD=Read
'RESET = reset
'ENABLE= Chip Enable



'Dim variables (y not used)
Dim X As Byte , Y As Byte



Print "Cls"
Cls

Wait 1

'specify the font we want to use
Setfont Font8x8


'You can use locate but the columns have a range from 1-128
'When you want to show somthing on the LCD, use the LDAT command
'LCDAT Y , COL, value
Lcdat 1 , 1 , "123"

'lcdat accepts an additional param for inversing the text
Lcdat 2 , 1 , "123" , 1 ' will inverse the text

'Now use a different font
'Setfont Font8x8
'since the 16*16 font uses 2 rows, show on row 3
'Lcdat 1 , 1 , "2345"
'Lcdat 2 , 56 , "2345656"
Wait 1
Line(0 , 0) -(127 , 64) , 1 'make line
Wait 2
Line(0 , 0) -(127 , 64) , 0 'remove line

For Y = 1 To 20
Circle(30 , 30) , Y , 1
Waitms 100
Next

Wait 1
Glcdcmd &H3E , 1 : Glcdcmd &H3E , 2 ' both displays off
Wait 1
Glcdcmd &H3F , 1 : Glcdcmd &H3F , 2 'both on
'GLCDCMD accepts an additional param to select the chip
'With multiple, GLCDCMD statements, it is best to specify the chip only the first time


Showpic 0 , 0 , Plaatje 'show a comnpressed picture
End 'end program


'we need to include the font files
'Notice that this is a testfont with only numbers defined !
'$include "smallfont8x8.font"
$include "font8x8.font"
'$include "font16x16.font"


Plaatje:
'include the picture data
$bgf "ks108.bgf"
 
Nicht unbedingt. Aber wie gesagt, wenn du bei den Pins bleiben willst, dann musst du unbedingt die JTAG Fuse abschalten. Hast du schon mal die Fuses umprogrammiert?

HBA
 
Ja und das auch gleich mit Lernerfolg :) Ich hatte mich beim letzen abändern der Fusebits ausgesperrt. Das Fusbebit High H habe ich auf disabled gestellt. Jetzt kommt keine Überlastung an meinem Netzteil zustande. kann das möglich sein ? Aber angezeigt wird leider noch immer nichts...
 
jeeaaapppi ...

Ich hab es jetzt hinbekommen .... aahhh..dummer fehler...

Meine Taktfrequnz stand auf 1 Mhz, ich habe sie auf 8 Mhz gestellt,
jetzt brummt die Kiste...

Danke auch an alle, die mir geholfen haben, jetzt bin ich wieder mal ein
Stück weiter ... solangsam wird mit der Atmega heimisch :)
Danke danke nochmal...
 
Off Topic @dino:
Geändert von dino03 (Heute um 22:27 Uhr). Grund: Ich hab den Code mal in Tags gepackt ... Wird übersichtlicher ...
Gibt es eigentlich einen Trick, wie man den Code Copy und Pasten kann, wenn er in den Code Tags ist? Vorher ging es, jetzt bekomme ich immer die Zeilennummer vorne weg. Und die stören im BASCOM Editor.

HBA
 
Off Topic @dino:
Geändert von dino03 (Heute um 22:27 Uhr). Grund: Ich hab den Code mal in Tags gepackt ... Wird übersichtlicher ...
Gibt es eigentlich einen Trick, wie man den Code Copy und Pasten kann, wenn er in den Code Tags ist? Vorher ging es, jetzt bekomme ich immer die Zeilennummer vorne weg. Und die stören im BASCOM Editor.

HBA
Bei den normalen Code-Tags müßte es klappen ...
Code:
'-----------------------------------------------------------------------------------------
'name                     : ks108.bas
'copyright                : (c) 1995-2005, MCS Electronics
'purpose                  : demonstrates the KS108 based graphical display support
'micro                    : Mega323
'suited for demo          : no
'commercial addon needed  : no
'-----------------------------------------------------------------------------------------

$regfile = "m32def.dat"                                     ' specify the used micro
'$crystal = 8000000                                          ' used crystal frequency
'$baud = 19200                                               ' use baud rate
$hwstack = 32                                               ' default use 32 for the hardware stack
$swstack = 10                                               ' default use 10 for the SW stack
$framesize = 40                                             ' default use 40 for the frame space


'some routines to control the display are in the glcdKS108.lib file
$lib "glcdKS108.lib"


Wait 2

Print "Config"                                              ' printing will still work as only the receiver pin is disabled


'First we define that we use a graphic LCD
Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portc , Ce = 2 , Ce2 = 3 , Cd = 4 , Rd = 5 , Reset = 6 , Enable = 7

'The dataport is the portname that is connected to the data lines of the LCD
'The controlport is the portname which pins are used to control the lcd
'CE =CS1  Chip select
'CE2=CS2  Chip select second chip
'CD=Data/instruction
'RD=Read
'RESET = reset
'ENABLE= Chip Enable



'Dim variables (y not used)
Dim X As Byte , Y As Byte



Print "Cls"
Cls

Wait 1

'specify the font we want to use
Setfont Font8x8


'You can use locate but the columns have a range from 1-128
'When you want to show somthing on the LCD, use the LDAT command
'LCDAT Y , COL, value
Lcdat 1 , 1 , "123"

'lcdat accepts an additional param for inversing the text
Lcdat 2 , 1 , "123" , 1                                     ' will inverse the text

'Now use a different font
'Setfont Font8x8
'since the 16*16 font uses 2 rows, show on row 3
'Lcdat 1 , 1 , "2345"
'Lcdat 2 , 56 , "2345656"
Wait 1
Line(0 , 0) -(127 , 64) , 1                                 'make line
Wait 2
Line(0 , 0) -(127 , 64) , 0                                 'remove line

For Y = 1 To 20
   Circle(30 , 30) , Y , 1
   Waitms 100
Next

Wait 1
Glcdcmd &H3E , 1 : Glcdcmd &H3E , 2                         ' both displays off
Wait 1
Glcdcmd &H3F , 1 : Glcdcmd &H3F , 2                         'both on
'GLCDCMD accepts an additional param to select the chip
'With multiple, GLCDCMD statements, it is best to specify the chip only the first time


Showpic 0 , 0 , Plaatje                                     'show a comnpressed picture
End                                                         'end program


'we need to include the font files
'Notice that this is a testfont with only numbers defined !
'$include "smallfont8x8.font"
$include "font8x8.font"
'$include "font16x16.font"


Plaatje:
'include the picture data
$bgf "ks108.bgf"
Dafür ist das Highlighting dann weg. Beim Highlighting ist manchmal auch das
&-Zeichen als & drin. Sollte eigentlich nicht. Da strickt Dirk aber noch
dran rum das der Fehler weg ist. Hängt mit der Umsetzung in HTML für den
Browser zusammen. Ist wohl etwas aufwändiger.

Also entweder mit "code" oder mit "highlight=bascom" oder "highlight=asm"
oder "highlight=c" als Tag. Auf jeden Fall wird mit allen der Code vom
normalen Text optisch getrennt und es wird übersichtlicher.

Notfalls als TIP: Einfach bei dem Beitrag mit dem Quelltext auf "ZITIEREN"
klicken als ob man was dazu schreiben will. Dann hat man den Qelltext
frei ohne Zeilennummern und sonstiges im Editor stehen aus dem man dann
per Copy-n-Paste das rausholen kann was man haben möchte.

Gruß
Dino
 
Ok.. ich werde mir das jetzt auch merken, bevor ich wieder nur copy und paste mache...
Ich freu mir jetzt ein schnitzel in den Bauch :)

Gruß an alle :)
 
Hallo Dino,
wenn ich den Code aus deinem letzten Post kopiere und in den BASCOM Editor reinklebe, dann vergisst er dabei Luft zu holen, sprich alles kommt in eine Zeile. Keinerlei CR mehr. Sieht schnuckelig aus.

Den Umweg über Zitieren habe ich bis jetzt auch immer gemacht, aber ich dachte ich frag mal.

HBA
 
Hallo zusammen.

Off topic: Dem Problem Soucecode aus den Codehighlighting-Tags zu kopieren, werde ich mich am Wochenende annehmen. Es ist nicht einfach zu lösen, also noch ein bisschen gedulden :)

Dirk
 

Über uns

  • Makerconnect ist ein Forum, welches wir ausschließlich für einen Gedankenaustausch und als Diskussionsplattform für Interessierte bereitstellen, welche sich privat, durch das Studium oder beruflich mit Mikrocontroller- und Kleinstrechnersystemen beschäftigen wollen oder müssen ;-)
  • Dirk
  • Du bist noch kein Mitglied in unserer freundlichen Community? Werde Teil von uns und registriere dich in unserem Forum.
  •  Registriere dich

User Menu

 Kaffeezeit

  • Wir arbeiten hart daran sicherzustellen, dass unser Forum permanent online und schnell erreichbar ist, unsere Forensoftware auf dem aktuellsten Stand ist und der Server regelmäßig gewartet wird. Auch die Themen Datensicherheit und Datenschutz sind uns wichtig und hier sind wir auch ständig aktiv. Alles in allem, sorgen wir uns darum, dass alles Drumherum stimmt :-)

    Dir gefällt das Forum und unsere Arbeit und du möchtest uns unterstützen? Unterstütze uns durch deine Premium-Mitgliedschaft!
    Wir freuen uns auch über eine Spende für unsere Kaffeekasse :-)
    Vielen Dank! :ciao:


     Spende uns! (Paypal)