Welcome Guest! To enable all features please Login.

Notification

Icon
Error

Embedded program to blink LEDS in sequence
Dhaks
#1 Posted : Sunday, October 27, 2013 4:32:14 AM(UTC)
Rank: Newbie

Joined: 10/27/2013(UTC)
Posts: 1

Hello all,
I am new to this site and new to Embedded programming. I am current studying Ms in embedded system. I need help in writing the below program. I have to write program to implement the blinking of LED in sequence of Table 1 using a total of 24

I hav written the code to blink leds in sequence. Please find below my code.
unsigned int i; /* LED var */

IODIR1 = 0x01FFFFFE;

while(1)
{
for(i = 0x00000002; i <= 0x01000000; i <<= 2)
{
IOSET1 = i;
wait(500000);
IOCLR1 = i;
}
}

But i need help in coding for the below criteria:
i) Furthermore, a “heart beat” LED blinking at 2 Hz frequency will be driven by Pin 28 of Port 0.

ii) If the 29th pin of port 0 (P0.29) is at Logic 1, the LED sequence of Table 1 is
generated in reverse or in the order shown in Table 1 otherwise.

iii)The active sequence should be updated ONLY if both P0.30 AND P0.31 are at Logic
1 (otherwise it should remain frozen).

It would be a great help if someone can help me complete this.

Many thanks
Dhaks
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 2.020 seconds.