Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab Simulink to PIC16F887

Not open for further replies.


Newbie level 3
Jan 21, 2011
Reaction score
Trophy points
Activity points
Hi there,

Actually I'm doing a project of DC Motor Speed Controller Using Fuzzy Logic. At this stage I've programmed the speed control(PWM) using 16F887 MCU. And on the other hand, I have also developed a set of fuzzy rule in matlab simulink. My problem is I do not know how to link my hardware (MCU and Motor) with the fuzzy logic that I have in matlab. As I know, I will be using RS232 connect/link matlab and MCU so that they can transmit and receive data from each other.

In matlab simulink, someone told me that I have to use the block serial send and serial receive under the instrument control toolbox, however I do not know to use and what coding should I program so it can link with my hardware and when I drive the motor I can observe the sampling of the data with the reference.

As my motor is attached with quadrature encoder, thus I can get the pulse from the encoder and convert it to rpm. That's mean it is a closed loop system. I do not know how to programme both matlab and PIC so that when I manipulate the fuzzy rules I can also observe how the motor driving corresponding to the fuzzy rule that I set.

Thank you in advance.


Not open for further replies.

Part and Inventory Search

Welcome to