Home > Uncategorized > TUGAS MIKROPROSESOR

TUGAS MIKROPROSESOR

Di Susun oleh :

1). KRISTIAN SENDI P.B. NIM : 41410110044
2). TREA FERRY WICAKSONO NIM : 41410110096

preview rangkaian

Berikut adalah cara membuat rangkaian dan program menggunakan IC ATMega16.

Program yang digunakan:
1. Proteus ISIS 7
2. MikroC for AVR

Komponen yang digunakan dalam rangakaian:
1. IC ATMega16
2. Potensiometer
3. LCD 16×2

Rangkaian seperti gambar diatas, sedangkan programnya ada di bawah ini:

nsigned int adc_rd;
// LCD module connections
sbit LCD_RS at PORTC.B2;
sbit LCD_EN at PORTC.B3;
sbit LCD_D4 at PORTC.B4;
sbit LCD_D5 at PORTC.B5;
sbit LCD_D6 at PORTC.B6;
sbit LCD_D7 at PORTC.B7;

sbit LCD_RS_Direction at DDRC.B2;
sbit LCD_EN_Direction at DDRC.B3;
sbit LCD_D4_Direction at DDRC.B4;
sbit LCD_D5_Direction at DDRC.B5;
sbit LCD_D6_Direction at DDRC.B6;
sbit LCD_D7_Direction at DDRC.B7;
// End LCD module connections

char tulisan[] = “PKK_UMB_TE_17”;

void main() {
Lcd_Init(); // Initialize LCD
Lcd_Cmd(LCD_CLEAR); // Clear display
Lcd_Cmd(LCD_CURSOR_OFF); // Cursor off

Lcd_Out(1,3,tulisan); // Write text in first row
while (1) {
adc_rd = ADC_Read(0); // get ADC value from 0th channel
IntToStr(adc_rd, tulisan);
Lcd_Out(2,6,tulisan);
}
}

Tutorial pembuatan :

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: