Hello
I'm completely new using IAR embedded workbench,
I'm trying to develop the codes to implement in the master and slave MCU units
the MCU master has simply to activate each slave, on at a time, with a certain time interval between each activation,
each slave has to generate an actuation signal once the activation signal from master arrives.
(slaves will generate an output bit trial - with voltage between0 and 4V)
I was trying to do it in C, but it can be done in assembly to
Can anyone give me any tip?- How can I do that?
Thanks
Hmm, your question is rather generic. So the answer has to be generic too: You need some sort of communication between the itnended master and the intended slave. The slave is listening to what the master has to say and acts accordingly.
The communication can be simple or complex, you can use GPIO signals, asynchronous serial communication (UART), SPI, I2C and a couple of other ways. Even RF transmitters.
The easiest way if the slave doesn't have to do anythign unles the master sives a signal, and if the slave knows what to do when the master says 'start!', is to control the slaves RST pin by a master GPIO. So as long as the master holds the slaves pin low, the slave is in reset start,sleeping. Once the pin is released/pulled high, the slave starts working as if powered-on. After some time, whcih must be long enough for the slave to compelte th ejob, the master pulls the line low again, sending ht eslave to sleep. Or the slave goes to sleep once the job is done, and hte maste ronly 'restarts' the slave by pullign its RST line low for a short moment.THis can be even aoutomated by using the PWM output of the timers.
More complex commands, and answers from the slave, require a more complex protocol like the mentioned ones. How do do it depends on whcih communication type is used.
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
Hello people,
I already now what the master and the slaves have to do, theoreticaly
but what I want to do is codify the MCUs using the IAR-EW
using language assembly or C,
write code in order to mcu do what I wrote above in general terms,
Joaquim de los Santos but what I want to do is codify the MCUs using the IAR-EW using language assembly or C, write code in order to mcu do what I wrote above in general terms
write code in order to mcu do what I wrote above in general terms
Sorry, without a specific problem (and 'i want one MSP to talk to another MSP' isn't specific at all), I cannot give you a more detailed answer. There are gazillions of possible ways, and I surely won't explain them all here. I suggested a few. Pick one or develop another, try it, and if you have a problem, you can ask again.
Just in case this should be your problem: The MSP processor core communicates with its internal peripherals thourgh memory-mapped registers. The header files available for all MSPs define these registers as volatile global variables which you can read or write. The users guide for your MSP list them all (including those available only on a few MSPs of the family, not necessarily yours) and the device datasheet tells you which peripherals (and therefore which registers) are availabel on your MSP. Along with things like pinout.And many of these peripherals can be used for communication of some kind.