C Programming Lab 1

C Programming Lab 1 - cptr = start; for(col = 0; col...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include “AT91SAM71.128.h” #include “lcd.h” #define DELAY 50000 #define COLUMNS 12 int main() { char message[] = “CS AND CS ARE FUN ”; char *start, *cptr; int col, i; lcd_init(); *AT91C_WDTC_WDMR = AT91C_WDTC_WDDIS; for(;;) { for (start = message; *start != ‘\0’; start++) {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cptr = start; for(col = 0; col < COLUMNS; col++) { lcd)put_char7(*cptr++, col); if(*cptr == /0) cptr = message; //wrap around } for(i = 0; i < DELAY; i++) {} } } }...
View Full Document

Ask a homework question - tutors are online