Multiplex: push temp push temp1 in temp,sreg push temp push ZL push ZH ldi temp1, 0 out Segment_PORT,temp1 ; die Segmente ausschalten ldi ZL, low(Segment0) ; fuer diese Ziffer das Codemuster fuer ldi ZH, high(Segment0) ; die Anzeige in der Codetabelle nachschlagen lds temp, NextSegment add ZL, temp adc ZH, temp1 ld temp,Z ; das entsprechende Muster holen und ausgeben out Anzeige_PORT, temp lds temp1, NextDigit ; und die betreffende Stelle schalten com temp1 ; Anzeigen mit gemeinsame Anode out Segment_PORT,temp1 com temp1 lds temp, NextSegment inc temp sec rol temp1 ; beim nächsten Interupt die nächste Stelle cpi temp1, 0b11101111 brne marke2 ldi temp,0 ldi temp1, 0b11111110 marke2: sts NextSegment, temp sts NextDigit, temp1 pop ZH pop ZL pop temp out sreg,temp pop temp1 pop temp reti