void delay_ms(uchar n)
{
uint i,j;
for(i=1000;i>0;i--) {
for(j=25*n;j>0;j--) {;}
}
}
//-----------------------------------------------------------------------------
// SysInit // “Initialization of system”
//-----------------------------------------------------------------------------
void SysInit(void)
{
PCON |=0x80;
SCON=0x50;
TMOD=0x21;
TH1=255;
TL1=255;
TR1=1;
ES=0;
TH0=0xDC;
TL0=0x00;
TR0=1;
ET0=1;
}
//-----------------------------------------------------------------------------
// pic_str // “Picture switching sub-function”
//-----------------------------------------------------------------------------
void pic_str(uchar i)
{
pic[2]=i;
send_str(pic,3); // “Send the command of picture switching”
en();
}
//-----------------------------------------------------------------------------
// main() Routine
//-----------------------------------------------------------------------------
void main (void) // “main function”
{
EA=0; // “Close Interruption”
SysInit();
EA=1; // “Open Interruption”
delay_ms(40);
while (1)
{
pic_str(); // “Picture switching”
}
Return 0;
}
//-----------------------------------------------------------------------------
// End Of File
//-----------------------------------------------------------------------------
STVI101WT-01 Equipment Manual
-30-
Release 04/16