Professional Documents
Culture Documents
4a Advanced Automatic Program Generator Copyright 1998-2009 Pavel Haiduc, HP InfoTech s.r.l. http://www.hpinfotech.com
Author : Rico Arliyanto Company : D4 TKJ Batch3 ITB Seamolec Comments: Tugas Embedded System Pak NONO,,Buatan saya yang pertama
: ATmega16 : Application
AVR Core Clock frequency: 8,000000 MHz Memory model External RAM size Data Stack size : Small : 0 : 256
*****************************************************/
#include <mega16.h></mega16.h>
void main(void) { // Declare your local variables here char x=48910066; char data_dari_komputer;
// USART initialization // Communication Parameters: 8 Data, 1 Stop, No Parity // USART Receiver: On // USART Transmitter: On // USART Mode: Asynchronous // USART Baud Rate: 9600 UCSRA=0x00; UCSRB=0x18; UCSRC=0x86; UBRRH=0x00; UBRRL=0x33;
while (1) { // Place your code here data_dari_komputer=getchar(); //scanf("%c", data_dari_komputer); if (x==data_dari_komputer){ printf("Hai Rico Arliyanto"); } }; }