2.1. Experiment to read data from PORTB and outpu to the PORTC

# include <mega8535.h>
# include <delay.h>

void main(void)
{
DDRB=0×00;
PORTB=0xFF;
DDRC=0xFF;
#asm(“nop”);

while (1)
{
PORTC=PINB;
};
}

This entry was posted in Tutorial AVR C Codevision. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>