main( void) { initEX16(); initLCD(); putsLCD( "Insert card...\n"); while ( !getCD()); Delayms( 100); if ( !mount()) putsLCD("Mount Failed"); else { clrLCD(); putsLCD("Playing..."); if ( !playWAV( "NELLY.WAV")) { clrLCD(); putsLCD("File not found"); } } while( 1) { } // main loop } //main
// // Initialize LCD_A // void initLCD_A(void) { uint8_t i; // Clear LCD memory clrLCD(); // Configure COM0-COM3 and R03-R33 pins P5SEL |= (BIT4 | BIT3 | BIT2); P5DIR |= (BIT4 | BIT3 | BIT2); // Configure LCD_A LCDACTL = LCDFREQ_128 | LCDMX1 | LCDMX0 | LCDSON | LCDON; LCDAPCTL0 = LCDS4 | LCDS8 | LCDS12 | LCDS16 | LCDS20 | LCDS24; LCDAPCTL1 = 0; LCDAVCTL0 = LCDCPEN; LCDAVCTL1 = VLCD_2_60; for( i = 0 ; i < 7 ; i++) { dispChar( i , 0 ); } clrLCD(); }