Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] led blinking in renesas software

Status
Not open for further replies.

dinesh19

Newbie level 3
Joined
Aug 9, 2014
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
18
this is sample coding

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if(Count < ON_Limit)
    {
        Count++;
        P1.3 = ~P1.3;
        OFF_Count = 0;
    }
    else if(OFF_Count <5)
    {
        OFF_Count++;
        P1.3 = 1;
    }
    else
    {
        ON_Limit = ON_Limit + 2;
        P1.3 = 0;
        if(ON_Limit >6)
            ON_Limit = 1;
            Count = 1;
        OFF_Count = 0;
    }

output
1sec led on 5sec led off
2sec led on 5sec led off
3sec led on 5sec led off
just this program change to this type of output
3sec led on 5sec led off
6sec led on 5sec led off
9 sec led on 5sec led off
can u help me..
 
Last edited by a moderator:

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
Timing delays with software integers is a bad idea. You should use the dedicated timers/counters on your MCU.
 

dinesh19

Newbie level 3
Joined
Aug 9, 2014
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
18
Timing delays with software integers is a bad idea. You should use the dedicated timers/counters on your MCU.

how to change the program pls tel me the conditions...
 

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
I suggest that you read the data sheet of your Renesas MCU. Pay special attention to "timers".
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top