SCI problem

Discussion created by FABIO FUMAGALLI on Aug 11, 2010
Latest reply on Aug 11, 2010 by David Payne


I have a problem with the SCI comunication with two MC9S08GT32, my code for 9600 baud N 8 1.  is:

       mov   #$00,SCI1BDH      
       mov   #$80,SCI1BDL      
       mov   #$64,SCI1C1          
       mov   #$0C,SCI1C2       
       mov   #$00,SCI1S2       
       mov   #$20,SCI1C3 


I work with an internal oscillator and the internal bus clock is 19.995429MHz, the CPU clk is 39.99MHz for the two micro.
I look with the scope the output signal and apparently are correct,the micro recive read the data but some times are correct, other times are wrong.I think that my problem is the work frequency, I generate a signal with a nop instruction, in one micro ton=340ns toff=230ns, in the other ton=450ns and toff=300ns, the time are identical with/without the
For this test the pin of two micro are connected with an 100R resistor and the signal are very good.
Can you help me?

thanks   Fabio