/*****************************************************
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 : Runing TEXT
Version : 2.05
Date : 6/22/2013
Author : Norman Swarzkop Rhamdani
Company : UIN sunan gunung djati Bandung
Comments:
Chip type : ATmega32
Program type : Application
AVR Core Clock frequency: 12.000000 MHz
Memory model : Small
External RAM size : 0
Data Stack size : 512
*****************************************************/
#include <mega32.h>
#include <delay.h>
#include <string.h>
#include <stdio.h>
#include <alcd.h>
char Kalimat[]="Selamat datang di Dunia Norman Swarzkop Rhamdani";
void LOOP(void);
void main(void)
{
// Alphanumeric LCD initialization
// Connections specified in the
// Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu:
// RS - PORTC Bit 0
// RD - PORTC Bit 1
// EN - PORTC Bit 2
// D4 - PORTC Bit 4
// D5 - PORTC Bit 5
// D6 - PORTC Bit 6
// D7 - PORTC Bit 7
// Characters/line: 16
lcd_init(16);
lcd_clear();
for(;;){
LOOP();
}
}
void LOOP(void){
unsigned int i,j,k;
char lcd = 16;
unsigned int data = strlen(Kalimat);
lcd_clear();
lcd_gotoxy(1,0);
lcd_putsf("NORMAN SWARZKOP");
for (i=lcd; i>=1; --i){
lcd_gotoxy(i,1);
for (j=0; j<(lcd-i); j++){
lcd_putchar(Kalimat[j]);
}
delay_ms(100);
};
k=0;
for (i=0; i<=data; i++){
k++;
lcd_gotoxy(1,1);
for (j=0; j<16; j++){
if (Kalimat[j+k] == NULL){
return;
}
lcd_putchar(Kalimat[j+k]);
}
delay_ms(100);
};
}
tolong jelaskan fungsi i,j,k dong gan,,,,
BalasHapusnyubi nih
i,j,k adalah variabel yang ber tipe data unsigned char
BalasHapusmas,saya ingin menggabungkan program running text diatas dengan kontrol led+pushbutton tp kenapa malah program Push Button+LED nya gak jalan? program akan saya kirim via email. terima kasih
BalasHapusAnda harus melakukan pengulangan yang jelas contohnya while(){};
BalasHapusFungsi loop Dan unsigned nya until gimana bang, tolong jelasinlogikanya, hehe
BalasHapusTerimakasih
Fungsi loop Dan unsigned nya until gimana bang, tolong jelasinlogikanya, hehe
BalasHapusTerimakasih