kishore680
Member level 5
Hi i want to control stepper motor. I am using Matlab to read a file which contains temperature value say 25 degree. If threshold value is 24 and current temperature is more than threshold send data(signal) to actuate stepper motor via serial port otherwise do nothing.I have written serial code.
I want to use Pic16F84a as the microcontroller. So if uc receives 'A'. stepper motor should turn on.I think i should use interrupt to monitor continuosly from the serial port. could someone help me where i can look for this interrupt programming and is the overall steps are correct?
Code:
s = serial('COM1','BaudRate',9600);
fopen(s);
fprintf(s,'A');