several question in sport0,please!

Started by zhangzs0422 October 26, 2004

the first:in the hardware manual----Writing to a SPORTs SPx_TX
register readies the SPORT for transmission.After the first bit of a
word has been transferred, the SPORT generates the transmit
interrupt.---is that mean if i want to send a data,the only thing i
will do is put the data to SPx_TX? and then a interrupt will occure
and i can send another data?? or i enable the sport and then send
the data?

the second: the tclk in the sport can be internal or external,i use
the later.but i found that the tclk is unstable if the code is
running,in addtion to stable with just power on!what is the reason?
the sport is set like this:
ar = 0x85e1;
io(SP0_TCR) = ar;
ar = 0x0027;
io(SP0_TSCKDIV) = ar;
Sport0 TX Interrupt Service Routine like this:
ay1 = iopg;
iopg = SPORT0_Controller_Page;
ar = 0xff;
io(SP0_TX) = ar;
ar = 0x0f;
io(SP0_TX) = ar;
ar = 0x00;
io(SP0_TX) = ar;
iopg = ay1;
thank you much for your help!