void init_SCI0 ()
{
SC0BDW=Eclock/16/9600; //9600 buad rate
SC0CR2=0xc; //enable tx,rx
}
void tx_char0(char data)
{
while ((SC0SR1&0x40)!=0x40);
SC0DRL = data;
}
void main()
{
init_SCI0();
tx_char0('H');
tx_char0('E');
tx_char0('L');
tx_char0('L');
tx_char0('O');
for(;;)
{
}
}
|