Optimal Asynch Serial Port Bean Settings.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Optimal Asynch Serial Port Bean Settings.

Jump to solution
1,104 Views
Emac
Contributor III

Hello all,

 

I was looking for some advice on the serial port bean setting.  I am experiencing character drops from the serial port.

 

I tested using hyperterminal and (bean selected rates) set to 9600 baud (even lower baud rates don't seem to help).

 

I have code that takes input chars and echos them out.

 

I send a  text file out, and what I get back is mostly what I sent except a few characters might be missing here and there.

 

even when I simply type into the hyperterminal window I get predictable missing characters (not every time but a larger percentage of the time) when I type lower case p's and x's (0x70 and 0x80 or b01110000 and b01111000) which leads me to believe I have a timing / interrupt issue.

 

The cable length is short and keyboard is good.

 

I am using the freescale demo9s08Gb60-sp board which uses only external 32Khz or internal oscilators, neither of which is fast.

 

I also tried to alleviate any processor issues by using buffers, but I don't think that was it.

 

My question is:

Should I look at code,

Should I look to override the clock with a faster xtal oscillator,

Or is there something I am missing in the setup for the bean / serial port set up.

 

Thanks

Labels (1)
Tags (1)
0 Kudos
1 Solution
491 Views
Emac
Contributor III

Solution was to use an external 4Mhz clock.  Kef was right, it looks like it was using the internal clock as the time base, but it was too Jittery using the internal PLL.  Once I tied my horses to the external clock, the problem went away.

View solution in original post

0 Kudos
2 Replies
491 Views
kef
Specialist I

Sounds like baudrate mismatch. For reliable communications baud rate error should be well below 1%.

I think processor expert shows not only desired baudrate (what you entered), but also what the best PE can offer you at given bus clock frequency. If actual calculated baudrate is OK, then maybe you are using different clock or maybe it's internal RC clock, which is not properly trimmed. If it's trimmed, then maybe you forgot to copy trim-value from flash to trim register.

 

It's not possible to get 9600bps from 32kHz oscilator. You must be using FLL or PLL to generate faster clock.

0 Kudos
492 Views
Emac
Contributor III

Solution was to use an external 4Mhz clock.  Kef was right, it looks like it was using the internal clock as the time base, but it was too Jittery using the internal PLL.  Once I tied my horses to the external clock, the problem went away.

0 Kudos