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.

[51] How to create a pulse in Keil C51 debugger

Status
Not open for further replies.

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Activity points
3,548
I need to pulse a port low for 100usecs. Can I do it in Keil C51?

I was able to create a button using the toolbox. But don't know how to make it toggle.
 

arishsu

Member level 3
Joined
Sep 10, 2013
Messages
66
Helped
6
Reputation
12
Reaction score
6
Trophy points
8
Location
India
Activity points
422
Definitely you can do it in keil.

Use two functions for on time and off time. implement a timer for on and off period.

Example:
void PORT_on(void){
PORT |= 1;
}
void PORT_Off(void){
PORT &= 0;
}


int main(void){
PORT_Init();
while(1){
PORT_On();
timer(50u);
PORT_Off();
timer(50u);
}
}
 

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Activity points
3,548
Definitely you can do it in keil.

Use two functions for on time and off time. implement a timer for on and off period.

Example:
void PORT_on(void){
PORT |= 1;
}
void PORT_Off(void){
PORT &= 0;
}


int main(void){
PORT_Init();
while(1){
PORT_On();
timer(50u);
PORT_Off();
timer(50u);
}
}

I am talking about debugger.
While debugging, I need to make a port pin low. Instead of clicking on/off, i want to make it low for 100us.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
50,086
Helped
14,508
Reputation
29,286
Reaction score
13,453
Trophy points
1,393
Location
Bochum, Germany
Activity points
287,706
You are talking about debugging or a software simulation?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top