Implementasi Mikrokontroler Atmega 8535 pada Panel Surya Statis dan Panel Surya Dinamis Berdasarkan Waktu Menggunakan Real Time Clock (RTC) DS1307

LISTING PROGRAM
/*******************************************************

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 : syahrial-solar tracker
Version : rev 1
Date :
Author : syahrial
Company : ekstensi Ilkom '11
Comments:
Chip type
: ATmega8535
Program type
: Application
AVR Core Clock frequency: 11,059200 MHz
Memory model
: Small

External RAM size
:0
Data Stack size
: 128
*******************************************************/
#include
#include
#include
#include
// I2C Bus functions
#include
// DS1307 Real Time Clock functions
#include
// Alphanumeric LCD functions
#include
#define adc_samp 500
// Declare your global variables here
unsigned char buf[33];
unsigned int i,cacah;
unsigned char j, m, d,a,c,s;


Universitas Sumatera Utara

unsigned int v1,i1,v2,i2,m1,j1;
float v1_temp,i1_temp,v2_temp,i2_temp;
unsigned int v1_real,i1_real,v2_real,i2_real,sudut;
float v1_real_d,i1_real_d,v2_real_d,i2_real_d;
// Standard Input/Output functions
#include
// Voltage Reference: AVCC pin
#define ADC_VREF_TYPE ((0