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.

program in micro c

Status
Not open for further replies.

mosajawdet

Newbie level 1
Joined
Feb 20, 2013
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,280
Activity points
1,280
HI ALL
I have a project at PIC Microcontroller 16f877a using micro c & I'm a beginner in micro c there is some thing wrong in the program I don't know it ; the program must make the port on tow minute & off tow hour the program bellow please need help :

void main() {
char i;
{
trisd=0x00;
while(1)
Portd.f0=1;
Delay_ms(30000);
Delay_ms(30000);
Delay_ms(30000);
Delay_ms(30000);
portd.f0=0;
for( i==1; i==120 ;i++);
{
Delay_ms(30000);
Delay_ms(30000);
} }
}
 

The code has many issues:

while (1) will run for ever... :(

where you have written: for( i==1; i==120 ;i++);
I think you wanted to write: for(i=1; i<120;i++)

Regards,
Mariano.-
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top