Disini saya akan posting tentang sebuah alat untuk mengukur Tegangan Listik dan Frekuensi Listrik tentunya pada sekala Hz (Hertz)..
Dan disini saya menggunakan program Proteus, dengan rangkaian sebagai berikut..
Oke, langsung saja, disini saya memakai Chip atau IC mecrocontroller AVR dengan type Atmega8.. selain simple dan mudah di cari, tentunya juga untuk mengirit biaya, Hehehehee.. dan saya gunakan Indcator Display LCD 16x2 , sebagai penampil..
Langsung saja ini Source Programnya..
/***********************************
******************
This program was produced
by the
CodeWizardAVR V2.05.0
Professional
Automatic Program Generator
© Copyright 1998-2010
Pavel Haiduc, HP InfoTech s.r.l.
http://www.hpinfotech.com
Project : Frekuensi Meter ATmega8
Version : 0.01
Date : 06/07/2014
Author : NeVaDa
Company : Radika
Comments: Kurang lebih seperti ini..
Chip type : ATmega8
Program
type : Application
AVR Core
Clock frequency: 16,000000 MHz
Memory model : Small
External RAM
size : 0
Data
Stack size : 256
*****************************************************/
int VOLT;
char temp[8];
float Volt_AC;
#include
#include
#include
#include
#include
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#define
ADC_VREF_TYPE 0x40
unsigned int counter1;
unsigned char buffer[10];
unsigned int read_adc(unsigned char adc_input)
{
ADMUX=adc_input | (ADC_VREF_TYPE & 0xff); // Delay needed for the stabilization of the ADC input voltage
delay_us(5);
// Start the AD conversion
ADCSRA|=0x40; // Wait for the AD conversion to complete
while
((ADCSRA & 0x10)==0);
ADCSRA|=0x10;
return ADCW;
}
void main(void)
{
PORTB=0XFF;
DDRB=0X00;
ACSR=0x80;
SFIOR=0x00;
// ADC initialization
// ADC Clock frequency: 750.000 kHz
//ADC Voltage Reference: AVCC pin
// ADC Auto Trigger Source: None
ADMUX=ADC_VREF_TYPE & 0xff;
ADCSRA=0x84;
lcd_init(16);
lcd_clear();
lcd_gotoxy(3,0);
lcd_putsf("Dika Audio");
delay_ms (1000);
lcd_gotoxy(3,1);
lcd_putsf("Profesional");
delay_ms (1000);
lcd_clear();
lcd_gotoxy(0,0);
lcd_putsf("Sumberagung");
delay_ms (1000);
lcd_gotoxy(7,1);
lcd_putsf("Kepohbaru");
delay_ms (2000);
lcd_clear();
lcd_gotoxy(0,0);
lcd_putsf("085850945733");
delay_ms (5000);
lcd_clear();
}
}
">
Nah di atas adalah penggalan program yang saya buat, untuk lebih lengkapnya bisa anda Download di bawah ini..
Mohon Maaf jika kurang mengerti bisa Koment di bawah.. Oke?..
Frekuensi Meter ATmega8
2 komentar:
good...
Gak bisa di download
Posting Komentar