Building Microcontrollers with Simulink & RTW

  • Thread starter Thread starter physicsCU
  • Start date Start date
AI Thread Summary
The discussion centers on building microcontrollers for simple tasks, such as controlling power to another controller and implementing a PID controller for a servo. The user is interested in using Simulink and Real-Time Workshop (RTW) to integrate external input sensors and output actuators into their projects, seeking guidance on how to ensure the RTW-generated C code effectively processes these inputs and produces the desired outputs. A specific example mentioned involves using a switch to cut power to a board. However, the user expresses a desire to avoid learning C syntax initially, aiming to familiarize themselves with the code while working on desktop simulations. Responses emphasize that practical experience with a microcontroller kit and compiler is essential for learning, suggesting that the user should invest in a small kit and compiler, along with a recommended book to aid their understanding. The user expresses frustration with online resources, indicating a preference for more straightforward, curated recommendations.
physicsCU
Messages
198
Reaction score
1
OK, you might laugh at me for this, but...

I am looking at building microcontrollers, doing simple stuff for now, like cutting power to another controller, or doing a PID controller on a servo.

I am thinking about using simulink and real-time workshop to do this. (this is the funny)

My question is, how do I integrate external input sensors and output actuators into simulink so that RTW-generated C code takes those inputs, runs them through my model/program and gives the desired outputs?

And on the power one, that seems pretty basic, user input says switch ->, switch is a power switch, cutting voltage to 0V on board needing to be powered off.

But my question still stands. I am trying to do stuff without learning C syntax, just reading the code, getting familiar (i am doing stuff on desktop as well), so when I take my microcontroller class, I have a leg up.

Thanks all!
 
Technology news on Phys.org
Nope. To learn how to work with uCs, you need to at least buy a small kit and compiler and start writing code. No other way. Go for it!
 
Bummer. And there seemed to be so many resources out there from the MATLAB people.

recommendations as to what I should get for kit and compiler? and a book maybe? I hate finding stuff online, just too frustrating IMO.
 
Last edited:
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
2
Views
2K
Replies
10
Views
1K
Replies
3
Views
1K
Replies
0
Views
2K
Replies
1
Views
2K
Replies
13
Views
2K
Replies
19
Views
3K
Replies
10
Views
3K
Back
Top