Subversion Repositories svnkaklik

Rev

Rev 547 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 547 Rev 715
Line 20... Line 20...
20
int main(void)
20
int main(void)
21
{
21
{
22
          /* INITIALIZE */
22
          /* INITIALIZE */
23
          /* enable PC5 as output */
23
          /* enable PC5 as output */
24
          DDRC|= (1<<DDC5);
24
          DDRC|= (1<<DDC5);
-
 
25
//          DDRC|= (0x00);
25
 
26
 
26
          /* PC5 is 5 (see file include/avr/iom8.h) and 1<<PC5 is 00100000 
27
          /* PC5 is 5 (see file include/avr/iom8.h) and 1<<PC5 is 00100000 
27
	   * This can also be written as _BV(PC5)*/
28
	   * This can also be written as _BV(PC5)*/
28
          while (1) {
29
          while (1) {
29
                      /* led on, pin=0 */
30
                      /* led on, pin=0 */
30
                      PORTC &= ~(1<<PC5);
31
                      PORTC &= ~(1<<PC5);
31
                      delay_ms(100);
32
                      delay_ms(100);
32
                      /* set output to 5V, LED off */
33
                      /* set output to 5V, LED off */
33
                      PORTC|= (1<<PC5);
34
                      PORTC |= (1<<PC5);
34
                      delay_ms(1000);
35
                      delay_ms(1000);
35
          }
36
          }
36
	  return(0);
37
	  return(0);
37
}
38
}
38
 
39