since it said it an In Circuit Programmer, I made the ckt for led blinking as on the tutorial ..connected to the programmer pinsapplied 5v .. used Winavr as said over there ..first tools-->make allthen tools-->make program

this is not the format , its not plain english your talking , its a programming language write like this

while(waitcounter != 0)

Either way will work - and its not uncommom for people to write conditions in this 'reverse' format. It's just a matter of taste - but its best to stick with one format or the other.

Quote

another thing portc=countval++ what do u mean by that, its not a normal variable you are accessing , its a register write it in binary or hex form

This code should still work though. If you had LEDs on each output pin then pin 1 will flash at half the speed, pin 2 at a quarter, pin 3 at an eight etc relative to pin 0. But superchiku is right in that you need to be aware that you are changing all 8 pins. If its just some test code then fine - but if you start to hook up other devices on the other 7 pins then you will start to get into trouble.

Also have you checked that the LED isn't broken? Try just setting the pin to 0 in your loop and see if the LED comes on. If not: try setting it to 1. If neither works then the LED is probably broken or connected the wrong way around.

another thing portc=countval++ what do u mean by that, its not a normal variable you are accessing , its a register write it in binary or hex form

This code should still work though

this wont work webbot the countval is kepe on increasing there is no limit after 7 it should be reset to 0 but it isnt, while 0!=waitcounter) is a very adhoc way of writing so its better not to do that

See that 'DDRD=0xFF' well if you added a line after saying 'PORTD=0xFF' then it would set all 8 pins on port D to high. Or 'PORTD=0xAA' which is '10101010' in binary would set 4 pins high and 4 pins low.

In the code above they are setting PORTC to a number that increases from 0 to 0xFF so it will turn all 8 pins on/off in a single instruction. So if you want pins 7,6 and 5 to be high and the rest low you could write 'PORTC=0xE0' which is much quicker, and takes less space, than:PORTC |= (1<<7);PORTC |= (1<<6);PORTC |= (1<<5);PORTC &= ~(1<<4);PORTC &= ~(1<<3);PORTC &= ~(1<<2);PORTC &= ~(1<<1);PORTC &= ~(1<<0);