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