Pemanfaatan Dan Pengujian Sensor Water Flow Pada Kontrol Aliran Air Berbasis Mikrokontroler Atmega8535

PROGRAM LENGKAP

/******************************************************
*
This program was created by the
CodeWizardAVR V3.12 Advanced
Automatic Program Generator
© Copyright 1998-2014 Pavel Haiduc, HP InfoTech s.r.l.
http://www.hpinfotech.com

Project :
Version :
Date

: 05/07/2015

Author

:

Company :

Comments:

Chip type

: ATmega8535

Program type

: Application

AVR Core Clock frequency: 8.000000 MHz
Memory model

: Small

External RAM size

: 0

Data Stack size


: 128

*******************************************************
/

#include
#include
#include
#include

#define reset PIND.7
#define t1 PIND.4
#define t2 PIND.5
#define t3 PIND.6
#define pump PORTD.3

// Alphanumeric LCD functions
#include
unsigned char temp[8];

int data,set1=0, set2=0, set3=0, state=0, loop, waktu;
float liter=0;
char buff[8];

// Declare your global variables here

void main(void)
{
// Declare your local variables here

// Input/Output Ports initialization
// Port A initialization
// Function: Bit7=In Bit6=In Bit5=In Bit4=In Bit3=Out
Bit2=In Bit1=In Bit0=In
DDRA=(0