Powered By Blogger

Saturday, June 13, 2015

I'M RUNNING FROM THE PAST !!!

I'm running from the past,  'cause I can't let it to last.
It's haunting me to blast, still I'm not running too fast..
I'm a Mr.  Nobody,  I'm a mere cypher.
Ooh forgot to Mention, I'm also a fighter..

They call it to empower, they send them some flower.
They don't give the freedom, yeah they're so coward...
Flowers won't do it, mercy won't do it.
Don't wait for the writ, why don't you just quit...

Half the world is full of them, still they need to be endowed.
You got to be kidding me, the other half is still so proud...
Stop this nuisance, don't do this show off.
This ill faced society is getting into trough...

We still have time to rectify this blunder, to stop the plunder.
Oh dear boy wonder, open your eyes, and see the torn asunder...
Don't allow them, permit them or show mercy.
They're the ladies, they've the right for their own Jersey...

None is greater, monk or the priest.
For if they care,  they do that the least...
Everyone has to feel it, the equality of the half.
God's not gonna come and do it in your behalf...

Let them free, and fly to the sky.
They're the birds, they know to go high...
They'll be proud, you'll be proud.
And then won't be anyone to defy...

"Equality is not given, it's felt within... 
Once you feel it, it begin... "

Tuesday, June 9, 2015

CONTROLLED LED GLOW USING SWITCH

CONTROLLED LED GLOW USING SWITCH

The aim of the program is to make you familiar with :
1. basic commands
2. Interrupts
3. switches on developer board

OUTCOME

The outcome of the program will be like when you press button1 First Time at P4.5 LED 1 will GLOW and LED 0 will be OFF. When pressed again LED glowing reverses. The later button 2 at P1.0 works as a switch for the whole process of the glowing. If button 2 is once pressed the button 1 works , i.e. switching the glowing of LEDs at each press, and if button 2 is pressed again, button 1 becomes ineffective.

WORKING

The prime background working of this program is Interrupt Service Subroutine. MSP430FR5969 is a Ultra Low Power device. Running a program and checking the pin status always continously takes energy. So its wise to use interrupts instead. Interrupt is enabled at each button press and work is done accordingly.
Work of BUTTON 2 is to enable or disable BUTTON 1. So we make the value of a our main variable to TURNED OFF situation (here COUNT=2 ). And BUTTON 1 keeps increasing the value of COUNT at each Interrupt generation. When reached 3, it's reset to 0 (this is done since two LEDs are used. You can use many more LEDs and so let count reach a higher value accordingly).

POINTS TO EMPHASIZE

Command: WDTCTL = WDTPW + WDTHOLD

This command disables WATCHDOG TIMER.
Now what is this Whatchdog Timer. Allow me to explain this crucial point. It is a control that helps to prevent the code being stuck at a place where it shouldn't be like an infinite loop. If the control gets stuck in an infinite loop, it checks that the control hasn't come out of the loop in a certain time. Then it resets the device to free up all the memories and start over again.

We in this case don't want this to happen. Instead we have deliberately introduced an infinite loop.

Command : PM5CTL0 &= ~LOCKLPM5

This command disables the GPIO power on default high impedance state. In simpler language, it enables new code to be written on the controller each time we burn the code. Without this line program doesn't gets into memory and we would get worried that some logical or hardware error must have happened.


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//                                                 PROGRAM STARTS FROM HERE
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include

#define LED_0 BIT0
#define LED_1 BIT6
#define BUTTON BIT5
#define BUTTON2 BIT1

unsigned int count = 2;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

void main(void)
{
WDTCTL = WDTPW + WDTHOLD;              // Stop watchdog timer
PM5CTL0 &= ~LOCKLPM5;                          // Disable the GPIO power-on default high-impedance                                                                           //mode to activate previously configured port settings
P1DIR |= (LED_0 + LED_1);                         // Set P1.0 and P1.6 to output direction
P1OUT &= ~(LED_0 + LED_1);                    // Set the LEDs off


P4REN |= BUTTON;                                         //Enables a puller-Resistor on the button-pin
P4OUT |= BUTTON;                                    //Writes a "1" to the portpin, tellling the resistor to pullup
P4IES |= BUTTON;                                   //Triggers when you PRESS the button :: Pick one
//P1IES &= ~BUTTON;                        // Triggers when you RELEASE the button :: or pick the other
P4IE |= BUTTON;                  //Enables the selector-mask for generating interrupts on the relevant pin


P1REN |= BUTTON2;                                      //Enables a puller-Resistor on the button-pin
P1OUT |= BUTTON2;                                 //Writes a "1" to the portpin, tellling the resistor to pullup
P1IES |= BUTTON2;                                //Triggers when you PRESS the button :: Pick one...
//P1IES &= ~BUTTON;                     // Triggers when you RELEASE the button :: ...or pick the other
P1IE |= BUTTON2;                //Enables the selector-mask for generating interrupts on the relevant pin

P1IFG &= ~BUTTON2;                                             //~~~~~~~~~ P1.1 IFG cleared
P4IFG &= ~BUTTON;                                               //~~~~~~~~~P4.5 IFG cleared

/* Clearing of (IFG) Interrupt Flag is important. If not done it will take any random value, may get triggered without button pressed at the first time and generate undesired value.*/


__enable_interrupt();                              // Interrupts get enabled *here* - they were disabled thus far..

for (;;)
{

if (count == 0)                                                       // Even button Press condition
{

       P1OUT |= (LED_0);                                        // led 0 is ON
       P1OUT &= ~(LED_1);                              // led 1 os OFF
}
else if (count == 1)                                                 // Odd button Press condition
{

P1OUT |= (LED_1);                                // led 1 is ON
P1OUT &= ~(LED_0);                             // led 0 is OFF
}
else                                                                           // Default Case..... (both LEDs OFF)
{
P1OUT &= ~(LED_0);                             // led 0 is OFF
P1OUT &= ~(LED_1);                             // led 1 is OFF
}
}
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//                                                 MAIN PROGRAM ENDS ABOVE
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


// Port 4 interrupt service routine

#pragma vector=PORT4_VECTOR
__interrupt void Port_4(void)
{
count++;                                                            //The value of count is increased on each interrupt
P4IFG &= ~BUTTON;                                             // P4.5 IFG cleared
if (count > 2)
{
count = 0;                                                         // count is reset when count =3

}

}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Port 1 interrupt service routine

#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
P1IFG &= ~BUTTON2;                                               // P1.1 IFG cleared
   count = 2;
}

Monday, June 8, 2015

MSP430FR5969

About the Device
The MSP430™ ultra-low-power (ULP) FRAM (Ferromagnetic RAM) platform combines uniquely embedded FRAM and a holistic ultra-low-power system architecture, allowing innovators to increase performance at lowered energy budgets. FRAM technology combines the speed, flexibility, and endurance of SRAM with the stability and reliability of flash at much lower power.
The MSP430 ULP FRAM portfolio consists of a diverse set of devices featuring FRAM, the ULP 16-bit MSP430 CPU, and intelligent peripherals targeted for various applications. The ULP architecture showcases seven low-power modes, optimized to achieve extended battery life in energy-challenged applications.
All these may attract you as an embedded design developer. And as a starter, everyone faces some challenges.
TI has provided ample support for this kit, but the support is not device specific. I faced a lots of problems in running few simple codes on the MSP430 FR5969 kit at starting. And the learning process is still on. RISC architecture of MSP430 makes it complicated to program and difficult to remember its diverse coding possibilities.
But gradually with practice one be familiar with all normally used functions of this kit. 
The programs I upload are first tested by me. The Software used and difficult conditions arisen are mentioned in the comments. Half of the solutions to our problem are mentioned in comments only. so please go through them at once.
So, lets start taking dips in the vast ocean of opportunities with MSP430 FR5969.

Sunday, October 2, 2011

Future unseen


Even we’ve reached few milestones
Even we witnessed a whole heap of thrones
Though we’ve got the feeling for thou
And got few prophecies in the hands right now
Harder we tried, more complexly it has peened
Alas, see yet we’re facing to future unseen
The god has given us past in mind
 And also we’ve the present divine
Then why in the world we look ahead
And loses our nights and naps on bed
Is our peace most worthless possession
Why do we love so immense devastation
What we achieved by being so mean
Still we’re marching to the future unseen
The rhymes we read at early classes
The images we tried at naked glasses
The heroes with ethics so high and high
Whether it been a lad or some sort of spy
We copied the words and dialogues and deeds
And now we back off at the time of need
Forgetting all the values and the necessary scenes
We close our eyes and rove to the future unseen
Where has lost those morals of patience
Why has gone those levels of endurance
We’re not been made for anger and rage
Then why are we going through such a pity phase
How can we become so uncaring and mean
How can we hate a structure so similar when seen
Whether we’re young, old or a teen
We should ruin the screen to wean this scene
From where the humanity evolved the way it has been
Is it for the future of going to the future unseen?

Sunday, September 25, 2011

I WAS WAITING MANY A WAYS

I was waiting for you to chat for days
I was waiting for you to listen my phrase
I don’t know what happened that night
But that night I was waiting many a ways.
Knowing the fact that you’re not mine
Getting the point of subtle serenity divine
Unable to figure out, why I waited on hays
Yet that night I was waiting many a ways.
From the height of the mountain to depth of ocean
As soon I close my eyes, see them in motion
With all my heart in true devotion
The feeling in my heart was a gesticulation
Neither any justification, nor was any negotiation
Betraying all the regulations, to touch you out if just in case
So that night I was waiting many a ways, many a ways.
Throwing roses on you in my dream
I slept very deep, extreme and keen
You were mine and mine were those days
Laughingly, that night also I was waiting many a ways.
The morning sun put on me some rays
I got the verity that you’re not at all mine
And looked over my last night’s craze
But again that night I was waiting many a ways, many a ways.

Engineers against Corruption

The river comes down with splashes on the sides,
Even each the pebble feels pressure and vibes,
The impetus is to be as swift as you can
What the change can bring tiny little lives.
More they plunge, sooner they tire,
Up in the waves, faster and higher,
Spanked to the sides, always when tried
What the change can bring tiny little lives.
Until it comes to life or death,
With a hope that we can fight till the last breath,
The moral they learn and swim with the tides
What the change can bring tiny little lives.

Tuesday, March 2, 2010

Personal


As being in Poornima college of Enginnering , I got to learn one thing very nicely. The world is very fast and no-one has time even to think of oneself. In this cut-throat competition, every one is a single entity. Obviously one has friends yet that one is ONE....only. But the most important thing missing in our lives is INTEREST.
Interest is the key to happy and successful life under deep stress and huge work load conditions also. My suggestion to all the readers is to develop interest in everything... Everything means everything, interest in chatting, in gossiping, in surfing, in google, in how things work, in drinking water even, in brushing tooth, in watching movies, in reading novels, in going to college, in subject papers(most difficult one), in relationships.............
This list is endless but the thing is have interest in life and see how beautiful world is, how nice is our lives. So adjusted that everything happens for the best possible...
In tension nothing goes our way. In anger opposites happen.
Then why not try doing things with interest.
Interest is the key to happy and successful life.
Try this it works in every aspect of life...