...***************************************************** ;Schnipsel: oled_init1: ; OLED initialization parameters push temp push temp1 push temp2 ldi temp, 0x00 ; OLED subsequential command mode rcall i2c_out ldi temp2, 0x00 ; clear address counter ldi ZL, LOW(table*2) ; load address of string into Z-pointer ldi ZH, HIGH(table*2) rcall print_0 ; function call "print_0" rcall wait2 pop temp2 pop temp1 pop temp ret ; print_0: lpm temp, z+ ; copy content of the Z-pointer adressed ; ; 16-bit-register to "temp" ; ; postincrement, address plus 1 inc temp2 ; increment counter cpi temp2, 0x10 ; read out table 16 times, breq print_end ; if 16, then jump to "print_end" rcall i2c_out rjmp print_0 ; jump to print_0 to copy next byte ; print_end: rcall wait2 ret ; ; OLED parameters setup ; note: 0x81 and 0xC8, otherwise display mirrored table: .db 0xAE, 0xD5, 0x80, 0xA8, 0x3F, 0xD3, 0x00, 0x40 .db 0x81, 0xCF, 0xA1, 0xC8, 0x8D, 0x14, 0xAF, 0x00, 0 ; Schnipsel Ende*******************************************