Baudrate in MicroCore11

General problems? Ask here!

Moderator: cbarnes

Baudrate in MicroCore11

Postby jord23an » Sun Dec 05, 2004 9:31 am

I am a student on a project regarding robotics and have met the
following problem which requires your kind assistance.

The wireless transmitter and receiver i am using operates at 2400
bauds. It is required of me to interface the receiver to the
MicroCore 11 board. However, strange behaviour is observed on my
robot when its baudrate is reduced to 2400 bauds from its normal
38400 bauds. Are there also other issues I should have considered?

This the following command correct using ICC11?
"setbaud(BAUDT2400);" or should it be setbaud(BAUD2400);

Thank you so much for your kind assistance.

Kenny
jord23an
Newbie
Newbie
 
Posts: 2
Joined: Sun Dec 05, 2004 9:20 am

Postby erarama » Mon Dec 06, 2004 10:15 am

Under ICC11 - Help-Help Topics-Find Tab

Type <Baud> to locate this topic. I copied the help text to point out what to do next.

main()
{
setbaud(BAUD9600);
printf("Hello World\n");
while (1)
;
}

As you can see, this is a very simple program. It sets the baudrate to 9600, using a constant defined in the hc11.h or hc12.h file. This constant is valid only if your system uses a 8 Mhz crystal for the HC11 or 16MHz crystal for the HC12 so you may need to modify it. Then it uses the standard C function to print out "Hello World," and goes into an infinite loop.
erarama
Master
Master
 
Posts: 541
Joined: Sun Apr 04, 2004 10:59 am
Location: Canada

Communication at 2400 bauds is working but.........

Postby jord23an » Tue Dec 07, 2004 1:59 am

Thank you for your reply

I had already used "setbaud(BAUDT2400)" for turbo MicroCore11 but the behaviour of my robot is still unpredictable despite communication to and from my computer and robot is workable at 2400 bauds. I suspect that the others sensors on my robot are not read correctly at other baudrates other than at 38400 bauds. Has this got to do with the timing?

Where can I get more information on the MicroCore11 timing requirement?

Thank you for you time
jord23an
Newbie
Newbie
 
Posts: 2
Joined: Sun Dec 05, 2004 9:20 am

Postby erarama » Tue Dec 07, 2004 8:56 am

The MCU timing can be found at these links. The Microcore11 timing is the MCU timing specs.

http://www.freescale.com/webapp/sps/sit ... 4684498635
http://www.freescale.com/webapp/sps/sit ... 4684498635

Anyway, I think the problem might be your SCI Receive and maybe the transmit routine. Your code is stuck there looking for a character and it does not process anything else until it gets or transmit a character.

Change from polling the SCI to interrupt.
erarama
Master
Master
 
Posts: 541
Joined: Sun Apr 04, 2004 10:59 am
Location: Canada


Return to General Problems

Who is online

Users browsing this forum: No registered users and 1 guest

cron