at89c2051 help me plz

Status
Not open for further replies.

yanuma

Newbie level 5
Joined
Jun 25, 2015
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
24
at89c2051 p3.7 end press the button that connected the port p1.6 and I want to leave off exit 10 seconds apart in the port p1.7

Arlie

 

Hi,

To me it is not clear what you need.
Maybe a picture could help.

Klaus
 

Code:
#include<reg.51.c>
#include<delay.>

sbit buton_PIN=3^7
sbit led_PIN =1^6
sbit ledd_PIN=1^7
void()

{
basla:
if(butonpin3_7: 
ledpin1_6high:
delay_ms_50 :
leddpin1_6LOW:
THEN(ledpin1_7high:
delay_ms50:
leddpin1_7LOW:

goto basla:
}

I wrote a code like this

- - - Updated - - -

[CODE
 
Last edited:

Hi,

Please be more descriptive.

* Where do you need help?
* What do you expect?
* What happens instead?

Klaus
 

KlausST hi

pic. as I have written in this integrated circuit in the same basic language but I couldn't do it in C language

- - - Updated - - -

where is the mistake in this code
 

try simulation without delay function,subroutine and for one led pin
 

Is there any problem in code that i have written?

- - - Updated - - -

at89c2051 When I push and pull the button in p3.7, p1.7 will out for 10 seconds after that p1.6 will out and the programme will return the begining.
 

You have not post C code.
Almost every line has syntax errors.
You should keep using basic, or you will neer to dive in C study.
Try K&R (Kernigham & Richie bible book: the C programming language) or other tutorials
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…