计算机控制

当前位置: 首页  教学工作  计算机控制

计算机控制


锯齿波形源码CODE SEGMENT    ASSUME CS:CODESTART:    MOV AX,8100H      ;数据段    MOV DS,AX    MOV AX,7000H      ;8251串口寄存器,存储空间 7000H:8000H    MOV ES,AXXOR AL,ALWAVE:      XOR DX,DX            ;0832口地址 0000H   OUT DX,AL   INC AL   MOV AH,AL;保存AL内容    MOV DX,0080H       ;0809口地址  0080H   OUT DX,AL             ;启动A/D转换   CALL DELAY   in AL,DX   MOV ES:[8000H],AL   MOV AL,AH   JMP WAVEDELAY:   MOV CX,80h  ;>100us L2: LOOP L2   RETCODE ENDS   END START正弦波形查表数据TABLE:DB 128,131,133,136,138,141,143,146,148,151,153,155,158,160,163,165DB 167,170,172,174,177,179,181,183,185,187,189,191,193,195,197,199DB 201,203,204,206,208,209,211,212,214,215,216,218,219,220,221,222DB 223,224,225,226,227,227,228,228,229,229,230,230,231,231,231,231DB 231,231,231,231,231,230,230,229,229,228,228,227,227,226,225,224DB 223,222,221,220,219,218,216,215,214,212,211,209,208,206,204,203DB 201,199,197,195,193,191,189,187,185,183,181,179,177,174,172,170DB 167,165,163,160,158,155,153,151,148,146,143,141,138,136,133,131DB 128,125,123,120,118,115,113,110,108,105,103,101,98,96,93,91DB 89,86,84,82,79,77,75,73,71,69,67,65,63,61,59,57DB 55,53,52,50,48,47,45,44,42,41,40,38,37,36,35,34DB 33,32,31,30,29,29,28,28,27,27,26,26,25,25,25,25DB 25,25,25,25,25,26,26,27,27,28,28,29,29,30,31,32DB 33,34,35,36,37,38,40,41,42,44,45,47,48,50,52,53DB 55,57,59,61,63,65,67,69,71,73,75,77,79,82,84,86DB 89,91,93,96,98,101,103,105,108,110,113,115,118,120,123,125