serial communication between microcontroller 8051 and matlab

2 次查看(过去 30 天)
$MOD51
PWM0L EQU 0xB1
PWM0H EQU 0xB2
PWM1L EQU 0xB3
PWM1H EQU 0xB4
PWMCON EQU 0xAE
ADCCON1 EQU 0xEF
ADCCON2 EQU 0xD8
ADCDATAH EQU 0xDA
ADCDATAL EQU 0xD9
SCONV EQU 0xDC
ADCI EQU 0xDF
T3FD EQU 0x9D
T3CON EQU 0x9E
EADC EQU 0xAE
PLLCON EQU 0X0D
CSEG
ORG 0H
STEP1 EQU P2
MAIN:
MOV T3CON ,#86H ;
MOV T3FD ,#2DH
MOV SCON, #52H ;
HERE:
CLR SCONV
SETB P3.6
ACALL GETCHAR
CJNE A,#'A',DEVAM2
CLR P3.6
SETB P3.7
SETB SCONV
ACALL GETCHAR
MOV R2,A
HERE2:
ACALL STEP_MOTOR1
DJNZ R2,HERE2
SJMP HERE
DEVAM2:
CLR P3.6
CLR P3.7
SETB SCONV
ACALL GETCHAR
MOV R1,A
STEP1_TERS:
ACALL STEP_MOTOR1_TERS
DJNZ R1,STEP1_TERS
SJMP HERE
$INCLUDE(UARTIO.ASM)
can any one help me fınd the wrong ın my code to control stepper motor speed from matlab gui?
my assmbley code above contains errors

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

产品


版本

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by