Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <avr/io.h>
- #include "io.c"
- #include <stdio.h>
- #include <string.h>
- #include <timer.h>
- int main(void)
- {
- DDRD = 0xFF; PORTD = 0x00; // LCD data lines
- DDRA = 0xFF; PORTA = 0x00; // LCD control lines
- // Initializes the LCD display
- LCD_init();
- unsigned char msg[]= "CS120B is Legend... wait for it DARY!";
- unsigned char* string = msg;
- // Starting at position 1 on the LCD screen, writes Hello World
- LCD_DisplayString(1, string);
- TimerSet(1000);
- TimerOn();
- while(1) {
- for(unsigned char i = 0; i < 6; i++){
- string = msg + i;
- LCD_DisplayString(1, string);
- while (!TimerFlag); // Wait 1 sec
- TimerFlag = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement