- MultiPlus Wechselrichter Insel und Nulleinspeisung Conrad         
Ergebnis 1 bis 10 von 57

Thema: Gibt es noch Optimierungspotential? (Mega8 an 320x240 GLCD Textmodus)

Hybrid-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #1
    Erfahrener Benutzer Robotik Visionär
    Registriert seit
    26.11.2005
    Ort
    bei Uelzen (Niedersachsen)
    Beiträge
    7.942
    In C sehe ich das wenig Möglichkeiten zur Optimierung. Mit inline ASM könnte man ggf. noch etwas machen, vor allem beim (temp>>4). Die Funktion könnte man mit dem eher selten genutzten ASM Befehl swap deutlich schneller hinbekommen. Es würde mich wundern wenn der Compiler das erkennt. Ob noch mehr inline ASM sinnvoll ist, könnte man ggf. am ASM Code erkennen den der Compiler produziert. Es ist schon möglich das da noch einige Optimierungen möglich sind, sowohl in C als auch in ASM. Ein Punkt könnte die Form des Array-Zugriffs sein. Da könnte es schneller gehen, wenn man nur ein 1 Dim Array nutzt, und dafür beim schreiben in den Puffer etwas umrechnet - das muss nicht länger dauern, denn der Compiler muss an sich auf umrechnen.

    Der Code für die Ausgabe ist aber auch noch nicht so lang, da könnte ggf. sogar die ganze Schleife noch als inline ASM machen.

  2. #2
    Erfahrener Benutzer Roboter Genie
    Registriert seit
    20.08.2008
    Ort
    Karlsruhe
    Alter
    36
    Beiträge
    1.225
    Du möchtest nicht -O1 sondern -Os, da bei AVRs in der Regel die Geschwindigkeit mit der Größe korreliert. Probiers einfach Mal aus. Alternativ kannst du auch die richtig aggressiven Optimierungen anschalten und die Parameter zum Ausrollen von Schleifen modifizieren, dann geht der Code aber mit Sicherheit in die Breite.

    mfG
    Markus
    Tiny ASURO Library: Thread und sf.net Seite

  3. #3
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    31.05.2009
    Ort
    Stralsund
    Alter
    33
    Beiträge
    436
    Zitat Zitat von markusj Beitrag anzeigen
    Du möchtest nicht -O1 sondern -Os, da bei AVRs in der Regel die Geschwindigkeit mit der Größe korreliert. Probiers einfach Mal aus. Alternativ kannst du auch die richtig aggressiven Optimierungen anschalten und die Parameter zum Ausrollen von Schleifen modifizieren, dann geht der Code aber mit Sicherheit in die Breite.
    Da muss ich dich enttäuschen.
    -O1 ist schon die beste Lösung, sonst sinds gute 61Hz


    Das mit dem swap Befehl stimmt.
    Hab fix ne inline Funktion mit inline asm zusammengeworfen, das ergibt 66Hz
    Bis jetzt war die 1d Array Lösung noch nicht schneller, aber ich bin dran.
    Geändert von MisterMou (21.04.2012 um 18:14 Uhr)

  4. #4
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    01.10.2009
    Beiträge
    437
    Zitat Zitat von Besserwessi Beitrag anzeigen
    Mit inline ASM könnte man ggf. noch etwas machen, vor allem beim (temp>>4). Die Funktion könnte man mit dem eher selten genutzten ASM Befehl swap deutlich schneller hinbekommen. Es würde mich wundern wenn der Compiler das erkennt.
    Darfst Dich wundern, erkennt er.
    Code:
    swap    r24
    andi    r24,k0F
    out     p15,r24
    Da die Ausgabe für eine Zeile immer jeweils das erste Byte eines Zeichens, dann nächste Zeile das zweite, usw. ist, wäre eine andere Anordnung des Fonts vorteilhafter, weil dann weniger gerechnet werden müsste. Wenn also die erste Zeile eines beliebigen Zeichens linear über 256 Bytes Programmspeicher ansprechbar ist, fällt die Multiplikation mit 12 weg, die erforderlich ist um an die passende Stelle des Fonts zu gelangen.

    Statt
    Code:
    const unsigned char schrift[256][12] PROGMEM ={
    eine Anordnung
    Code:
    const unsigned char schrift[12][256] PROGMEM ={
    Ein
    Code:
    temp=pgm_read_byte(&schrift[j][text[ln_ctr][row_ctr]]);
    würde auf 71,7 Hz kommen. Keine Ahnung ob es sich lohnt die Tabelle dafür umzustellen.

    Nachtrag:
    Unter der Voraussetzung, dass die Fonttabelle [12][256] lautet, würde dies hier für 78,4 Hz sorgen, Optimierung -Os:
    Code:
    unsigned char *cptr;
    // ...
    cptr = &schrift[j][0];
       for( unsigned char row_ctr = 0; row_ctr < rows; row_ctr++)
       {
          temp=pgm_read_byte(cptr + text[ln_ctr][row_ctr]);
    // ...
    Geändert von MagicWSmoke (21.04.2012 um 19:27 Uhr)

  5. #5
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    31.05.2009
    Ort
    Stralsund
    Alter
    33
    Beiträge
    436
    Krass, wie hast du die 71,7 Hz berechnet?
    Ich hab deinen Vorschlag durchgearbeitet, komm jetzt auf 71,6 Hz.

    Man gut, dass man als Programmierer sowas automatisieren kann

    Ich hab das Gefühl wir kommen gut voran

    Aktueller Stand:
    Code:
    /*
     *B0-CP
     *B1-LOAD
     *B2-FRAME
     *
     *C0-D0
     *C1-D1
     *C2-D2
     *C3-D3
     *
     *Mega8 @ 16MHz
     */ 
    
    #define CP 0
    #define LOAD 1
    #define FRAME 2
    
    #include <avr/io.h>
    #include <avr/interrupt.h>
    #include <avr/pgmspace.h>
    
    //8x12 Schrift
    //http://www.mikrocontroller.net/topic/54860
    //Danke Benedikt!
    
    const unsigned char schrift[12][256] PROGMEM ={
    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x30,0x00,0xC0,0x38,0x00,0x30,0x00,0xC0,0x00,0x10,0x60,0x00,0x78,0x0C,0x00,0x00,0x30,0x00,0xC0,0x30,0xC0,0x00,0x00,0xCC,0x00,0x3C,0x00,0x00,0x0E,0x0C,0x0C,0x0C,0x0C,0x00,0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x55,0x6D,0x18,0x18,0x0C,0x78,0x60,0x00,0x66,0x66,0x00,0x66,0x00,0xCC,0x00,0x18,0x18,0x00,0x18,0x00,0x18,0x00,0x76,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0xCC,0x00,0x78,0x00,0x60,0x00,0x18,0x78,0x00,0x18,0x00,0xFF,0x00,0x00,0x60,0xFF,0x18,0x00,0x78,0x60,0x00,0x76,0x00,0x00,0x00,0x18,0x78,0x60,0x06,0x18,0x00,0x0C,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x00,0x7E,0x7E,0x00,0x10,0x18,0x18,0x00,0x00,0x00,0x00,0x3E,0x3C,0x00,0x7F,0x00,0x80,0x02,0x18,0x66,0x7F,0x7E,0x00,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x66,0x6C,0x30,0x00,0x70,0x30,0x0C,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x10,0x78,0x78,0x0C,0xFC,0x38,0xFE,0x78,0x78,0x00,0x00,0x0C,0x00,0x60,0x78,0x7C,0x30,0xFC,0x3C,0xF8,0xFE,0xFE,0x3C,0xCC,0x78,0x1E,0xE6,0xF0,0xC6,0xC6,0x38,0xFC,0x38,0xFC,0x78,0xFC,0xCC,0xCC,0xC6,0xCC,0xCC,0xFE,0x3C,0x00,0x3C,0x38,0x00,0x30,0x00,0xE0,0x00,0x1C,0x00,0x38,0x00,0xE0,0x18,0x0C,0xE0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x18,0xE0,0x73,0x00,0x78,0xCC,0x18,0x78,0xCC,0x60,0x6C,0x00,0x78,0xCC,0x60,0x6C,0x38,0x30,0xCC,0xCC,0x18,0x00,0x3E,0x78,0xCC,0x60,0x78,0x60,0x66,0xCC,0x00,0x00,0x66,0x3A,0x00,0x1B,0x18,0x18,0x18,0x18,0x76,0xDC,0x78,0x78,0x30,0x38,0x00,0x62,0x63,0x30,0x00,0x00,0x92,0xAA,0xDB,0x18,0x18,0x18,0xCC,0x30,0x38,0x66,0x66,0x00,0x66,0x30,0xCC,0x00,0x18,0x18,0x00,0x18,0x00,0x18,0x76,0xDC,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x30,0xF8,0xCC,0xCC,0x30,0xF0,0x30,0xCC,0xCC,0x18,0x00,0xFF,0x00,0x18,0x30,0xFF,0x30,0x78,0xCC,0x30,0x76,0xDC,0x00,0x00,0xF0,0x30,0xCC,0x30,0x0C,0x30,0xFC,0x18,0x00,0x00,0x00,0x33,0x7F,0x7E,0x00,0x00,0x3C,0xCC,0x00,0x30,0x78,0x78,0x00,0x00},
    {0x00,0xC3,0xFF,0x44,0x38,0x3C,0x3C,0x00,0x00,0x00,0x00,0x0E,0x66,0x00,0x63,0x18,0xC0,0x06,0x3C,0x66,0xDB,0x63,0x00,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00,0x10,0xFE,0x00,0x78,0x66,0x6C,0x7C,0x00,0xD8,0x30,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x02,0xC6,0x30,0xCC,0xCC,0x1C,0xC0,0x60,0xC6,0xCC,0xCC,0x00,0x00,0x18,0x00,0x30,0xCC,0xC6,0x78,0x66,0x66,0x6C,0x62,0x66,0x66,0xCC,0x30,0x0C,0x66,0x60,0xEE,0xC6,0x6C,0x66,0x6C,0x66,0xCC,0xB4,0xCC,0xCC,0xC6,0xCC,0xCC,0xCE,0x30,0x80,0x0C,0x6C,0x00,0x18,0x00,0x60,0x00,0x0C,0x00,0x6C,0x00,0x60,0x18,0x0C,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x18,0x30,0xDA,0x00,0xCC,0xCC,0x30,0xCC,0xCC,0x30,0x6C,0x00,0xCC,0xCC,0x30,0x6C,0x6C,0x18,0x00,0xCC,0x00,0x00,0x78,0xCC,0xCC,0x30,0xCC,0x30,0x66,0x00,0xCC,0x00,0x60,0x6C,0x00,0x18,0x30,0x30,0x30,0x30,0xDC,0x00,0xCC,0xCC,0x30,0x44,0x00,0xE6,0xE6,0x30,0x00,0x00,0x49,0x55,0xB6,0x18,0x18,0x00,0x00,0x00,0x44,0x66,0x66,0x00,0x66,0x30,0xCC,0x00,0x18,0x18,0x00,0x18,0x00,0x18,0xDC,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0xD8,0x6C,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x18,0x00,0xFF,0x00,0x18,0x00,0xFF,0x00,0xCC,0x00,0x00,0xDC,0x00,0x00,0xE0,0x60,0x00,0x00,0x00,0x18,0x00,0x00,0x30,0x00,0x30,0x00,0x66,0xDB,0x63,0x30,0x00,0x66,0x00,0x00,0x70,0x0C,0x0C,0x00,0x00},
    {0x00,0x81,0xFF,0xEE,0x7C,0x3C,0x7E,0x00,0x00,0x00,0x00,0x3A,0x66,0x00,0x7F,0xDB,0xE0,0x0E,0x7E,0x66,0xDB,0x30,0x00,0x7E,0x7E,0x18,0x18,0x30,0x00,0x24,0x10,0xFE,0x00,0x78,0x66,0xFE,0xC0,0xC4,0xD8,0x30,0x30,0x18,0x66,0x18,0x00,0x00,0x00,0x06,0xCE,0xF0,0xCC,0x0C,0x3C,0xC0,0xC0,0xC6,0xCC,0xCC,0x38,0x38,0x30,0x00,0x18,0x0C,0xC6,0xCC,0x66,0xC6,0x66,0x60,0x62,0xC6,0xCC,0x30,0x0C,0x6C,0x60,0xFE,0xE6,0xC6,0x66,0xC6,0x66,0xCC,0x30,0xCC,0xCC,0xC6,0xCC,0xCC,0x98,0x30,0xC0,0x0C,0xC6,0x00,0x00,0x00,0x60,0x00,0x0C,0x00,0x60,0x00,0x60,0x00,0x00,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x18,0x30,0xCE,0x10,0xCC,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x78,0xFC,0x00,0xD8,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xCC,0x00,0x60,0xCE,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0xC6,0xCC,0xCC,0x00,0xBA,0x00,0x6C,0x6C,0x00,0x00,0x00,0x24,0xAA,0x6D,0x18,0x18,0x30,0x30,0x30,0xBA,0x66,0x66,0x00,0x66,0x78,0xCC,0x00,0x18,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x0C,0x66,0xFC,0xFC,0xFC,0x30,0x78,0x78,0x78,0x18,0x00,0xFF,0x00,0x18,0x78,0xFF,0x78,0xCC,0x78,0x78,0x00,0x78,0x00,0x60,0x7C,0xCC,0xCC,0xCC,0x00,0xCC,0x00,0x00,0x00,0x30,0x00,0x3C,0xDB,0x30,0x30,0x00,0x66,0x00,0x00,0x30,0x38,0x18,0xFC,0x00},
    {0x00,0xA5,0xDB,0xFE,0xFE,0xFF,0xFF,0x00,0x00,0x00,0x00,0x72,0x66,0x00,0x63,0x7E,0xF8,0x3E,0x18,0x66,0xDB,0x3C,0x00,0x18,0x18,0x18,0x0C,0x60,0xC0,0x66,0x38,0x7C,0x00,0x78,0x24,0x6C,0xC0,0xCC,0x70,0x60,0x60,0x0C,0x3C,0x18,0x00,0x00,0x00,0x0C,0xDE,0x30,0x0C,0x0C,0x6C,0xC0,0xC0,0x06,0xCC,0xCC,0x38,0x38,0x60,0x7E,0x0C,0x18,0xDE,0xCC,0x66,0xC0,0x66,0x64,0x64,0xC0,0xCC,0x30,0x0C,0x6C,0x60,0xFE,0xF6,0xC6,0x66,0xC6,0x66,0xC0,0x30,0xCC,0xCC,0xC6,0x78,0xCC,0x18,0x30,0x60,0x0C,0x00,0x00,0x00,0x78,0x7C,0x78,0x7C,0x78,0x60,0x76,0x6C,0x78,0x3C,0x66,0x18,0xFC,0xF8,0x78,0xDC,0x76,0xEC,0x78,0xFC,0xCC,0xCC,0xC6,0xC6,0x66,0xFC,0x60,0x18,0x18,0x00,0x38,0xC0,0xCC,0x78,0x78,0x78,0x78,0xF8,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0xC4,0xFE,0xD8,0x78,0x78,0x78,0xCC,0xCC,0x66,0xCC,0xCC,0x78,0x60,0xD6,0x00,0x7E,0x78,0x78,0x78,0xCC,0xF8,0xE6,0x7E,0x78,0x30,0xAA,0x00,0x78,0x78,0x30,0x33,0xCC,0x92,0x55,0xDB,0x18,0x18,0x78,0x78,0x78,0xA2,0xE6,0x66,0xFE,0xE6,0xCC,0x78,0x00,0x18,0x18,0x00,0x18,0x00,0x18,0x78,0x78,0x67,0x7F,0xE7,0xFF,0x67,0xFF,0xE7,0x00,0x06,0x66,0xC4,0xC4,0xC4,0x30,0x30,0x30,0x30,0x18,0x00,0xFF,0x00,0x18,0x30,0xFF,0xCC,0xD8,0xCC,0xCC,0x78,0xCC,0x66,0x7C,0x66,0xCC,0xCC,0xCC,0x66,0xCC,0x00,0x00,0x00,0xFC,0x00,0xF8,0xDB,0x3C,0x00,0x00,0x66,0x00,0x00,0x30,0x0C,0x30,0xFC,0x00},
    {0x00,0x81,0xFF,0xFE,0xFE,0xE7,0xFF,0x00,0x00,0x00,0x00,0xF8,0x3C,0x00,0x63,0xE7,0xFE,0xFE,0x18,0x66,0x7B,0x66,0x00,0x18,0x18,0x18,0xFE,0xFE,0xC0,0xFF,0x38,0x7C,0x00,0x30,0x00,0x6C,0x78,0x18,0xFA,0x00,0x60,0x0C,0xFF,0x7E,0x00,0xFE,0x00,0x18,0xD6,0x30,0x18,0x38,0xCC,0xF8,0xF8,0x0C,0x78,0x7C,0x00,0x00,0xC0,0x00,0x06,0x30,0xDE,0xCC,0x7C,0xC0,0x66,0x7C,0x7C,0xC0,0xFC,0x30,0x0C,0x78,0x60,0xD6,0xFE,0xC6,0x7C,0xC6,0x7C,0x70,0x30,0xCC,0xCC,0xD6,0x30,0x78,0x30,0x30,0x30,0x0C,0x00,0x00,0x00,0x0C,0x66,0xCC,0xCC,0xCC,0xF8,0xCC,0x76,0x18,0x0C,0x6C,0x18,0xD6,0xCC,0xCC,0x66,0xCC,0x6E,0xCC,0x60,0xCC,0xCC,0xC6,0x6C,0x66,0x8C,0xC0,0x00,0x0C,0x00,0x6C,0xC0,0xCC,0xCC,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0xCC,0x18,0x18,0x18,0xCC,0xCC,0xC0,0x1B,0xFE,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0xCC,0xCC,0xCC,0xFC,0xD6,0xC6,0x18,0x0C,0x18,0xCC,0xCC,0xCC,0xF6,0x00,0x00,0x60,0xBA,0xFC,0x30,0x37,0x30,0x66,0x66,0x49,0xAA,0xB6,0x18,0xF8,0xCC,0xCC,0xCC,0xA2,0x06,0x66,0x06,0x06,0xC0,0xFC,0xF8,0x1F,0xFF,0xFF,0x1F,0xFF,0xFF,0x0C,0xCC,0x60,0x60,0x00,0x00,0x60,0x00,0x00,0xC6,0x7E,0xF6,0xC0,0xC0,0xC0,0xFC,0x30,0x30,0x30,0xF8,0x1F,0xFF,0x00,0x00,0x30,0xFF,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0x66,0x66,0xCC,0xCC,0xCC,0x66,0xCC,0x00,0x00,0xFC,0x30,0xF8,0x37,0x7B,0x66,0xFC,0x00,0x3C,0x00,0x18,0x78,0x78,0x7C,0xFC,0x00},
    {0x00,0xBD,0xC3,0xFE,0x7C,0xE7,0x7E,0x00,0x00,0x00,0x00,0xCC,0x18,0x00,0x63,0xE7,0xF8,0x3E,0x18,0x00,0x1B,0x66,0x00,0x18,0x18,0x18,0x0C,0x60,0xC0,0x66,0x7C,0x38,0x00,0x30,0x00,0x6C,0x0C,0x30,0xDE,0x00,0x60,0x0C,0x3C,0x18,0x00,0x00,0x00,0x30,0xF6,0x30,0x30,0x0C,0xFE,0x0C,0xCC,0x18,0xCC,0x18,0x00,0x00,0x60,0x7E,0x0C,0x30,0xDE,0xFC,0x66,0xC0,0x66,0x64,0x64,0xCE,0xCC,0x30,0xCC,0x6C,0x62,0xC6,0xDE,0xC6,0x60,0xCE,0x6C,0x18,0x30,0xCC,0xCC,0xD6,0x78,0x30,0x60,0x30,0x18,0x0C,0x00,0x00,0x00,0x7C,0x66,0xC0,0xCC,0xFC,0x60,0xCC,0x66,0x18,0x0C,0x78,0x18,0xD6,0xCC,0xCC,0x66,0xCC,0x76,0x60,0x60,0xCC,0xCC,0xD6,0x38,0x66,0x18,0x60,0x18,0x18,0x00,0xC6,0xC0,0xCC,0xFC,0x7C,0x7C,0x7C,0x7C,0xC0,0xFC,0xFC,0xFC,0x18,0x18,0x18,0xCC,0xCC,0xF8,0x7F,0xD8,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0xCC,0xCC,0xDC,0x60,0xD6,0x6C,0x18,0x7C,0x18,0xCC,0xCC,0xCC,0xDE,0xFE,0xFE,0xC0,0xB2,0x0C,0x6E,0x6F,0x78,0xCC,0x33,0x24,0x55,0x6D,0x18,0x18,0xCC,0xCC,0xCC,0xA2,0x06,0x66,0x06,0x06,0xC0,0x30,0x18,0x00,0x00,0x18,0x18,0x00,0x18,0x7C,0xCC,0x60,0x60,0x00,0x00,0x60,0x00,0x00,0x7C,0xC6,0x66,0xF8,0xF8,0xF8,0x00,0x30,0x30,0x30,0x00,0x18,0xFF,0xFF,0x18,0x30,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0x66,0x66,0xCC,0xCC,0xCC,0x66,0x78,0x00,0x00,0x00,0x30,0x00,0x6F,0x1B,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00},
    {0x00,0x99,0xE7,0x7C,0x38,0x18,0x18,0x00,0x00,0x00,0x00,0xCC,0x7E,0x00,0x67,0x7E,0xE0,0x0E,0x7E,0x00,0x1B,0x3C,0xFE,0x7E,0x18,0x7E,0x18,0x30,0xFE,0x24,0x7C,0x38,0x00,0x00,0x00,0xFE,0x0C,0x60,0xCC,0x00,0x30,0x18,0x66,0x18,0x00,0x00,0x00,0x60,0xE6,0x30,0x60,0x0C,0x0C,0x0C,0xCC,0x30,0xCC,0x18,0x38,0x38,0x30,0x00,0x18,0x00,0xC0,0xCC,0x66,0xC6,0x66,0x60,0x60,0xC6,0xCC,0x30,0xCC,0x6C,0x66,0xC6,0xCE,0xC6,0x60,0xDE,0x66,0xCC,0x30,0xCC,0xCC,0x6C,0xCC,0x30,0x62,0x30,0x0C,0x0C,0x00,0x00,0x00,0xCC,0x66,0xC0,0xCC,0xC0,0x60,0xCC,0x66,0x18,0x0C,0x6C,0x18,0xD6,0xCC,0xCC,0x66,0xCC,0x60,0x18,0x60,0xCC,0xCC,0xD6,0x38,0x66,0x60,0x30,0x18,0x30,0x00,0xC6,0xCC,0xCC,0xC0,0xCC,0xCC,0xCC,0xCC,0xC0,0xC0,0xC0,0xC0,0x18,0x18,0x18,0xFC,0xFC,0xC0,0xD8,0xD8,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0xCC,0xCC,0xEC,0x60,0xE6,0x38,0x18,0xCC,0x18,0xCC,0xCC,0xCC,0xCE,0x00,0x00,0xC0,0xAA,0x0C,0xC3,0xDB,0x78,0xCC,0x33,0x92,0xAA,0xDB,0x18,0x18,0xFC,0xFC,0xFC,0xBA,0xE6,0x66,0xE6,0xFE,0xCC,0xFC,0x18,0x00,0x00,0x18,0x18,0x00,0x18,0xCC,0xFC,0x7F,0x67,0xFF,0xE7,0x67,0xFF,0xE7,0x6C,0xC6,0x66,0xC0,0xC0,0xC0,0x00,0x30,0x30,0x30,0x00,0x18,0xFF,0xFF,0x18,0x30,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0x7C,0x7C,0xCC,0xCC,0xCC,0x66,0x30,0x00,0x00,0x00,0x00,0x00,0xDB,0x1B,0x3C,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00},
    {0x00,0xC3,0xFF,0x38,0x10,0x18,0x18,0x00,0x00,0x00,0x00,0xCC,0x18,0x00,0xE7,0xDB,0xC0,0x06,0x3C,0x66,0x1B,0x0C,0xFE,0x3C,0x18,0x3C,0x00,0x00,0x00,0x00,0xFE,0x10,0x00,0x30,0x00,0x6C,0xF8,0xCC,0xDC,0x00,0x18,0x30,0x00,0x00,0x38,0x00,0x38,0xC0,0xC6,0x30,0xCC,0xCC,0x0C,0xCC,0xCC,0x30,0xCC,0x30,0x38,0x38,0x18,0x00,0x30,0x30,0xC0,0xCC,0x66,0x66,0x6C,0x62,0x60,0x66,0xCC,0x30,0xCC,0x66,0x66,0xC6,0xC6,0x6C,0x60,0x7C,0x66,0xCC,0x30,0xCC,0x78,0x6C,0xCC,0x30,0xC6,0x30,0x06,0x0C,0x00,0x00,0x00,0xCC,0x66,0xCC,0xCC,0xCC,0x60,0x7C,0x66,0x18,0x0C,0x66,0x18,0xD6,0xCC,0xCC,0x66,0xCC,0x60,0xCC,0x6C,0xCC,0x78,0x6C,0x6C,0x3C,0xC4,0x30,0x18,0x30,0x00,0xFE,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xC0,0xC0,0xC0,0x18,0x18,0x18,0xCC,0xCC,0xC4,0xD8,0xD8,0xCC,0xCC,0xCC,0xCC,0xCC,0x3C,0xCC,0xCC,0xCC,0xC0,0x6C,0x6C,0xD8,0xCC,0x18,0xCC,0xCC,0xCC,0xC6,0x00,0x00,0xCC,0x44,0x0C,0x86,0xB3,0x78,0x66,0x66,0x49,0x55,0xB6,0x18,0x18,0xCC,0xCC,0xCC,0x44,0x66,0x66,0x66,0x00,0x78,0x30,0x18,0x00,0x00,0x18,0x18,0x00,0x18,0xCC,0xCC,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0x7C,0xC6,0x6C,0xC4,0xC4,0xC4,0x00,0x30,0x30,0x30,0x00,0x18,0xFF,0xFF,0x18,0x30,0x00,0xCC,0xF8,0xCC,0xCC,0xCC,0xCC,0x66,0x60,0x60,0xCC,0xCC,0xCC,0x3C,0x30,0x00,0x00,0x00,0xFC,0xF8,0xB3,0x1B,0x0C,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00},
    {0x00,0x7E,0x7E,0x10,0x00,0x7E,0x7E,0x00,0x00,0x00,0x00,0x78,0x18,0x00,0xE6,0x18,0x80,0x02,0x18,0x66,0x1B,0xC6,0xFE,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0xFE,0x10,0x00,0x30,0x00,0x6C,0x30,0x8C,0x76,0x00,0x0C,0x60,0x00,0x00,0x38,0x00,0x38,0x80,0x7C,0xFC,0xFC,0x78,0x1E,0x78,0x78,0x30,0x78,0x70,0x00,0x18,0x0C,0x00,0x60,0x30,0x7C,0xCC,0xFC,0x3C,0xF8,0xFE,0xF0,0x3E,0xCC,0x78,0x78,0xE6,0xFE,0xC6,0xC6,0x38,0xF0,0x0C,0xE6,0x78,0x78,0x78,0x30,0x6C,0xCC,0x78,0xFE,0x3C,0x02,0x3C,0x00,0x00,0x00,0x76,0xDC,0x78,0x76,0x78,0xF0,0x0C,0xE6,0x7E,0xCC,0xE6,0x7E,0xC6,0xCC,0x78,0x7C,0x7C,0xF0,0x78,0x38,0x76,0x30,0x6C,0xC6,0x0C,0xFC,0x1C,0x18,0xE0,0x00,0x00,0x78,0x76,0x78,0x76,0x76,0x76,0x76,0x78,0x7C,0x7C,0x7C,0x7E,0x7E,0x7E,0xCC,0xCC,0xFC,0xEF,0xDE,0x78,0x78,0x78,0x76,0x76,0x0C,0x78,0x78,0x78,0xFE,0xB8,0xC6,0x70,0x76,0x7E,0x78,0x76,0xCC,0xC6,0x00,0x00,0x78,0x38,0x00,0x0C,0x3F,0x30,0x33,0xCC,0x24,0xAA,0x6D,0x18,0x18,0xCC,0xCC,0xCC,0x38,0x66,0x66,0x66,0x00,0x30,0x30,0x18,0x00,0x00,0x18,0x18,0x00,0x18,0x76,0xCC,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0xC6,0x7C,0xF8,0xFC,0xFC,0xFC,0x00,0x78,0x78,0x78,0x00,0x18,0xFF,0xFF,0x18,0x78,0x00,0x78,0xC0,0x78,0x78,0x78,0x78,0x7B,0xF0,0xF0,0x78,0x78,0x78,0x0C,0x78,0x00,0x00,0x00,0x00,0x00,0x3F,0x1B,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0x00,0x00,0x00,0x60,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x03,0x00,0x00,0x00,0x92,0x55,0xDB,0x18,0x18,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x00,0x30,0x00,0x18,0x00,0x00,0x18,0x18,0x00,0x18,0x00,0x00,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xFF,0xFF,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x7E,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0xF0,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0xAA,0xB6,0x18,0x18,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x00,0x00,0x00,0x18,0x00,0x00,0x18,0x18,0x00,0x18,0x00,0x00,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
    };
    
    static inline unsigned char swap (unsigned char x)
    {
        asm volatile ("swap %0" : "=r" (x) : "0" (x));
        return x;
    }
        
    int main(void)
    {
        
        unsigned char text[20][40];
        unsigned char zeichen=0;
        unsigned char temp;
        
        for (unsigned char y=0;y<20;y++)
        {
            for (unsigned char x=0;x<40;x++)
                text[y][x]=zeichen++;            
        }
        
        
        DDRC=0x0F;
        DDRB=0x07;
        
        PORTB=(1<<FRAME)|(1<<LOAD);
        
        while(1)
        {
               PORTB=(1<<FRAME)|(1<<CP);
               
            for(unsigned char i =0; i<20;i++)
            {
                for(unsigned char j =0; j<12;j++)
                {
                    for( unsigned char k =0; k<40;k++)
                    {
                        temp=pgm_read_byte(&schrift[j][ text[i][k] ]);
                        
                        PORTB=(1<<CP);                
                        PORTC=swap(temp);        //ersten 4 Pixel                                    
                        PORTB=0;                    
                        PORTB=(1<<CP);        //zweiten 4 Pixel                
                        PORTC=temp;                    
                        PORTB=0;                    
                                        
                    }                            
                PORTB=(1<<LOAD);    
                }
                
            }
            PORTB=(1<<LOAD)|(1<<FRAME);
            
        }
        
        
    }

  6. #6
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    01.10.2009
    Beiträge
    437
    Zitat Zitat von MisterMou Beitrag anzeigen
    Krass, wie hast du die 71,7 Hz berechnet?
    Ich hab deinen Vorschlag durchgearbeitet, komm jetzt auf 71,6 Hz.
    Ja, ist mir beim erneuten compilieren und simulieren dann auch aufgefallen dass es nur 71,6 sind, hab's dann nicht mehr so wichtig gefunden es zu ändern.
    Geändert hab' ich trotzdem, schau nochmal mein voriges Post an, da bin ich schon ein wenig weiter

  7. #7
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    31.05.2009
    Ort
    Stralsund
    Alter
    33
    Beiträge
    436
    Ich kann noch einen nachlegen, 89,4 Hz bei -O2 Optimierung

    Jedes Byte im Schrift-Array wurde woher schon geswapt, so können die ersten 4Pixel so eingelesen werden, und dann wird geswapt. So wird eine Variable gespart

    Code:
       
     /*
         *B0-CP
         *B1-LOAD
         *B2-FRAME
         *
         *C0-D0
         *C1-D1
         *C2-D2
         *C3-D3
         *
         *Mega8 @ 16MHz
         */ 
    
        #define CP 0
        #define LOAD 1
        #define FRAME 2
    
        #include <avr/io.h>
        #include <avr/interrupt.h>
        #include <avr/pgmspace.h>
    
        //8x12 Schrift
        //http://www.mikrocontroller.net/topic/54860
        //Danke Benedikt!
    
        const unsigned char schrift[12][256] PROGMEM ={
        {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x03,0x00,0x0C,0x83,0x00,0x03,0x00,0x0C,0x00,0x01,0x06,0x00,0x87,0xC0,0x00,0x00,0x03,0x00,0x0C,0x03,0x0C,0x00,0x00,0xCC,0x00,0xC3,0x00,0x00,0xE0,0xC0,0xC0,0xC0,0xC0,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x55,0xD6,0x81,0x81,0xC0,0x87,0x06,0x00,0x66,0x66,0x00,0x66,0x00,0xCC,0x00,0x81,0x81,0x00,0x81,0x00,0x81,0x00,0x67,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0xCC,0x00,0x87,0x00,0x06,0x00,0x81,0x87,0x00,0x81,0x00,0xFF,0x00,0x00,0x06,0xFF,0x81,0x00,0x87,0x06,0x00,0x67,0x00,0x00,0x00,0x81,0x87,0x06,0x60,0x81,0x00,0xC0,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
     {0x00,0xE7,0xE7,0x00,0x01,0x81,0x81,0x00,0x00,0x00,0x00,0xE3,0xC3,0x00,0xF7,0x00,0x08,0x20,0x81,0x66,0xF7,0xE7,0x00,0x81,0x81,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x66,0xC6,0x03,0x00,0x07,0x03,0xC0,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xC7,0x01,0x87,0x87,0xC0,0xCF,0x83,0xEF,0x87,0x87,0x00,0x00,0xC0,0x00,0x06,0x87,0xC7,0x03,0xCF,0xC3,0x8F,0xEF,0xEF,0xC3,0xCC,0x87,0xE1,0x6E,0x0F,0x6C,0x6C,0x83,0xCF,0x83,0xCF,0x87,0xCF,0xCC,0xCC,0x6C,0xCC,0xCC,0xEF,0xC3,0x00,0xC3,0x83,0x00,0x03,0x00,0x0E,0x00,0xC1,0x00,0x83,0x00,0x0E,0x81,0xC0,0x0E,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC1,0x81,0x0E,0x37,0x00,0x87,0xCC,0x81,0x87,0xCC,0x06,0xC6,0x00,0x87,0xCC,0x06,0xC6,0x83,0x03,0xCC,0xCC,0x81,0x00,0xE3,0x87,0xCC,0x06,0x87,0x06,0x66,0xCC,0x00,0x00,0x66,0xA3,0x00,0xB1,0x81,0x81,0x81,0x81,0x67,0xCD,0x87,0x87,0x03,0x83,0x00,0x26,0x36,0x03,0x00,0x00,0x29,0xAA,0xBD,0x81,0x81,0x81,0xCC,0x03,0x83,0x66,0x66,0x00,0x66,0x03,0xCC,0x00,0x81,0x81,0x00,0x81,0x00,0x81,0x67,0xCD,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x03,0x8F,0xCC,0xCC,0x03,0x0F,0x03,0xCC,0xCC,0x81,0x00,0xFF,0x00,0x81,0x03,0xFF,0x03,0x87,0xCC,0x03,0x67,0xCD,0x00,0x00,0x0F,0x03,0xCC,0x03,0xC0,0x03,0xCF,0x81,0x00,0x00,0x00,0x33,0xF7,0xE7,0x00,0x00,0xC3,0xCC,0x00,0x03,0x87,0x87,0x00,0x00},
     {0x00,0x3C,0xFF,0x44,0x83,0xC3,0xC3,0x00,0x00,0x00,0x00,0xE0,0x66,0x00,0x36,0x81,0x0C,0x60,0xC3,0x66,0xBD,0x36,0x00,0xC3,0xC3,0x81,0x00,0x00,0x00,0x00,0x01,0xEF,0x00,0x87,0x66,0xC6,0xC7,0x00,0x8D,0x03,0x81,0x03,0x00,0x00,0x00,0x00,0x00,0x20,0x6C,0x03,0xCC,0xCC,0xC1,0x0C,0x06,0x6C,0xCC,0xCC,0x00,0x00,0x81,0x00,0x03,0xCC,0x6C,0x87,0x66,0x66,0xC6,0x26,0x66,0x66,0xCC,0x03,0xC0,0x66,0x06,0xEE,0x6C,0xC6,0x66,0xC6,0x66,0xCC,0x4B,0xCC,0xCC,0x6C,0xCC,0xCC,0xEC,0x03,0x08,0xC0,0xC6,0x00,0x81,0x00,0x06,0x00,0xC0,0x00,0xC6,0x00,0x06,0x81,0xC0,0x06,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x81,0x03,0xAD,0x00,0xCC,0xCC,0x03,0xCC,0xCC,0x03,0xC6,0x00,0xCC,0xCC,0x03,0xC6,0xC6,0x81,0x00,0xCC,0x00,0x00,0x87,0xCC,0xCC,0x03,0xCC,0x03,0x66,0x00,0xCC,0x00,0x06,0xC6,0x00,0x81,0x03,0x03,0x03,0x03,0xCD,0x00,0xCC,0xCC,0x03,0x44,0x00,0x6E,0x6E,0x03,0x00,0x00,0x94,0x55,0x6B,0x81,0x81,0x00,0x00,0x00,0x44,0x66,0x66,0x00,0x66,0x03,0xCC,0x00,0x81,0x81,0x00,0x81,0x00,0x81,0xCD,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x8D,0xC6,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x81,0x00,0xFF,0x00,0x81,0x00,0xFF,0x00,0xCC,0x00,0x00,0xCD,0x00,0x00,0x0E,0x06,0x00,0x00,0x00,0x81,0x00,0x00,0x03,0x00,0x03,0x00,0x66,0xBD,0x36,0x03,0x00,0x66,0x00,0x00,0x07,0xC0,0xC0,0x00,0x00},
     {0x00,0x18,0xFF,0xEE,0xC7,0xC3,0xE7,0x00,0x00,0x00,0x00,0xA3,0x66,0x00,0xF7,0xBD,0x0E,0xE0,0xE7,0x66,0xBD,0x03,0x00,0xE7,0xE7,0x81,0x81,0x03,0x00,0x42,0x01,0xEF,0x00,0x87,0x66,0xEF,0x0C,0x4C,0x8D,0x03,0x03,0x81,0x66,0x81,0x00,0x00,0x00,0x60,0xEC,0x0F,0xCC,0xC0,0xC3,0x0C,0x0C,0x6C,0xCC,0xCC,0x83,0x83,0x03,0x00,0x81,0xC0,0x6C,0xCC,0x66,0x6C,0x66,0x06,0x26,0x6C,0xCC,0x03,0xC0,0xC6,0x06,0xEF,0x6E,0x6C,0x66,0x6C,0x66,0xCC,0x03,0xCC,0xCC,0x6C,0xCC,0xCC,0x89,0x03,0x0C,0xC0,0x6C,0x00,0x00,0x00,0x06,0x00,0xC0,0x00,0x06,0x00,0x06,0x00,0x00,0x06,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x81,0x03,0xEC,0x01,0xCC,0x00,0x00,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x87,0xCF,0x00,0x8D,0x00,0x00,0x00,0x00,0x00,0x00,0x87,0xCC,0x00,0x06,0xEC,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x6C,0xCC,0xCC,0x00,0xAB,0x00,0xC6,0xC6,0x00,0x00,0x00,0x42,0xAA,0xD6,0x81,0x81,0x03,0x03,0x03,0xAB,0x66,0x66,0x00,0x66,0x87,0xCC,0x00,0x81,0x81,0x00,0x81,0x00,0x81,0x00,0x03,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0xC0,0x66,0xCF,0xCF,0xCF,0x03,0x87,0x87,0x87,0x81,0x00,0xFF,0x00,0x81,0x87,0xFF,0x87,0xCC,0x87,0x87,0x00,0x87,0x00,0x06,0xC7,0xCC,0xCC,0xCC,0x00,0xCC,0x00,0x00,0x00,0x03,0x00,0xC3,0xBD,0x03,0x03,0x00,0x66,0x00,0x00,0x03,0x83,0x81,0xCF,0x00},
     {0x00,0x5A,0xBD,0xEF,0xEF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x27,0x66,0x00,0x36,0xE7,0x8F,0xE3,0x81,0x66,0xBD,0xC3,0x00,0x81,0x81,0x81,0xC0,0x06,0x0C,0x66,0x83,0xC7,0x00,0x87,0x42,0xC6,0x0C,0xCC,0x07,0x06,0x06,0xC0,0xC3,0x81,0x00,0x00,0x00,0xC0,0xED,0x03,0xC0,0xC0,0xC6,0x0C,0x0C,0x60,0xCC,0xCC,0x83,0x83,0x06,0xE7,0xC0,0x81,0xED,0xCC,0x66,0x0C,0x66,0x46,0x46,0x0C,0xCC,0x03,0xC0,0xC6,0x06,0xEF,0x6F,0x6C,0x66,0x6C,0x66,0x0C,0x03,0xCC,0xCC,0x6C,0x87,0xCC,0x81,0x03,0x06,0xC0,0x00,0x00,0x00,0x87,0xC7,0x87,0xC7,0x87,0x06,0x67,0xC6,0x87,0xC3,0x66,0x81,0xCF,0x8F,0x87,0xCD,0x67,0xCE,0x87,0xCF,0xCC,0xCC,0x6C,0x6C,0x66,0xCF,0x06,0x81,0x81,0x00,0x83,0x0C,0xCC,0x87,0x87,0x87,0x87,0x8F,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x4C,0xEF,0x8D,0x87,0x87,0x87,0xCC,0xCC,0x66,0xCC,0xCC,0x87,0x06,0x6D,0x00,0xE7,0x87,0x87,0x87,0xCC,0x8F,0x6E,0xE7,0x87,0x03,0xAA,0x00,0x87,0x87,0x03,0x33,0xCC,0x29,0x55,0xBD,0x81,0x81,0x87,0x87,0x87,0x2A,0x6E,0x66,0xEF,0x6E,0xCC,0x87,0x00,0x81,0x81,0x00,0x81,0x00,0x81,0x87,0x87,0x76,0xF7,0x7E,0xFF,0x76,0xFF,0x7E,0x00,0x60,0x66,0x4C,0x4C,0x4C,0x03,0x03,0x03,0x03,0x81,0x00,0xFF,0x00,0x81,0x03,0xFF,0xCC,0x8D,0xCC,0xCC,0x87,0xCC,0x66,0xC7,0x66,0xCC,0xCC,0xCC,0x66,0xCC,0x00,0x00,0x00,0xCF,0x00,0x8F,0xBD,0xC3,0x00,0x00,0x66,0x00,0x00,0x03,0xC0,0x03,0xCF,0x00},
     {0x00,0x18,0xFF,0xEF,0xEF,0x7E,0xFF,0x00,0x00,0x00,0x00,0x8F,0xC3,0x00,0x36,0x7E,0xEF,0xEF,0x81,0x66,0xB7,0x66,0x00,0x81,0x81,0x81,0xEF,0xEF,0x0C,0xFF,0x83,0xC7,0x00,0x03,0x00,0xC6,0x87,0x81,0xAF,0x00,0x06,0xC0,0xFF,0xE7,0x00,0xEF,0x00,0x81,0x6D,0x03,0x81,0x83,0xCC,0x8F,0x8F,0xC0,0x87,0xC7,0x00,0x00,0x0C,0x00,0x60,0x03,0xED,0xCC,0xC7,0x0C,0x66,0xC7,0xC7,0x0C,0xCF,0x03,0xC0,0x87,0x06,0x6D,0xEF,0x6C,0xC7,0x6C,0xC7,0x07,0x03,0xCC,0xCC,0x6D,0x03,0x87,0x03,0x03,0x03,0xC0,0x00,0x00,0x00,0xC0,0x66,0xCC,0xCC,0xCC,0x8F,0xCC,0x67,0x81,0xC0,0xC6,0x81,0x6D,0xCC,0xCC,0x66,0xCC,0xE6,0xCC,0x06,0xCC,0xCC,0x6C,0xC6,0x66,0xC8,0x0C,0x00,0xC0,0x00,0xC6,0x0C,0xCC,0xCC,0xC0,0xC0,0xC0,0xC0,0xCC,0xCC,0xCC,0xCC,0x81,0x81,0x81,0xCC,0xCC,0x0C,0xB1,0xEF,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0xCC,0xCC,0xCC,0xCF,0x6D,0x6C,0x81,0xC0,0x81,0xCC,0xCC,0xCC,0x6F,0x00,0x00,0x06,0xAB,0xCF,0x03,0x73,0x03,0x66,0x66,0x94,0xAA,0x6B,0x81,0x8F,0xCC,0xCC,0xCC,0x2A,0x60,0x66,0x60,0x60,0x0C,0xCF,0x8F,0xF1,0xFF,0xFF,0xF1,0xFF,0xFF,0xC0,0xCC,0x06,0x06,0x00,0x00,0x06,0x00,0x00,0x6C,0xE7,0x6F,0x0C,0x0C,0x0C,0xCF,0x03,0x03,0x03,0x8F,0xF1,0xFF,0x00,0x00,0x03,0xFF,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0x66,0x66,0xCC,0xCC,0xCC,0x66,0xCC,0x00,0x00,0xCF,0x03,0x8F,0x73,0xB7,0x66,0xCF,0x00,0xC3,0x00,0x81,0x87,0x87,0xC7,0xCF,0x00},
     {0x00,0xDB,0x3C,0xEF,0xC7,0x7E,0xE7,0x00,0x00,0x00,0x00,0xCC,0x81,0x00,0x36,0x7E,0x8F,0xE3,0x81,0x00,0xB1,0x66,0x00,0x81,0x81,0x81,0xC0,0x06,0x0C,0x66,0xC7,0x83,0x00,0x03,0x00,0xC6,0xC0,0x03,0xED,0x00,0x06,0xC0,0xC3,0x81,0x00,0x00,0x00,0x03,0x6F,0x03,0x03,0xC0,0xEF,0xC0,0xCC,0x81,0xCC,0x81,0x00,0x00,0x06,0xE7,0xC0,0x03,0xED,0xCF,0x66,0x0C,0x66,0x46,0x46,0xEC,0xCC,0x03,0xCC,0xC6,0x26,0x6C,0xED,0x6C,0x06,0xEC,0xC6,0x81,0x03,0xCC,0xCC,0x6D,0x87,0x03,0x06,0x03,0x81,0xC0,0x00,0x00,0x00,0xC7,0x66,0x0C,0xCC,0xCF,0x06,0xCC,0x66,0x81,0xC0,0x87,0x81,0x6D,0xCC,0xCC,0x66,0xCC,0x67,0x06,0x06,0xCC,0xCC,0x6D,0x83,0x66,0x81,0x06,0x81,0x81,0x00,0x6C,0x0C,0xCC,0xCF,0xC7,0xC7,0xC7,0xC7,0x0C,0xCF,0xCF,0xCF,0x81,0x81,0x81,0xCC,0xCC,0x8F,0xF7,0x8D,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0xCC,0xCC,0xCD,0x06,0x6D,0xC6,0x81,0xC7,0x81,0xCC,0xCC,0xCC,0xED,0xEF,0xEF,0x0C,0x2B,0xC0,0xE6,0xF6,0x87,0xCC,0x33,0x42,0x55,0xD6,0x81,0x81,0xCC,0xCC,0xCC,0x2A,0x60,0x66,0x60,0x60,0x0C,0x03,0x81,0x00,0x00,0x81,0x81,0x00,0x81,0xC7,0xCC,0x06,0x06,0x00,0x00,0x06,0x00,0x00,0xC7,0x6C,0x66,0x8F,0x8F,0x8F,0x00,0x03,0x03,0x03,0x00,0x81,0xFF,0xFF,0x81,0x03,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0x66,0x66,0xCC,0xCC,0xCC,0x66,0x87,0x00,0x00,0x00,0x03,0x00,0xF6,0xB1,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCF,0x00},
     {0x00,0x99,0x7E,0xC7,0x83,0x81,0x81,0x00,0x00,0x00,0x00,0xCC,0xE7,0x00,0x76,0xE7,0x0E,0xE0,0xE7,0x00,0xB1,0xC3,0xEF,0xE7,0x81,0xE7,0x81,0x03,0xEF,0x42,0xC7,0x83,0x00,0x00,0x00,0xEF,0xC0,0x06,0xCC,0x00,0x03,0x81,0x66,0x81,0x00,0x00,0x00,0x06,0x6E,0x03,0x06,0xC0,0xC0,0xC0,0xCC,0x03,0xCC,0x81,0x83,0x83,0x03,0x00,0x81,0x00,0x0C,0xCC,0x66,0x6C,0x66,0x06,0x06,0x6C,0xCC,0x03,0xCC,0xC6,0x66,0x6C,0xEC,0x6C,0x06,0xED,0x66,0xCC,0x03,0xCC,0xCC,0xC6,0xCC,0x03,0x26,0x03,0xC0,0xC0,0x00,0x00,0x00,0xCC,0x66,0x0C,0xCC,0x0C,0x06,0xCC,0x66,0x81,0xC0,0xC6,0x81,0x6D,0xCC,0xCC,0x66,0xCC,0x06,0x81,0x06,0xCC,0xCC,0x6D,0x83,0x66,0x06,0x03,0x81,0x03,0x00,0x6C,0xCC,0xCC,0x0C,0xCC,0xCC,0xCC,0xCC,0x0C,0x0C,0x0C,0x0C,0x81,0x81,0x81,0xCF,0xCF,0x0C,0x8D,0x8D,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0xCC,0xCC,0xCE,0x06,0x6E,0x83,0x81,0xCC,0x81,0xCC,0xCC,0xCC,0xEC,0x00,0x00,0x0C,0xAA,0xC0,0x3C,0xBD,0x87,0xCC,0x33,0x29,0xAA,0xBD,0x81,0x81,0xCF,0xCF,0xCF,0xAB,0x6E,0x66,0x6E,0xEF,0xCC,0xCF,0x81,0x00,0x00,0x81,0x81,0x00,0x81,0xCC,0xCF,0xF7,0x76,0xFF,0x7E,0x76,0xFF,0x7E,0xC6,0x6C,0x66,0x0C,0x0C,0x0C,0x00,0x03,0x03,0x03,0x00,0x81,0xFF,0xFF,0x81,0x03,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x66,0xC7,0xC7,0xCC,0xCC,0xCC,0x66,0x03,0x00,0x00,0x00,0x00,0x00,0xBD,0xB1,0xC3,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCF,0x00},
     {0x00,0x3C,0xFF,0x83,0x01,0x81,0x81,0x00,0x00,0x00,0x00,0xCC,0x81,0x00,0x7E,0xBD,0x0C,0x60,0xC3,0x66,0xB1,0xC0,0xEF,0xC3,0x81,0xC3,0x00,0x00,0x00,0x00,0xEF,0x01,0x00,0x03,0x00,0xC6,0x8F,0xCC,0xCD,0x00,0x81,0x03,0x00,0x00,0x83,0x00,0x83,0x0C,0x6C,0x03,0xCC,0xCC,0xC0,0xCC,0xCC,0x03,0xCC,0x03,0x83,0x83,0x81,0x00,0x03,0x03,0x0C,0xCC,0x66,0x66,0xC6,0x26,0x06,0x66,0xCC,0x03,0xCC,0x66,0x66,0x6C,0x6C,0xC6,0x06,0xC7,0x66,0xCC,0x03,0xCC,0x87,0xC6,0xCC,0x03,0x6C,0x03,0x60,0xC0,0x00,0x00,0x00,0xCC,0x66,0xCC,0xCC,0xCC,0x06,0xC7,0x66,0x81,0xC0,0x66,0x81,0x6D,0xCC,0xCC,0x66,0xCC,0x06,0xCC,0xC6,0xCC,0x87,0xC6,0xC6,0xC3,0x4C,0x03,0x81,0x03,0x00,0xEF,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x0C,0x0C,0x0C,0x81,0x81,0x81,0xCC,0xCC,0x4C,0x8D,0x8D,0xCC,0xCC,0xCC,0xCC,0xCC,0xC3,0xCC,0xCC,0xCC,0x0C,0xC6,0xC6,0x8D,0xCC,0x81,0xCC,0xCC,0xCC,0x6C,0x00,0x00,0xCC,0x44,0xC0,0x68,0x3B,0x87,0x66,0x66,0x94,0x55,0x6B,0x81,0x81,0xCC,0xCC,0xCC,0x44,0x66,0x66,0x66,0x00,0x87,0x03,0x81,0x00,0x00,0x81,0x81,0x00,0x81,0xCC,0xCC,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0xC7,0x6C,0xC6,0x4C,0x4C,0x4C,0x00,0x03,0x03,0x03,0x00,0x81,0xFF,0xFF,0x81,0x03,0x00,0xCC,0x8F,0xCC,0xCC,0xCC,0xCC,0x66,0x06,0x06,0xCC,0xCC,0xCC,0xC3,0x03,0x00,0x00,0x00,0xCF,0x8F,0x3B,0xB1,0xC0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCF,0x00},
     {0x00,0xE7,0xE7,0x01,0x00,0xE7,0xE7,0x00,0x00,0x00,0x00,0x87,0x81,0x00,0x6E,0x81,0x08,0x20,0x81,0x66,0xB1,0x6C,0xEF,0x81,0x81,0x81,0x00,0x00,0x00,0x00,0xEF,0x01,0x00,0x03,0x00,0xC6,0x03,0xC8,0x67,0x00,0xC0,0x06,0x00,0x00,0x83,0x00,0x83,0x08,0xC7,0xCF,0xCF,0x87,0xE1,0x87,0x87,0x03,0x87,0x07,0x00,0x81,0xC0,0x00,0x06,0x03,0xC7,0xCC,0xCF,0xC3,0x8F,0xEF,0x0F,0xE3,0xCC,0x87,0x87,0x6E,0xEF,0x6C,0x6C,0x83,0x0F,0xC0,0x6E,0x87,0x87,0x87,0x03,0xC6,0xCC,0x87,0xEF,0xC3,0x20,0xC3,0x00,0x00,0x00,0x67,0xCD,0x87,0x67,0x87,0x0F,0xC0,0x6E,0xE7,0xCC,0x6E,0xE7,0x6C,0xCC,0x87,0xC7,0xC7,0x0F,0x87,0x83,0x67,0x03,0xC6,0x6C,0xC0,0xCF,0xC1,0x81,0x0E,0x00,0x00,0x87,0x67,0x87,0x67,0x67,0x67,0x67,0x87,0xC7,0xC7,0xC7,0xE7,0xE7,0xE7,0xCC,0xCC,0xCF,0xFE,0xED,0x87,0x87,0x87,0x67,0x67,0xC0,0x87,0x87,0x87,0xEF,0x8B,0x6C,0x07,0x67,0xE7,0x87,0x67,0xCC,0x6C,0x00,0x00,0x87,0x83,0x00,0xC0,0xF3,0x03,0x33,0xCC,0x42,0xAA,0xD6,0x81,0x81,0xCC,0xCC,0xCC,0x83,0x66,0x66,0x66,0x00,0x03,0x03,0x81,0x00,0x00,0x81,0x81,0x00,0x81,0x67,0xCC,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0x6C,0xC7,0x8F,0xCF,0xCF,0xCF,0x00,0x87,0x87,0x87,0x00,0x81,0xFF,0xFF,0x81,0x87,0x00,0x87,0x0C,0x87,0x87,0x87,0x87,0xB7,0x0F,0x0F,0x87,0x87,0x87,0xC0,0x87,0x00,0x00,0x00,0x00,0x00,0xF3,0xB1,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
     {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0xE7,0x00,0xE7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0x00,0x00,0x00,0x06,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF1,0x30,0x00,0x00,0x00,0x29,0x55,0xBD,0x81,0x81,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x00,0x03,0x00,0x81,0x00,0x00,0x81,0x81,0x00,0x81,0x00,0x00,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0xFF,0xFF,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0xE7,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
     {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x87,0x00,0x00,0x87,0x00,0x00,0x00,0x00,0x00,0x0F,0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0xAA,0x6B,0x81,0x81,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x00,0x00,0x00,0x81,0x00,0x00,0x81,0x81,0x00,0x81,0x00,0x00,0x00,0x66,0x00,0x66,0x66,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
        };
    
        
        int main(void)
        {
        
            unsigned char text[20][40];
            unsigned char zeichen=0;
            unsigned char temp;
        
            for (unsigned char y=0;y<20;y++)
            {
                for (unsigned char x=0;x<40;x++)
                    text[y][x]=zeichen++;            
            }
        
        
            DDRC=0x0F;
            DDRB=0x07;
        
        
            PORTB=(1<<FRAME)|(1<<LOAD);
            
            unsigned char *cptr;
        
            while(1)
            {
                   PORTB=(1<<FRAME)|(1<<CP);
               
                for(unsigned char i =0; i<20;i++)
                {
                    for(unsigned char j =0; j<12;j++)
                    {
                        cptr = &schrift[j][0];
                        for( unsigned char k =0; k<40;k++)
                        {
                            temp=pgm_read_byte(cptr + text[i][k]);
                        
                            PORTB=(1<<CP);                
                            PORTC=temp;        //ersten 4 Pixel                                    
                            PORTB=0;                    
                            PORTB=(1<<CP);           
                            asm volatile ("swap %0" : "=r" (temp) : "0" (temp));            
                            PORTC=temp;            //zweiten 4 Pixel         
                            PORTB=0;                    
                                        
                        }                            
                    PORTB=(1<<LOAD);    
                    }
                
                }
                PORTB=(1<<LOAD)|(1<<FRAME);
            
            }
        
        
        }
    Nebenbei, ich probiere die Schaltung immer aus und messe mit dem Oszi nach, so kann man sichergehen, dass das Display nachkommt, denn an die Spezikikationen im Datenblatt halten wir uns nichtmehr

    Ich habs gerade mal mit nem größeren Quarz getestet, gute 18MHz das macht dann über 102Hz
    Aber das Ziel sind 16Mhz
    Geändert von MisterMou (21.04.2012 um 20:22 Uhr)

  8. #8
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    01.10.2009
    Beiträge
    437
    Zitat Zitat von MisterMou Beitrag anzeigen
    Ich kann noch einen nachlegen, 89,4 Hz bei -O2 Optimierung
    Da kommt bei mir nur 84,8Hz raus, mit -Os sind's 86,6Hz, da werden dann evtl. die Compilerversion und Makefileoptionen Einfluss haben.

    Die innerste und damit wichtigste Loop sieht jetzt so aus, da wüsste ich nicht mehr viel zu optimieren:
    Code:
    L0673:
        ld      r24,X+
        movw    r30,r18
        add     r30,r24
        adc     r31,r1
        lpm     r30,Z
        out     p18,r25
        out     p15,r30
        out     p18,r1
        out     p18,r25
        swap    r30
        out     p15,r30
        out     p18,r1
        cp      r26,r16
        cpc     r27,r17
        brne    L0673

  9. #9
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    31.05.2009
    Ort
    Stralsund
    Alter
    33
    Beiträge
    436
    Hmm, von asm hab ich nicht so viel Ahnung, sonst hätte ich gleich alles so geschrieben

    Ich habe die neuste AVR-Studio 5 Version instaliert

  10. #10
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    31.05.2009
    Ort
    Stralsund
    Alter
    33
    Beiträge
    436
    Zitat Zitat von MagicWSmoke Beitrag anzeigen
    Die innerste und damit wichtigste Loop sieht jetzt so aus, da wüsste ich nicht mehr viel zu optimieren:
    Code:
    L0673:
        ld      r24,X+
        movw    r30,r18
        add     r30,r24
        adc     r31,r1
        lpm     r30,Z
        out     p18,r25
        out     p15,r30
        out     p18,r1
        out     p18,r25
        swap    r30
        out     p15,r30
        out     p18,r1
        cp      r26,r16
        cpc     r27,r17
        brne    L0673

    Was macht diese Zeile?

    Code:
     adc     r31,r1
    r1 müsste doch 0 sein...
    Was der Befehl macht weiß ich(denke ich), aber warum?
    r31 verändert sich doch nicht, welche Rolle spielt das Carry?

Ähnliche Themen

  1. Zusätzlich zu der M32 noch ein mega8?
    Von AsuroPhilip im Forum Robby RP6
    Antworten: 40
    Letzter Beitrag: 04.11.2011, 11:43
  2. Gibt es noch Realismus im Fernsehen?
    Von HannoHupmann im Forum Offtopic und Community Tratsch
    Antworten: 43
    Letzter Beitrag: 03.08.2011, 15:34
  3. GLCD (GDM12864B) mit KS0108B gibt PixelFehler
    Von SvenS im Forum AVR Hardwarethemen
    Antworten: 1
    Letzter Beitrag: 21.04.2011, 11:05
  4. Gibt es noch den Crazy-Car Wettbewerb?
    Von Reinald im Forum Allgemeines zum Thema Roboter / Modellbau
    Antworten: 7
    Letzter Beitrag: 23.10.2008, 12:28
  5. DISAVR - Gibt´s den noch (funktionierend)?
    Von roboguy im Forum Basic-Programmierung (Bascom-Compiler)
    Antworten: 1
    Letzter Beitrag: 21.09.2005, 23:59

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

12V Akku bauen