Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ nomod51
- $ include(AT89C51CC03.inc)
- main:
- org 0000h
- ljmp haupt
- org 001Bh ;Interrupt Zähler Timer 1 Übergelaufen
- ljmp inter
- org 0050h ;Hauptprogramm
- haupt:
- mov sp,#80h ;Stack Pointer auf 80h, damit viel Unterprgramme laufen können, externer Register
- mov p1,00h ;Resonanzkonverter
- mov p2,00h ;Display
- mov p3,00h ;I2C Bus
- sda equ p3.0 ;I2C Bus
- scl equ p3.1 ;I2C Bus
- mov 20h,#0C8h ;Low Teil Führungsgröße 130 Grad
- mov 21h,#32h ;High Teil Führungsgröße 130 Grad
- mov tmod,#11h ;Timer 1 im Modus 1 / Timer 0 im Modus 1
- mov 30h,#0F6h ;Vorladewert Timer 0 50kHz
- mov 40h,#80h ;Low Teil maximale Regelgröße 160 Grad
- mov 41h,#3Eh ;High Teil maximale Regelgröße 160 Grad
- mov 50h,#00h ;Low Byte Regelgröße, für Display Ausgabe
- mov 51h,#00h ;High Byte Regelgröße, für Display Ausgabe
- mov 78h,#00h ;Low Byte Regelgröße
- mov 79h,#00h ;High Byte Regelgröße
- mov 7Ah,#00h ;Low Byte Regelgröße, für PWM SD Signal
- mov 7Bh,#00h ;High Byte Regelgröße, für PWM SD Signal
- mov R6,#0Fh ;Vorladewert Timer 1 1sek 15 Durchläufe
- mov tl1,#00h ;Interrupt Timer
- mov th1,#00h ;Interrupt Timer
- lcall lcd_init ;Display Initalisierung
- setb ea ;Interrupts freigeben
- setb et1 ;Interrupt Timer 1
- setb tr1
- lcall PWM_Signal
- Ljmp $
- inter:
- lcall interrupt
- reti
- $ include(Zeit_6us.a51)
- $ include(Start.a51)
- $ include(Adresse_befehl.a51)
- $ include(ACK_Adresse_Befehl.a51)
- $ include(Befehl.a51)
- $ include(ACK_befehl.a51)
- $ include(Neustart.a51)
- $ include(Adresse_auslesen.a51)
- $ include(ACK_Adresse_auslesen.a51)
- $ include(Zeit_1ms.a51)
- $ include(Byte_0_auslesen.a51)
- $ include(ACK_Byte0.a51)
- $ include(Byte_1_auslesen.a51)
- $ include(Stopp.a51)
- $ include(I2C_Bus.a51)
- $ include(Zeit_Display_Init.a51)
- $ include(lcd_init.a51)
- $ include(Bindez.a51)
- $ include(lcd_ausgabe.a51)
- $ include(Display.a51)
- $ include(Auswertung.a51)
- $ include(interrupt.a51)
- $ include(PWMSignal.a51)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement