Re: MATLAB/Simulink + RTW and generating code for a microcontroller
- From: "MK" <mk@xxxxxxxxxxxxx>
- Date: Thu, 19 Mar 2009 08:00:11 -0000
"argee" <rg@xxxxxxx> wrote in message news:gpr7cf$eob$1@xxxxxxxxxxxxxxxxxx
Hi all,
I seem to be stuck with what seemed a very simple task. I want to convert
a Simulink model with one input and one output to a C program that I could
run on a microcontroller (any microcontroller, not only those TI chips on
those development boards). It should be able to read some data from a ADC,
do some processing (as defined by the model --
amplify/multiply by 2 is a fine starting point) and send the result to a
DAC. I have no problem generating the "middle part", i.e. processing, but
I have no idea how to interface to ADC and DAC. What I need are some
"read_inputs()" and "write_outputs()" functions into which I could add my
own code and those functions would be called automatically by the
generated code when needed.
I was checking the C-API for Interfacing with Signals and Parameters and
External mode communication channels, but these don't seem to be able to
do the job. I was also reading on the execution models and browsing the
Embedded Coder documentation, but to no avail. So, is there a simple way
to that? And is there some sort of a cookbook available?
Many thanks!
RG
I'm sure you have a license for the $20k worth of software you are using
here. Mathworks offer pretty good support including some free training for
these products. Is there some special reason that they can't help you ?
Michael Kellett
.
- Follow-Ups:
- References:
- Prev by Date: Re: How to keep CPU's on-chip RAM's content with a small battery
- Next by Date: Re: MATLAB/Simulink + RTW and generating code for a microcontroller
- Previous by thread: MATLAB/Simulink + RTW and generating code for a microcontroller
- Next by thread: Re: MATLAB/Simulink + RTW and generating code for a microcontroller
- Index(es):
Relevant Pages
|