RS232 Rate

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
DavidJ
Posts: 30
Joined: Fri Mar 21, 2008 11:16 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

RS232 Rate

Post by DavidJ »

HI

Next question

I program to send a RS232 Sring "HELLOW" to the serial port @ 9600 Baud . Target clock 8Mhz ATMEL 16

Then load I to my Target system also running at 8 Mhz and ATMEL 16 and view using hyp erterminal set at 9600 Baud
Get char similar to "C" being displayed not Hello

However if I change the hyperterminal baud rate to 1200 Baud get correct display of Hello
Is the switching to detect the requested baud rate and passing this to the assembler working correctly in Flowcode

Regards
David

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: RS232 Rate

Post by Sean »

Hello David,

I have tested an ATMEGA16 using an 8MHz external xtal, and the 9600 Baud rate was reproduced correctly.

Have the configuration fuses been set to operate with the required clock input?

The manufacturer's default setting for the chip is to use the 1MHz internal RC clock. This might explain the uart Baud rate being 1/8th of the expected value.

Here is a link to our forum topic on AVR fuse programming:

http://www.matrixmultimedia.com/mmforum ... hilit=fuse

Are you using an external xtal, or the internal 8MHz RC oscillator?

A simple LED flashing program, using the Flowcode Delay function for timing, is usually a good way to check if a device is running at the correct frequency.

DavidJ
Posts: 30
Joined: Fri Mar 21, 2008 11:16 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: RS232 Rate

Post by DavidJ »

Thanks for the hint re the fuse bits on the Mega

Changed these and now works fine

Thanks for your prompt reply really good service

Regards
David

Post Reply