11111111 - void main(void){ uint_8t count PORTA=0xFF...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <mega16.h> typedef unsigned char uint_8t typedef unsigned int uint_16t typedef unsigned short usint_16t typedef unsigned long uint_32t typedef signed char int_8t typedef signed int int_16t typedef signed short sint_16t typedef signed long int_32t typedef char char_t typedef float float_32t typedef double float_64t /*Local Function Prototypes *********************************************/ /************************************************************************/
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: void main(void){ uint_8t count PORTA=0xFF DDRC=0xFF UBRRL=38 UBRRH=0 UCSRB=0x18 UCSRC=0x86 DDRA=0x00 count=0 PORTC=~0x00 while (1) { while ((PINA&gt;&gt;7&amp;0x01)==1) { count=count&lt;&lt;1 count=count+1 while ((PINA&amp;0x04)==0) { } do { PORTC=~count } while ((PINA&amp;0x04)!=0) } Sheet1 Page 2 while ((PINA&gt;&gt;7&amp;0x01)!=1) { count=count&gt;&gt;1 while ((PINA&amp;0x04)==0) { } do { PORTC=~count } while ((PINA&amp;0x04)!=0) } } }...
View Full Document

This note was uploaded on 10/14/2009 for the course ECET 159 taught by Professor Staff during the Spring '09 term at Purdue University-West Lafayette.

Page1 / 2

11111111 - void main(void){ uint_8t count PORTA=0xFF...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online