MSP430: Software drivers for Interfaces

Thread Starter

satti15790

Joined Jul 17, 2017
17
Hi,

I am new to MSP430 micro controllers...
Actually In my project we are going to use below interfaces:

I2C
RS-422
GPIO
Interrupts
UART

For the above interfaces is it required special drivers for software? If yes
Can you please help me by providing those drivers for software? and Sample Example programs for different interfaces using those drivers

Thanks in advance
 

MrChips

Joined Oct 2, 2009
34,628
What is your concept or definition of a driver?

RS-422 is a hardware level technical standard at the voltage level. Why would it need a "driver"?
What would a GPIO driver look like?
What would an interrupt driver look like?

Sounds like someone coming from PC OS programming environment entering the embedded world.
Sounds like homework to me.

In short, the answer is no.
 

Thread Starter

satti15790

Joined Jul 17, 2017
17
To program the registers(MSP430) we have two options:
1)To configure manually..
2)Directly we can call some inbuilt api's to configure(in my case these are the drivers)...
As per my knowledge definitely those api's will act as drivers...
GPIO and Interrupt driver look like: manually u can assign or by using some inbuilt api's.

If you are not able to following i can explain in detail...

Thanks
 

MrChips

Joined Oct 2, 2009
34,628
APIs are used by PC technocrats working with OS where the system is so complex that they couldn't design and write their own code. It is also used by people who want to reuse the same code to run on different platforms.

If you want to learn how to design and work with embedded MCUs, learn how to write your own code.

Why use an API to drive GPIO when all it takes is one ASM instruction to do it?

You can use a library function to set a GPIO pin using something like:

SetGPIObit( port, pin)

In ASM, it would be a single machine instruction:

BIS.B #1, &P1OUT
 

DickCappels

Joined Aug 21, 2008
10,661
If you cannot write the code yourself or it is complicated code, the function of which has been written many times (e.g. "Really, do I need to write my own 24 bit binary-to-decimal routine?") you can look around for some code that does what you want and adapt that to your purpose, in the case of commercial use with the author's permission.

Good sources of code are manufacturers datasheet examples, application notes, and web sites featuring projects using the a controller similar to yours.

I must say that once you know enough to use assembly language you will feel there is any legitimate use for a subroutine that performs simple GPIO tasks. Bit-banging a proprietary protocol yes, setting a bit or writing a byte, no.
 
Top