void HSerout(unsigned char ch)
{
while(!TXIF); // Wait for module to finish
TXREG = ch; // ready to send
}
while(1) // Loop forever
{
LCD_clr();
HSerout(0x7E);
HSerout(0xFF);
HSerout(0x06);
HSerout(0x03);
HSerout(0x00);
HSerout(0x00);
HSerout(0x01); // play track 1
HSerout(0xFE);
HSerout(0xF7);
HSerout(0xEF);
LCD_goto(1,0); // line 1.
LCD_printC(" Sent cmd 1");
delayMs(10000); // wait for 10 seconds
LCD_clr();
HSerout(0x7E);
HSerout(0xFF);
HSerout(0x06);
HSerout(0x03);
HSerout(0x00);
HSerout(0x00);
HSerout(0x02); // play track 2
HSerout(0xFE);
HSerout(0xF6);
HSerout(0xEF);
LCD_goto(1,0); // line 1.
LCD_printC(" Sent cmd 2");
delayMs(10000); // wait for 10 seconds
LCD_clr();
HSerout(0x7E);
HSerout(0xFF);
HSerout(0x06);
HSerout(0x03);
HSerout(0x00);
HSerout(0x00);
HSerout(0x03); // play track 3
HSerout(0xFE);
HSerout(0xF5);
HSerout(0xEF);
LCD_goto(1,0); // line 1.
LCD_printC(" Sent cmd 3");
delayMs(10000); // wait for 10 seconds
LCD_clr();
HSerout(0x7E);
HSerout(0xFF);
HSerout(0x06);
HSerout(0x01);
HSerout(0x00);
HSerout(0x00);
HSerout(0x00); // play next track
HSerout(0xFE);
HSerout(0xFA);
HSerout(0xEF);
LCD_goto(1,0); // line 1.
LCD_printC(" Sent cmd Next");
delayMs(10000); // wait for 10 seconds
}