Ebay tft mit ILI9325 controller

Bonze

Neues Mitglied
16. Jan. 2010
516
0
0
Altenkirchen (Pfalz)
Sprachen
  1. BascomAVR
demnächst möcht ich ein Projekt starten und suche schon nach nem Display, dabei hab ich dieses hier gefunden, meint ihr das lässt sich ansteuern?
http://cgi.ebay.de/2-4-TFT-LCD-Modu...B-adapter-/190405717226?pt=LH_DefaultDomain_0
bzw
http://cgi.ebay.de/2-4-TFT-Color-LC...el-Screen-/200457913348?pt=LH_DefaultDomain_0
von der Technischen Beschreibung könnte es doch funktionieren, 8 und 16pin Bus, usw.

ich würd nur ein digramm drauifzeichnen wollen, und kleine einfacherere Grafiken anzeigen lassen.
 
Hallo Bonze!

Ansteuern lässt sich das Display auf jedenfall mit einem Mikrocontoller.
Ich habe auch noch einen Link dazu---> Klickst du
Unter BASCOM habe ich aber noch keine LIB gesehen.... nur Einzelfallbeispiele.

Allerdings sind es alles Auslandsgeschäfte und es kommen noch 20% Steuern hinzu..... :eek:
und die Lieferzeit bitte auch beachten! ;)


Gruß,
Cassio
 
ja gut aber 15€ +20% macht trotzdem nur 18€ oder :D? so billig hab ich solche displays noch nich gesehen
wenns machbar ist wärs auf jedenfall ne überlegung wert.
 
ja gut aber 15€ +20% macht trotzdem nur 18€ oder :D?

Hallo Bonze!

Das stimmt natürlich.

Allerdings.... wenn man es nachher nicht kontaktiert oder angetrieben bekommt wären auch 15 Euro schon zuviel, oder? ;)
Einer muss es aber mal probieren. Also los... :)

Warten gern auf dein Projektbericht.

Gruß,
Cassio
 
Hi,

mich würds schon reizen solange ich das feedback von euch hab!
und das mein projekt auch zustande kommt,.
also an der Hilfe solls wohl nicht scheitern ;) Ich hab mir das Ding jetzt
nicht genauer angesehen. Wenn es aber nen vernünftiges Datenblatt zum
Controller und zum Display gibt ist schon der größte Schritt getan. Allerdings
ist die Programmierung von nem GLCD nicht unbedingt einfach wenn man
alles selber machen muß und keine fertige Lib hat. Da sind Character-LCDs
schon eher "mal schnell" zum Leben zu erwecken. Also bitte keine Wunder erwarten.

Gruß
Dino
 
wie muss ich mir das vorstellen ? was muss da getan werden?

gibts irgend ne alternative?
hab da gesehen es gibt 2farbige glcds, das wär noch was,.
möchte halt ein kleines diagramm darstellen,. und das geht mit bisschen farbe am besten
wenn c sources vorhanden sind, wir schwer wäre es?

EDIT:
wenn man sich mal bei ebay umschaut gibts das display von ca 5 firmen,
und fast alle liefern beispielcode mit ,. dann muss mans ja auch ansteuern können ?!

z.B. hier
http://cgi.ebay.de/2-4-TFT-LCD-w-To...763?pt=LH_DefaultDomain_0&hash=item336033739b
 
ich bin sehr stark am überlegen ob ich mir dieses hole,.
http://cgi.ebay.com/2-4-TFT-LCD-Mod...226?pt=LH_DefaultDomain_0&hash=item2c5510acea
beispiel code in c ist dabei,..

habs mir geholt, mal sehen...

EDIT:
bin am Schaltplan überlegen und mir da leicht unsicher

hab ja 3 "Pinbänke"
die mittlere mit miso , mosi ist für die SD karte
die rechte für den Touch
und die linken 2 für die Datenverbindung

das CS irritiert mich irgendwie
 
Hab mal eben den vorläufigen schaltplan als pfd angehangen, aber bin immernoch irritiert, verstehe immernochnicht ob die Pinleiste des Displays bis auf SPI unbelegt bleibt,.
Irgendwie werd ich ned ganz schlau ob ich den 8Bit datenbus brauche +Spi oder den 16Bit nehmen kann ,.
 

Anhänge

  • schaltplan.pdf
    81,3 KB · Aufrufe: 101
hab ja jetzt nun alles am laufen, und ich frage mich die ganze zeit, kann man da an der geschwindigkeit noch was machen mit asm vielleicht?
beim text scrollen ruckelt es irgendwie,
betreib das ganze schon mit 16mhz,
mit nem 1284P
hier mal der code is vielleicht selbsterklärend

Code:
'*******************************************************************************
'Send a Index byte and a command word
'*******************************************************************************
Sub Lcd_write_reg(byval Index As Byte , Daten As Word)
  Call Lcd_write_index(index)
  Call Lcd_write_data(daten)
End Sub
'*******************************************************************************
' Sends a Index byte to the display
'*******************************************************************************
Sub Lcd_write_index(byval Index As Byte)
  Rs = 0                                                    'Index
  Lcdd = 0
  Wr = 0
  Wr = 1
  Lcdd = Index
  Wr = 0
  Wr = 1
End Sub
'*******************************************************************************
'Sends a double byte command to the display
'*******************************************************************************
Sub Lcd_write_data(byval Daten As Word)
  Temph = High(daten)
  Templ = Low(daten)
  Rs = 1                                                    'data
  Lcdd = Temph
  Wr = 0
  Wr = 1
  Lcdd = Templ
  Wr = 0
  Wr = 1
  Lcdd = 0                                                  'Reset port
End Sub

'*******************************************************************************
'*******************************************************************************
'Clear LCD   with color
'*******************************************************************************
Sub Lcd_clear(byval Color As Word)
   Local Tem As Long
   Call Set_cursor(0 , 0)
   Call Lcd_write_index(&H22)
   For Tem = 1 To 76799
      Call Lcd_write_data(color)
    Next
End Sub

'*******************************************************************************
'Set Cursor     on X             on Y
'*******************************************************************************
Sub Set_cursor(byval X As Word , Y As Word )
   Local Xpos As Word
   Local Ypos As Word
   'Xpos = 240 - X
   'Ypos = 320 - Y
   Call Lcd_write_reg(&H20 , X)
   Call Lcd_write_reg(&H21 , Y)
End Sub
'*******************************************************************************
'Set a Window
'*******************************************************************************
Sub Lcd_reset_window(byval X1 As Word , Byval X2 As Word , Byval Y1 As Word , Byval Y2 As Word)
   Call Lcd_write_reg(&H50 , X1)                            'Horizontal Address Start Position (0)
   Call Lcd_write_reg(&H51 , X2)                            'Horizontal Address end Position (239)
   Call Lcd_write_reg(&H52 , Y1)                            'Vertical Address Start Position
   Call Lcd_write_reg(&H53 , Y2)                            'Vertical Address end Position (319)
End Sub
'*******************************************************************************
' Set a pixel        on X             on Y         color
'*******************************************************************************
Sub Lcd_set_pixel(byval X1 As Word , Y1 As Word , Color As Word)
   Call Set_cursor(x1 , Y1)
   Call Lcd_write_index(&H22)
   Call Lcd_write_data(color)
End Sub
'*******************************************************************************
'Draw Horizonal line from x       to x          on y        color
'*******************************************************************************
Sub Lcd_h_line(byval X1 As Word , X2 As Word , Y As Word , Col As Word)
  Local L As Word
  L = X2 - X1

  Call Set_cursor(x1 , Y)
  Call Lcd_fill(l , Col)
End Sub
'*******************************************************************************
'
'*******************************************************************************
'Draw a Vertical line from Y      to Y         on x         color
'*******************************************************************************
Sub Lcd_v_line(byval Y1 As Word , Y2 As Word , X As Word , Col As Word)
  Local Yla As Word , Za As Word
  Yla = Y2 - Y1
  For Za = Y1 To Y2
  Call Set_cursor(x , Za)
  Call Lcd_write_index(&H22)
  Call Lcd_write_data(col)
  Next
End Sub

'*******************************************************************************
'Draw a Box      from X          to X           from Y       to Y          color
'*******************************************************************************
Sub Draw_box(byval X3 As Word , X4 As Word , Y4 As Word , Y5 As Word , Colo As Word)
  Local La As Word , Ly As Word
  La = X4 - X3                                              'länge der Line
  For Ly = Y4 To Y5
     Call Set_cursor(x3 , Ly)
     Call Lcd_fill(la , Colo)
   Next

End Sub
'*******************************************************************************
'Fülle LCD mit einer Farbe
'*******************************************************************************
Sub Lcd_fill(byval Lang As Word , Col As Word)
   Local Z As Long

   Call Lcd_write_index(&H22)

    For Z = 1 To Lang
      Call Lcd_write_data(col)

    Next
End Sub
'*******************************************************************************
' By Evert Dekker 2009 GraphicFont@Evertdekker dotje com
' thanks to Evert Dekker
'*******************************************************************************
Sub Lcdtext(byval S As String , Xoffset As Word , Yoffset As Word , Fontset As Byte , Forecolor As Word , Backcolor As Word )       'Print text on the display
Local Tempstring As String * 1 , Temp As Byte               'Dim local the variables
Local A As Word , Pixels As Byte , Count As Byte , Carcount As Byte , Lus As Byte
Local Row As Byte , Byteseach As Byte , Blocksize As Byte , Dummy As Byte
Local Colums As Byte , Columcount As Byte , Rowcount As Byte , Stringsize As Byte
Local Xpos As Word , Ypos As Word , Pixel As Word , Pixelcount As Byte
Stringsize = Len(s) - 1                                     'Size of the text string -1 because we must start with 0
For Carcount = 0 To Stringsize                              'Loop for the numbers of caracters that must be displayed

 If Fontset = 1 Then Restore Font8x8                        'Add or remove here fontset's that you need or not,
If Fontset = 2 Then Restore Font16x16                       'this is the name that you gave to the font, NOT the filename
' If Fontset = 3 Then Restore Font6x8                        'If you dont know the name, open the font file in wordpad, and there it is,
' If Fontset = 4 Then Restore Font5x5                        'right on top.
 If Fontset = 5 Then Restore 12x16

 Temp = Carcount + 1                                        'Cut the text string in seperate caracters
Tempstring = Mid(s , Temp , 1)
Read Row : Read Byteseach : Read Blocksize : Read Dummy     'Read the first 4 bytes from the font file
Temp = Asc(tempstring) - 32                                 'Font files start with caracter 32
For Lus = 1 To Temp                                         'Do dummie read to point to the correct line in the fontfile
   For Count = 1 To Blocksize
    Read Pixels
   Next Count
Next Lus
Colums = Blocksize / Row                                    'Calculate the numbers of colums
Row = Row * 8                                               'Row is always 8 pixels high = 1 byte, so working with row in steps of 8.
Row = Row - 1                                               'Want to start with row=0 instead of 1
Colums = Colums - 1                                         'Same for the colums
   For Rowcount = 0 To Row Step 8                           'Loop for numbers of rows
     A = Rowcount + Yoffset
       For Columcount = 0 To Colums                         'Loop for numbers of Colums
         Read Pixels
         Xpos = Columcount                                  'Do some calculation to get the caracter on the correct Xposition
         Temp = Carcount * Byteseach
         Xpos = Xpos + Temp
         Xpos = Xpos + Xoffset
            For Pixelcount = 0 To 7                         'Loop for 8 pixels to be set or not
               Ypos = A + Pixelcount                        'Each pixel on his own spot
               Pixel = Pixels.0                             'Set the pixel (or not)
                 If Pixel = 1 Then
                   Pixel = Forecolor
                 Else
                   Pixel = Backcolor
                 End If
                     Lcd_set_pixel Xpos , Ypos , Pixel
                    ' S65_pset Xpos , Ypos , Pixel           'Finaly we can set the pixel
                     Shift Pixels , Right                   'Shift the byte 1 bit to the right so the next pixel comes availible
            Next Pixelcount
       Next Columcount
   Next Rowcount
Next Carcount
End Sub                                                     'End of this amazing subroutine
'*******************************************************************************
'End of Sub from Evert Dekker
'*******************************************************************************
'*******************************************************************************
'*******************************************************************************
'LCD Initialisierung
'*******************************************************************************
Sub Lcd_init()
  Print "Sub lcd Init start"

   '//************* Reset LCD Driver ****************//
   Res = 1
   Waitms 1                                                 '// Delay 1ms
   Res = 0
   Waitms 10                                                '// Delay 10ms // This delay time is necessary
   Res = 1
   Waitms 50                                                '// Delay 50 ms
   '//************* Start Initial Sequence **********//
   'Call Lcd_write_reg(&He3 , &H3008)                        '// Set internal timing
   'Call Lcd_write_reg(&He7 , &H0012)                        '// Set internal timing
   'Call Lcd_write_reg(&Hef , &H1231)                        '// Set internal timing
   Call Lcd_write_reg(&H01 , &H0100)                        '// set SS and SM bit
   'Call Lcd_write_reg(&H02 , &H0700)                        '// set 1 line inversion
                                                                                                       'TRI DFM 0 BGR 0 0 HWM 0 ORG 0 I/D1 I/D0 AM 0 0 0
   Call Lcd_write_reg(&H03 , &H1030)                        '// set GRAM write direction and BGR=1.1028/1030           1  0  0  0  0  0  0  1   0    1  0 0 0
   Call Lcd_write_reg(&H04 , &H0000)                        '// Resize register
   'Call Lcd_write_reg(&H08 , &H0207)                        '// set the back porch and front porch
   'Call Lcd_write_reg(&H09 , &H0000)                        '// set non-display area refresh cycle ISC[3:0]
   Call Lcd_write_reg(&H0a , &H000D)                        'geändert von 0000 27.11. // FMARK function
   Call Lcd_write_reg(&H0d , &H0000)                        '// Frame marker Position
   '//*************Power On sequence ****************//
   Call Lcd_write_reg(&H10 , &H0000)                        '// SAP, BT[3:0], AP, DSTB, SLP, STB
   Call Lcd_write_reg(&H11 , &H0007)                        '// DC1[2:0], DC0[2:0], VC[2:0]
   Call Lcd_write_reg(&H12 , &H0000)                        '// VREG1OUT voltage
   Call Lcd_write_reg(&H13 , &H0000)                        '// VDV[4:0] for VCOM amplitude
   Waitms 200                                               '// Dis-charge capacitor power voltage
   Call Lcd_write_reg(&H10 , &H1490)                        '// SAP, BT[3:0], AP, DSTB, SLP, STB
   Call Lcd_write_reg(&H11 , &H0227)                        '// DC1[2:0], DC0[2:0], VC[2:0]   1000100111
   Waitms 50                                                '// Delay 50ms
   Call Lcd_write_reg(&H12 , &H001C)                        '// Internal reference voltage= Vci;
   Waitms 50                                                '// Delay 50ms
   Call Lcd_write_reg(&H13 , &H1A00)                        '// Set VDV[4:0] for VCOM amplitude
   Call Lcd_write_reg(&H29 , &H0025)                        '// Set VCM[5:0] for VCOMH
   Call Lcd_write_reg(&H2b , &H000E)                        '// Set Frame Rate /orig C / d ok
   Waitms 50                                                ' // Delay 50ms
   Call Lcd_write_reg(&H20 , &H0000)                        '// GRAM horizontal Address
   Call Lcd_write_reg(&H21 , &H0000)                        '// GRAM Vertical Address
   '// ----------- Adjust the Gamma Curve ----------//
   Call Lcd_write_reg(&H30 , &H0007)
   Call Lcd_write_reg(&H31 , &H0403)
   Call Lcd_write_reg(&H32 , &H0404)
   Call Lcd_write_reg(&H35 , &H0002)
   Call Lcd_write_reg(&H36 , &H0707)
   Call Lcd_write_reg(&H37 , &H0606)
   Call Lcd_write_reg(&H38 , &H0106)
   Call Lcd_write_reg(&H39 , &H0007)
   Call Lcd_write_reg(&H3c , &H0700)
   Call Lcd_write_reg(&H3d , &H0707)
   Waitms 50
   '//------------------ Set GRAM area ---------------//
   Call Lcd_write_reg(&H50 , &H0000)                        '// Horizontal GRAM Start Address
   Call Lcd_write_reg(&H51 , &H00EF)                        '// Horizontal GRAM End Address
   Call Lcd_write_reg(&H52 , &H0000)                        '// Vertical GRAM Start Address
   Call Lcd_write_reg(&H53 , &H013F)                        '// Vertical GRAM Start Address
   Call Lcd_write_reg(&H60 , &HA700)                        '// Gate Scan Line                 'Backlight an
   Call Lcd_write_reg(&H61 , &H0001)                        '// NDL,VLE, REV
   Call Lcd_write_reg(&H6a , &H0000)                        '// set scrolling line
   '//-------------- Partial Display Control ---------//
   Call Lcd_write_reg(&H80 , &H0000)
   Call Lcd_write_reg(&H81 , &H0000)
   Call Lcd_write_reg(&H82 , &H0000)
   Call Lcd_write_reg(&H83 , &H0000)
   Call Lcd_write_reg(&H84 , &H0000)
   Call Lcd_write_reg(&H85 , &H0000)
   '//-------------- Panel Control -------------------//
   Call Lcd_write_reg(&H90 , &H0010)                        '00000000 00010000  vorher 10 , 21.12 auf 18 geändert
   Call Lcd_write_reg(&H92 , &H0600)
   Call Lcd_write_reg(&H07 , &H0001)
   Waitms 50
   Call Lcd_write_reg(&H07 , &H0133)
End Sub

ich denke die routinen die immer wiederkehrend sind , würden ausreichend wie set_cursor, set pixel usw ,.
 
Hallo Bonze

Kannst du zu deinem Code für die ILI93xx-Displays noch die Beschaltung und Pin-Belegung angeben?
Betreibst du das nun im 16-Bit Modus oder per SPI?

Herzlichen Dank schon mal!!!!!

Viele Grüsse
Thomas
 

Ü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)