Interrupt implementation for msp430 microcontroller - msp430

Can anyone explain me how to implement msp430 interrupts I need to work for uart interrupts . what does it means USCI_A2_VECTOR ??

Have a look at the various tutorials available:
https://www.embeddedrelated.com/showarticle/420.php
http://www.simplyembedded.org/tutorials/msp430-uart/
As for the interrupt vectors themself - have a look at the familiy guide for your MSP, there you will find which vectors exists, how they are named, and in which cases they are used.
For a more specific answer you will need to provide more details and in which issues to got. See Maciej Jureczkos comment for a link how to ask here ;)

Related

Using microcomputer pin alternate functions

I hope this isn't too general a question, but how does one use an alternate pin function when programming a microcomputer. Specifically, does one have to "tell" the microcomputer that you're using the pin for a function other than its default. I realize that it's done, in effect, when one sets up SPI or I2C, for example, but is it language specific, so that in C/C++ one has to specifically identify the function one is going to use in some fashion. So, for GPIO (or whatever the default function is) one doesn't have to do anything, but if one wants to use a pin's alternate function 3 (let's say it's U2-RXD one has to communicate that explicitly to the microcontroller? Pardon the "stupid" question.
I'll take "it depends" as the definitive answer and defer to the datasheet for follow-up.
Thanks.

Arduino + Industrial Interface

In a project, we need to drive a linear motor module (some high tech fancy industry thing) with something as simple as an Arduino. Basically we need to get the speed of the Motor and send its new commands back. In between I'll implement a controller and logic.
To be honest, I only got a rough idea, how industry (ethernet or other) standard/interfaces work, and I got absolutely no idea, if it is even possible to interface such a fancy thing with an Arduino.
I've got the options for the following things:
Sercos III, Profinet IO, EtherNet/IP, EtherCat
possibly also: CANopen, Profibus
Are there any libraries/known projects in this direction? Or is it strictly impossible? I found 2 projects about profibus, but they didn't really seem to be reproducable in the near feature, without significant efforts.
Thanks for any hints, advices etc.!
Very interessting discussion about CAN on Arduino DUE: http://forum.arduino.cc/index.php?topic=131096.0 Same should work for the DigiX as it is 100% pin- and code compatible (and still available ;-) )

How to convert lpc interface to serial on arduino

As a hardware illiterate software guy trying to do a hardware prototype, will appreciate an answer to this.
One of the hardware components that I need to integrate supports only lpc interface. Is there a way to have it work with arduino? Does the question even make sense? What are my options with this?
I tried doing a bit of research on this, but simply didn't understand anything, nor was there any direct reference to anything that makes this possible.
I guess you're talking about Intel's Low Pin Count protocol.
And I guess, you're trying to make a BIOS flasher, aren't you? ;-)
Is there a way to have it work with arduino?
yes
Does the question even make sense?
of course
What are my options with this?
Have a look at that article and this thread… It shows and gets into some details in how to implement it.
As you say you're a software guy, just consider that you're trying to implement some kind of network procotol stack, starting from the basic building blocks. You need to take care of sending the bits over the pins, take care of the timings, output the start/end stop flags if there are… And then implement a buffer on top of that to parse a byte, and then bytes, etc…
All you need to do that is to follow the sepecification, and plug a few pins on the Arduino.
Well, your question should be closed for lack of research effort, but hence you say you tried but are still lost, I hope my insights will help you come back and ask a real on-topic question with something you actually tried.
HTH

A way to change mcu program from the outside

We need to change a controller code from the out side as they do with industrial MCU .
So that you have an mcu,with a program on it, and someone can program some "words" to it, that will determine how it works.
So for example you can program an mcu -not with a programer but with some inputs from serial, to do some simple things such as:
if input A==1
b=1
I wonder if there is a smart way to do that with simple software on the mcu, that it has many #defines for various commands, and it perform them according to values it gets from the outside (and saved for the rest of the program).
I wonder if the industrial programers are using that method, or that every programing of a user is actually load a code(.hex) to the chip(with internal programer ) .
I prefer the simplest way(i wonder if its by pre defined software)
A couple of options come to mind so hopefully this answers your question. It sounds like the simplest version of your question is "How do I change the behavior of the MCU without an actual MCU programmer?" A couple of options come to mind.
1) Depending on the MCU you can have a bootloader that is essentially a small piece of code programmed in the MCU by a programmer that has the ability to reprogram other parts of the MCU. This doesn't require a programmer but involves some other form of letting the bootloader know what the new code is (USB, Serial, SD Card, etc). This will only work if the MCU has the ability to self flash.
2) Again, depending on MCU and scenario you could program a generic set of rules that carry out functionality based on the inputs given to the MCU. This could be in the form of IO pins, EEPROM, or a domain-specific script on an SD card that the MCU can read and interpret at runtime.
Both options depend on the MCU you are using and what hardware capabilities you have at your disposal. But you certainly have options other than reprogramming the end hardware with an actual programmer every time you want to make a change. Hopefully that helps.

Programmer's Guide for Pic Microcontroller

I'm looking for programmer's guide for PIC16F1947 micro but so far couldn't find such manual. Is it available online? If yes, where can I find it?
I've searched microchip.com and Google but didn't see such manual.
By programmer's guide I mean a manual for us, the programmers. The manual should contain how to write programs for PIC micros (e.g., how to write interrupts, what does __config do, which files to include etc).
Thanks.
EDIT
I'll use MPLAB IDE 8.46, ICD 3 and HI-TECH C Compiler 9.81.
This manual will probably work as a starting point. It talks about things like interrupts and generally how to perform various simple tasks: http://www.cs.ucr.edu/~eblock/db/downloads/PICmanual2.pdf
You will still need the datasheet and/or the programming guide to perform more complex tasks. Those documents will provide the necessary details to drive functionality on your specific chip. Here's a link to the programming guide: http://microchip.com/wwwproducts/Devices.aspx?dDocName=en538146
I found a data sheet for the PIC16F1947 catalogued here; not sure if it's the right one:
http://www.alldatasheet.com/view.jsp?Searchword=PIC16F1947
(Passing this site on, as even though it's not the manufacturer's site, it's a really good resource for finding data sheets; I'm not affiliated.)
ETA: Hmm, well, it used to be a good site, but it seems less so, now.. Leaving this here in case it is still useful.

Resources