#Include #Include : For ( ) (// Endless Loop, Sama Saja "While (1) " Tampilan ) )
#Include #Include : For ( ) (// Endless Loop, Sama Saja "While (1) " Tampilan ) )
h>
#include <alcd.h>
#include <delay.h>
#include <string.h>
void sett_regs(void);
void tampilan(void);
// Declare your global variables here
..
void main(void)
{
// Declare your local variables here
for(;;)
{ // Endless loop, sama saja "while(1)"
tampilan();
}
}
// Setting register
void sett_regs(void){
//Define I/O
DDRA = 0xff;PORTA = 0x00;
DDRB = 0x00;PORTB = 0x00;
DDRC = 0x00;PORTC = 0x00;
}
// Display routine :D
void tampilan(void)
{
k=0;
for (i=0; i<=data_len; i++)
{
k++;
lcd_gotoxy(0,1);
for (j=0; j<16; j++){
if (buffer_lcd[j+k] == NULL){
return;
}
lcd_putchar(buffer_lcd[j+k]);
}
delay_ms(10); //ubah untuk kecepatan pergeseran text (samakan sama yang
diatas)
};
}