Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1 Forum Discussions

Anonymous1
Level 1
Level 1
First question asked Welcome!

Hello

 

I designed a closed-loop system on MATLAB Simulink. The microcontroller in the system takes two feedback inputs and generates one output. 

The model is shown in the image below. In this, the block that I marked with a blue arrow is the block in Simulink that works as a microcontroller in the real world. Is it possible to use PSoC in place of this block in a real-world system? In the real world all those circuit elements like inductor, capacitor, etc., will be real elements and for sensing the two inputs, two sensors will be required. The sensed signals will be sent to the PSoC pins and some other pin will generate the output. So, do I need to change my code in MATLAB to C for this purpose or PSoC has the option for an easy interfacing?

 

I used a dSpace microcontroller once before and it was able to directly interface with the MATLAB without the need to convert code. How will that be possible using PSoC?

 

 

Best Regards

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @Anonymous1 ,

There is no direct interface that will port your Matlab code to work in PSoC Creator. You will need to convert the Matlab code to C and then based on the PSoC device you choose to use, you need to call the device and component specific APIs to complete your project. 

Here's a video for reference that might help: https://www.youtube.com/watch?v=tRZ0t7pupLs

Regards,
Dheeraj

View solution in original post

0 Likes
1 Reply
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @Anonymous1 ,

There is no direct interface that will port your Matlab code to work in PSoC Creator. You will need to convert the Matlab code to C and then based on the PSoC device you choose to use, you need to call the device and component specific APIs to complete your project. 

Here's a video for reference that might help: https://www.youtube.com/watch?v=tRZ0t7pupLs

Regards,
Dheeraj

0 Likes