2 #include <util/delay.h>
4 //#include <compat/deprecated.h>
6 variable = PINx; // Read a byte from a port, replace x with the port number
7 PORTx = variable; //Write a byte to a port
8 PORTx |= 1<<pin_number; // Set a pin in a port
9 PORTx &= ~(1<<pin_number); // Clear a pin in a port
12 void delay(unsigned int ms
) {
14 for ( j
=0; j
<1000; j
++)
15 for ( i
=0; i
<ms
; i
++);
20 //sbi(DDRD,PD5); /*enable port 5 for output*/
This page took 0.271413 seconds and 4 git commands to generate.