yogendra82
Newbie level 1
- Joined
- Sep 3, 2013
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 9
Hi want to generate two Pulses with 1 Hz frequency but one pulse is 14 msec is high and rest 986 msec is low. Second pulse will begin just before 14 mesc of first pulse, 5 msec is high and rest 995 mesc is low.
I written a source code in Kiel compiler for AT59C52:
that code is not working. compiler shows syntax error.
please modify to this code for fullfill to above mention purpose.
I written a source code in Kiel compiler for AT59C52:
Code:
#include<reg52.h> // special function register declarations
// for the intended 8051 derivative
#include<stdio.h> // prototype declarations for I/O functions
#define PORTP1^0
#define PORTP1^1
void Delay(); // Function prototype declaration
void main (void)
{
while(1) //infinite loop
{
P1^0 = 0xFF;
P1^1 = 0x00;
Delay(14);
P1^0 = 0x00;
Delay (981);
P1^1 = 0xFF;
Delay(5);
}
}
void Delay()
{
int j;
int i;
for(i=0;i<10;i++)
{
for(j=0;j<10000;j++)
{
}
}
}
please modify to this code for fullfill to above mention purpose.