Das eBook Angewandte Mikroelektronik wurde von Hans Lohninger zur Unterstützung verschiedener Lehrveranstaltungen geschrieben. Weitere Informationen finden sie hier. |
Home Anhang Listing: Minimalsystem Includes Sinusgenerator; Version A | |
|
|
Sinusgenerator; Version A
;=================================================== ;---- Experiment: Sinusgenerator, Version A -------- ;=================================================== ; .GLOBAL SINUSA SINUSA: LD DE,STBEND ;Ende Sinustabelle LD IX,SINTAB ;Start Sinustabelle $L1: LD L,(IX) ;Wert aus Tabelle INC IX LD H,(IX) INC IX CALL ODAC1 ;Wert an DAC ausgeben PUSH IX ;Überprüfen, ob Ende POP HL ; der Tabelle XOR A SBC HL,DE JR NZ,$L2 LD IX,SINTAB ;ja, Pointer rücks. $L2: IN A,(PIN) ;Verzögerung einlesen LD L,A LD H,0 ADD HL,HL ;Verzögerung = 1+4*PIN ADD HL,HL INC HL CALL DELAY JR $L1 ;nächster Durchgang ; ;=================================================== ;---- Ausgabe eines Wertes auf DAC1 ---------------- ;=================================================== ; ;Eingang: 16-Bit-Wert in HL ;Ausgang: vordersten 12 Bit werden an DAC1 ausgegeben ; .GLOBAL ODAC1 ODAC1: PUSH AF ;Register AF sichern LD A,L OUT (DAC1LO),A ;niederwertiges Byte LD A,H OUT (DAC1HI),A ;höherwertiges Byte POP AF RET ; ;----- Tabelle der Sinuswerte ---------------------- ; SINTAB: DEFW 8000H, 8320H, 8640H, 8960H, 8C80H DEFW 8FA0H, 92C0H, 95E0H, 98F0H, 9C00H DEFW 9F10H, A220H, A520H, A820H, AB10H DEFW AE00H, B0F0H, B3D0H, B6B0H, B980H DEFW BC50H, BF10H, C1C0H, C470H, C710H DEFW C9A0H, CC30H, CEB0H, D120H, D390H DEFW D5F0H, D830H, DA70H, DCA0H, DED0H DEFW E0E0H, E2E0H, E4E0H, E6C0H, E8A0H DEFW EA60H, EC10H, EDC0H, EF50H, F0D0H DEFW F240H, F3A0H, F4F0H, F630H, F760H DEFW F870H, F980H, FA70H, FB50H, FC20H DEFW FCD0H, FD80H, FE10H, FE90H, FF00H DEFW FF50H, FF90H, FFD0H, FFE0H, FFF0H DEFW FFE0H, FFD0H, FF90H, FF50H, FF00H DEFW FE90H, FE10H, FD80H, FCD0H, FC20H DEFW FB50H, FA70H, F980H, F870H, F760H DEFW F630H, F4F0H, F3A0H, F240H, F0D0H DEFW EF50H, EDC0H, EC10H, EA60H, E8A0H DEFW E6C0H, E4E0H, E2E0H, E0E0H, DED0H DEFW DCA0H, DA70H, D830H, D5F0H, D390H DEFW D120H, CEB0H, CC30H, C9A0H, C710H DEFW C470H, C1C0H, BF10H, BC50H, B980H DEFW B6B0H, B3D0H, B0F0H, AE00H, AB10H DEFW A820H, A520H, A220H, 9F10H, 9C00H DEFW 98F0H, 95E0H, 92C0H, 8FA0H, 8C80H DEFW 8960H, 8640H, 8320H, 8000H, 7CD0H DEFW 79B0H, 7690H, 7370H, 7050H, 6D30H DEFW 6A10H, 6700H, 63F0H, 60E0H, 5DD0H DEFW 5AD0H, 57D0H, 54E0H, 51F0H, 4F00H DEFW 4C20H, 4940H, 4670H, 43A0H, 40E0H DEFW 3E30H, 3B80H, 38E0H, 3650H, 33C0H DEFW 3140H, 2ED0H, 2C60H, 2A00H, 27C0H DEFW 2580H, 2350H, 2120H, 1F10H, 1D10H DEFW 1B10H, 1930H, 1750H, 1590H, 13E0H DEFW 1230H, 10A0H, 0F20H, 0DB0H, 0C50H DEFW 0B00H, 09C0H, 0890H, 0780H, 0670H DEFW 0580H, 04A0H, 03D0H, 0320H, 0270H DEFW 01E0H, 0160H, 00F0H, 00A0H, 0060H DEFW 0020H, 0010H, 0000H, 0010H, 0020H DEFW 0060H, 00A0H, 00F0H, 0160H, 01E0H DEFW 0270H, 0320H, 03D0H, 04A0H, 0580H DEFW 0670H, 0780H, 0890H, 09C0H, 0B00H DEFW 0C50H, 0DB0H, 0F20H, 10A0H, 1230H DEFW 13E0H, 1590H, 1750H, 1930H, 1B10H DEFW 1D10H, 1F10H, 2120H, 2350H, 2580H DEFW 27C0H, 2A00H, 2C60H, 2ED0H, 3140H DEFW 33C0H, 3650H, 38E0H, 3B80H, 3E30H DEFW 40E0H, 43A0H, 4670H, 4940H, 4C20H DEFW 4F00H, 51F0H, 54E0H, 57D0H, 5AD0H DEFW 5DD0H, 60E0H, 63F0H, 6700H, 6A10H DEFW 6D30H, 7050H, 7370H, 7690H, 79B0H DEFW 7CD0H STBEND EQU $
|
|
Home Anhang Listing: Minimalsystem Includes Sinusgenerator; Version A |