Continue to Site

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.
 

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);
}
}
 

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.
 

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

Back
Top