Sign in

username or email:

password:



Not a member?
Forgot your Password?

Search 68hc12



Search tips

Subscribe to 68hc12



Discussion Groups

See Also

DSPFPGA

Discussion Groups | 68HC12 | Another Spec Question

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).


So far in May, you have voted 0 times ou of a total of 20 votes by the community.
Please help us clean the archives from unuseful discussion threads by using the voting system! Details here.


Is this thread worth a thumbs up?

0

Another Spec Question - "Fry, Gordon" - Mar 24 17:06:28 2010

Hi again,

I have another question to ask of you: How would I determine the values for the serial communications pre-scalar at 7200 baud? Thanks for the help.




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - justin lucas - Mar 24 17:43:05 2010


You should be able to locate this information in the data sheet. Do you have the data sheet for your processor?

Justin

"In theory, there is no difference between theory and practice. But, in practice, there is. "
--Yogi Berra/Jan L.A. van de Snepscheut--

To: 6...
From: g...@ku.edu
Date: Wed, 24 Mar 2010 16:04:53 -0500
Subject: [68HC12] Another Spec Question

Hi again,

I have another question to ask of you: How would I determine the values for the serial communications pre-scalar at 7200 baud? Thanks for the help.

_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1







(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - "Fry, Gordon" - Mar 24 20:19:08 2010

No I do not, where would I find this?

________________________________

From: 6... on behalf of justin lucas
Sent: Wed 3/24/2010 4:31 PM
To: 6...
Subject: RE: [68HC12] Another Spec Question

You should be able to locate this information in the data sheet. Do you have the data sheet for your processor?
Justin

"In theory, there is no difference between theory and practice. But, in practice, there is. "
--Yogi Berra/Jan L.A. van de Snepscheut--

To: 6...
From: g...@ku.edu
Date: Wed, 24 Mar 2010 16:04:53 -0500
Subject: [68HC12] Another Spec Question

Hi again,

I have another question to ask of you: How would I determine the values for the serial communications pre-scalar at 7200 baud? Thanks for the help.

_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1







(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - justin lucas - Mar 24 20:41:24 2010


You can find a data sheet at freescale.com

Since you have a dragon board, check http://www.evbplus.com/, too.

I have used the mini-dragon board from evbplus and found the datasheets provided at the site are pretty good.

Good luck.

Thanks.

Justin

"In theory, there is no difference between theory and practice. But, in practice, there is. "
--Yogi Berra/Jan L.A. van de Snepscheut--

To: 6...
From: g...@ku.edu
Date: Wed, 24 Mar 2010 19:17:49 -0500
Subject: RE: [68HC12] Another Spec Question

No I do not, where would I find this?

________________________________

From: 6... on behalf of justin lucas
Sent: Wed 3/24/2010 4:31 PM
To: 6...
Subject: RE: [68HC12] Another Spec Question

You should be able to locate this information in the data sheet. Do you have the data sheet for your processor?

Justin

"In theory, there is no difference between theory and practice. But, in practice, there is. "
--Yogi Berra/Jan L.A. van de Snepscheut--

To: 6...
From: g...@ku.edu
Date: Wed, 24 Mar 2010 16:04:53 -0500
Subject: [68HC12] Another Spec Question

Hi again,

I have another question to ask of you: How would I determine the values for the serial communications pre-scalar at 7200 baud? Thanks for the help.

__________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1







(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - "Fry, Gordon" - Mar 25 0:07:30 2010

Since I am kind of new to all of this terminology, do you know what section it could be under? I am looking at this 450pg.++ user's guide to the microprocessor and I have no idea where to start... haha. Thanks for the help!

________________________________

From: 6... on behalf of justin lucas
Sent: Wed 3/24/2010 7:39 PM
To: 6...
Subject: RE: [68HC12] Another Spec Question

You can find a data sheet at freescale.com

Since you have a dragon board, check http://www.evbplus.com/, too.

I have used the mini-dragon board from evbplus and found the datasheets provided at the site are pretty good.

Good luck.

Thanks.

Justin

"In theory, there is no difference between theory and practice. But, in practice, there is. "
--Yogi Berra/Jan L.A. van de Snepscheut--

To: 6...
From: g...@ku.edu
Date: Wed, 24 Mar 2010 19:17:49 -0500
Subject: RE: [68HC12] Another Spec Question

No I do not, where would I find this?

________________________________

From: 6... on behalf of justin lucas
Sent: Wed 3/24/2010 4:31 PM
To: 6...
Subject: RE: [68HC12] Another Spec Question

You should be able to locate this information in the data sheet. Do you have the data sheet for your processor?

Justin

"In theory, there is no difference between theory and practice. But, in practice, there is. "
--Yogi Berra/Jan L.A. van de Snepscheut--

To: 6...
From: g...@ku.edu
Date: Wed, 24 Mar 2010 16:04:53 -0500
Subject: [68HC12] Another Spec Question

Hi again,

I have another question to ask of you: How would I determine the values for the serial communications pre-scalar at 7200 baud? Thanks for the help.

__________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1







(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - Edward Karpicz - Mar 25 0:35:42 2010

From the beginning up to the end would be the best. Plus not less important
reading, CPU reference manual. If you are not going to use these MCUs
seriously, then look at Serial Communication Interface (SCI) chapter. BTW
what MCU you are using?

Edward

----- Original Message -----
From: "Fry, Gordon"
To: <6...>
Sent: Thursday, March 25, 2010 6:05 AM
Subject: RE: [68HC12] Another Spec Question
> Since I am kind of new to all of this terminology, do you know what
> section it could be under? I am looking at this 450pg.++ user's guide to
> the microprocessor and I have no idea where to start... haha. Thanks for
> the help!
>
> ________________________________
>
> From: 6... on behalf of justin lucas
> Sent: Wed 3/24/2010 7:39 PM
> To: 6...
> Subject: RE: [68HC12] Another Spec Question
> You can find a data sheet at freescale.com
>
> Since you have a dragon board, check http://www.evbplus.com/, too.
>
> I have used the mini-dragon board from evbplus and found the datasheets
> provided at the site are pretty good.
>
> Good luck.
>
> Thanks.
>
> Justin
>
> "In theory, there is no difference between theory and practice. But, in
> practice, there is. "
> --Yogi Berra/Jan L.A. van de Snepscheut--
>
> To: 6...
> From: g...@ku.edu
> Date: Wed, 24 Mar 2010 19:17:49 -0500
> Subject: RE: [68HC12] Another Spec Question
>
> No I do not, where would I find this?
>
> ________________________________
>
> From: 6... on behalf of justin lucas
> Sent: Wed 3/24/2010 4:31 PM
> To: 6...
> Subject: RE: [68HC12] Another Spec Question
>
> You should be able to locate this information in the data sheet. Do you
> have the data sheet for your processor?
>
> Justin
>
> "In theory, there is no difference between theory and practice. But, in
> practice, there is. "
> --Yogi Berra/Jan L.A. van de Snepscheut--
>
> To: 6...
> From: g...@ku.edu
> Date: Wed, 24 Mar 2010 16:04:53 -0500
> Subject: [68HC12] Another Spec Question
>
> Hi again,
>
> I have another question to ask of you: How would I determine the values
> for the serial communications pre-scalar at 7200 baud? Thanks for the
> help.
>
> __________________________________________________________
> Hotmail has tools for the New Busy. Search, chat and e-mail from your
> inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1
>
>
>
>



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - "Fry, Gordon" - Mar 25 0:39:42 2010

Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!

________________________________

From: 6... on behalf of Edward Karpicz
Sent: Wed 3/24/2010 11:35 PM
To: 6...
Subject: Re: [68HC12] Another Spec Question

From the beginning up to the end would be the best. Plus not less important
reading, CPU reference manual. If you are not going to use these MCUs
seriously, then look at Serial Communication Interface (SCI) chapter. BTW
what MCU you are using?

Edward

----- Original Message -----
From: "Fry, Gordon" >
To: <6... >
Sent: Thursday, March 25, 2010 6:05 AM
Subject: RE: [68HC12] Another Spec Question

> Since I am kind of new to all of this terminology, do you know what
> section it could be under? I am looking at this 450pg.++ user's guide to
> the microprocessor and I have no idea where to start... haha. Thanks for
> the help!
>
> ________________________________
>
> From: 6... on behalf of justin lucas
> Sent: Wed 3/24/2010 7:39 PM
> To: 6...
> Subject: RE: [68HC12] Another Spec Question
> You can find a data sheet at freescale.com
>
> Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
>
> I have used the mini-dragon board from evbplus and found the datasheets
> provided at the site are pretty good.
>
> Good luck.
>
> Thanks.
>
> Justin
>
> "In theory, there is no difference between theory and practice. But, in
> practice, there is. "
> --Yogi Berra/Jan L.A. van de Snepscheut--
>
> To: 6...
> From: g...@ku.edu
> Date: Wed, 24 Mar 2010 19:17:49 -0500
> Subject: RE: [68HC12] Another Spec Question
>
> No I do not, where would I find this?
>
> ________________________________
>
> From: 6... on behalf of justin lucas
> Sent: Wed 3/24/2010 4:31 PM
> To: 6...
> Subject: RE: [68HC12] Another Spec Question
>
> You should be able to locate this information in the data sheet. Do you
> have the data sheet for your processor?
>
> Justin
>
> "In theory, there is no difference between theory and practice. But, in
> practice, there is. "
> --Yogi Berra/Jan L.A. van de Snepscheut--
>
> To: 6...
> From: g...@ku.edu
> Date: Wed, 24 Mar 2010 16:04:53 -0500
> Subject: [68HC12] Another Spec Question
>
> Hi again,
>
> I have another question to ask of you: How would I determine the values
> for the serial communications pre-scalar at 7200 baud? Thanks for the
> help.
>
> __________________________________________________________
> Hotmail has tools for the New Busy. Search, chat and e-mail from your
> inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
>
>



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - Andrei Chichak - Mar 25 0:52:13 2010

Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.

So with that in mind, Edward asks "what MCU you are using?"

A

On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:

> Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
>
> ________________________________
>
> From: 6... on behalf of Edward Karpicz
> Sent: Wed 3/24/2010 11:35 PM
> To: 6...
> Subject: Re: [68HC12] Another Spec Question
>
> From the beginning up to the end would be the best. Plus not less important
> reading, CPU reference manual. If you are not going to use these MCUs
> seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> what MCU you are using?
>
> Edward
>
> ----- Original Message -----
> From: "Fry, Gordon" >
> To: <6... >
> Sent: Thursday, March 25, 2010 6:05 AM
> Subject: RE: [68HC12] Another Spec Question
>
> > Since I am kind of new to all of this terminology, do you know what
> > section it could be under? I am looking at this 450pg.++ user's guide to
> > the microprocessor and I have no idea where to start... haha. Thanks for
> > the help!
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 7:39 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> > You can find a data sheet at freescale.com
> >
> >
> >
> > Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
> >
> >
> >
> > I have used the mini-dragon board from evbplus and found the datasheets
> > provided at the site are pretty good.
> >
> >
> >
> > Good luck.
> >
> > Thanks.
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> >
> >
> >
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> >
> > No I do not, where would I find this?
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 4:31 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> > You should be able to locate this information in the data sheet. Do you
> > have the data sheet for your processor?
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > Subject: [68HC12] Another Spec Question
> >
> > Hi again,
> >
> > I have another question to ask of you: How would I determine the values
> > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > help.
> >
> > __________________________________________________________
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> >
> >
> >
> >
> >
> >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - "Fry, Gordon" - Mar 25 20:14:30 2010

Sorry about that, I just realized that what I had responded with didn't make any sense! Of course it is a 68HC12 board - I am in that Yahoo group. Anyhow, the microcontroller is MC9S12DG256.

Ok, so in one of the previous posts to this thread, I was informed to check out the datasheets. I did find on page 14 of the serial communications data sheet that the board operates at 16 bits/baud. However, I still didn't find what the pre-scalar value is at 7200 baud. Maybe it's just me, but I cannot find it for the life of me.

Also, what is meant by the "baud rate divisor?" Would this be my 7200 baud value from above in a different wording?! Thank you for all help to this thread! I greatly appreciate it!

________________________________

From: 6... on behalf of Andrei Chichak
Sent: Wed 3/24/2010 11:51 PM
To: 6...
Subject: Re: [68HC12] Another Spec Question

Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.

So with that in mind, Edward asks "what MCU you are using?"

A

On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:

> Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
>
> ________________________________
>
> From: 6... on behalf of Edward Karpicz
> Sent: Wed 3/24/2010 11:35 PM
> To: 6...
> Subject: Re: [68HC12] Another Spec Question
>
> From the beginning up to the end would be the best. Plus not less important
> reading, CPU reference manual. If you are not going to use these MCUs
> seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> what MCU you are using?
>
> Edward
>
> ----- Original Message -----
> From: "Fry, Gordon" >
> To: <6... >
> Sent: Thursday, March 25, 2010 6:05 AM
> Subject: RE: [68HC12] Another Spec Question
>
> > Since I am kind of new to all of this terminology, do you know what
> > section it could be under? I am looking at this 450pg.++ user's guide to
> > the microprocessor and I have no idea where to start... haha. Thanks for
> > the help!
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 7:39 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> > You can find a data sheet at freescale.com
> >
> >
> >
> > Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
> >
> >
> >
> > I have used the mini-dragon board from evbplus and found the datasheets
> > provided at the site are pretty good.
> >
> >
> >
> > Good luck.
> >
> > Thanks.
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> >
> >
> >
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> >
> > No I do not, where would I find this?
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 4:31 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> > You should be able to locate this information in the data sheet. Do you
> > have the data sheet for your processor?
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > Subject: [68HC12] Another Spec Question
> >
> > Hi again,
> >
> > I have another question to ask of you: How would I determine the values
> > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > help.
> >
> > __________________________________________________________
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> >
> >
> >
> >
> >
> >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - justin lucas - Mar 25 21:56:09 2010


The data sheet for your processor has the information you are looking for...I have the data sheet for this processor and its poorly organized. It has the basic datasheet, plus an additional zip file with all of the sections.

First do you have all of the sections for the basic datasheet?



Second, I have used this MCU for several projects and the default baud rate is usually 9600. Since you mentioned you were just learning about it, you are probably using some version of a boot loader program. Usually the BLP sets the baud rate and you don't have to worry about unless you have to configure the MCU to run off EEPROM from power up, then you have to set the PLL and BAUD for the SCI interface.



I don't recall ever having to set a prescalar value for the 9S12, only the HC11.

You should be able to set your baud to whatever rate you want using the formula



SCI baud rate = SCI module clock / (16 * SCIBR[12:0])





I think the module clock for the 9S12 is 25 MHz.

and the divisor is the 16*(bits value in binary for the target baud rate)

example,



9600= 25e6/(16*163)



You will need to confirm you module clock. Its been awhile, but I think it is set by your boot loader program.

If you set it for EEPROM , then you will have to set the PLL.


Are you using the Minidragon2 board from Wytec?

To: 6...
From: g...@ku.edu
Date: Thu, 25 Mar 2010 19:14:24 -0500
Subject: RE: [68HC12] Another Spec Question



Sorry about that, I just realized that what I had responded with didn't make any sense! Of course it is a 68HC12 board - I am in that Yahoo group. Anyhow, the microcontroller is MC9S12DG256.

Ok, so in one of the previous posts to this thread, I was informed to check out the datasheets. I did find on page 14 of the serial communications data sheet that the board operates at 16 bits/baud. However, I still didn't find what the pre-scalar value is at 7200 baud. Maybe it's just me, but I cannot find it for the life of me.

Also, what is meant by the "baud rate divisor?" Would this be my 7200 baud value from above in a different wording?! Thank you for all help to this thread! I greatly appreciate it!

________________________________

From: 6... on behalf of Andrei Chichak
Sent: Wed 3/24/2010 11:51 PM
To: 6...
Subject: Re: [68HC12] Another Spec Question

Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.

So with that in mind, Edward asks "what MCU you are using?"

A

On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:

> Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
>
> ________________________________
>
> From: 6... on behalf of Edward Karpicz
> Sent: Wed 3/24/2010 11:35 PM
> To: 6...
> Subject: Re: [68HC12] Another Spec Question
>
> From the beginning up to the end would be the best. Plus not less importa
nt
> reading, CPU reference manual. If you are not going to use these MCUs
> seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> what MCU you are using?
>
> Edward
>
> ----- Original Message -----
> From: "Fry, Gordon" >
> To: <6... >
> Sent: Thursday, March 25, 2010 6:05 AM
> Subject: RE: [68HC12] Another Spec Question
>
> > Since I am kind of new to all of this terminology, do you know what
> > section it could be under? I am looking at this 450pg.++ user's guide t
o
> > the microprocessor and I have no idea where to start... haha. Thanks for
> > the help!
> >
> > ________________________________
> >
> > From: 6... on behal
f of justin lucas
> > Sent: Wed 3/24/2010 7:39 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> > You can find a data sheet at freescale.com
> >
> >
> >
> > Since you have a dragon board, check http://www.evbplus.com/, ww.evbplus.com/,> too.
> >
> >
> >
> > I have used the mini-dragon board from evbplus and found the datasheets
> > provided at the site are pretty good.
> >
> >
> >
> > Good luck.
> >
> > Thanks.
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> >
> >
> >
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> >
> > No I do not, where would I find this?
> >
> > ________________________________
> >
> > From: 6... on behal
f of justin lucas
> > Sent: Wed 3/24/2010 4:31 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> > You should be able to locate this information in the data sheet. Do you
> > have the data sheet for your processor?
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > Subject: [68HC12] Another Spec Question
> >
> > Hi again,
> >
> > I have another question to ask of you: How would I determine the values
> > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > help.
> >
> > __________________________________________________________
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTA
GL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> >
> >
> >
> >
> >
> >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - "Fry, Gordon" - Mar 25 22:03:37 2010

Well, I'm working through some problems for homework while trying to learn the board. The problem question for me is:

"For the MC9S12DG256, determine the values for the serial pre-scalar and baud rate divisor for 115,200 bps."

So, just by calculating the baud from the units --> 115,200 [bps] = x [baud] * 16 bits/baud (found on the Serial Communications datasheet). Ergo, x = 7200 [baud]. So is this: SCIBR[12:0] my baud rate divisor?! I'm confused by what my homework question is asking...

Thanks again Justin, you're a lifesaver!

________________________________

From: 6... on behalf of justin lucas
Sent: Thu 3/25/2010 8:55 PM
To: 6...
Subject: RE: [68HC12] Another Spec Question

The data sheet for your processor has the information you are looking for...I have the data sheet for this processor and its poorly organized. It has the basic datasheet, plus an additional zip file with all of the sections.

First do you have all of the sections for the basic datasheet?

Second, I have used this MCU for several projects and the default baud rate is usually 9600. Since you mentioned you were just learning about it, you are probably using some version of a boot loader program. Usually the BLP sets the baud rate and you don't have to worry about unless you have to configure the MCU to run off EEPROM from power up, then you have to set the PLL and BAUD for the SCI interface.

I don't recall ever having to set a prescalar value for the 9S12, only the HC11.

You should be able to set your baud to whatever rate you want using the formula

SCI baud rate = SCI module clock / (16 * SCIBR[12:0])

I think the module clock for the 9S12 is 25 MHz.

and the divisor is the 16*(bits value in binary for the target baud rate)

example,

9600= 25e6/(16*163)

You will need to confirm you module clock. Its been awhile, but I think it is set by your boot loader program.

If you set it for EEPROM , then you will have to set the PLL.

Are you using the Minidragon2 board from Wytec?

To: 6...
From: g...@ku.edu
Date: Thu, 25 Mar 2010 19:14:24 -0500
Subject: RE: [68HC12] Another Spec Question

Sorry about that, I just realized that what I had responded with didn't make any sense! Of course it is a 68HC12 board - I am in that Yahoo group. Anyhow, the microcontroller is MC9S12DG256.

Ok, so in one of the previous posts to this thread, I was informed to check out the datasheets. I did find on page 14 of the serial communications data sheet that the board operates at 16 bits/baud. However, I still didn't find what the pre-scalar value is at 7200 baud. Maybe it's just me, but I cannot find it for the life of me.

Also, what is meant by the "baud rate divisor?" Would this be my 7200 baud value from above in a different wording?! Thank you for all help to this thread! I greatly appreciate it!

________________________________

From: 6... on behalf of Andrei Chichak
Sent: Wed 3/24/2010 11:51 PM
To: 6...
Subject: Re: [68HC12] Another Spec Question

Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.

So with that in mind, Edward asks "what MCU you are using?"

A

On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:

> Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
>
> ________________________________
>
> From: 6... on behalf of Edward Karpicz
> Sent: Wed 3/24/2010 11:35 PM
> To: 6...
> Subject: Re: [68HC12] Another Spec Question
>
> From the beginning up to the end would be the best. Plus not less important
> reading, CPU reference manual. If you are not going to use these MCUs
> seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> what MCU you are using?
>
> Edward
>
> ----- Original Message -----
> From: "Fry, Gordon" >
> To: <6... >
> Sent: Thursday, March 25, 2010 6:05 AM
> Subject: RE: [68HC12] Another Spec Question
>
> > Since I am kind of new to all of this terminology, do you know what
> > section it could be under? I am looking at this 450pg.++ user's guide to
> > the microprocessor and I have no idea where to start... haha. Thanks for
> > the help!
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 7:39 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> > You can find a data sheet at freescale.com
> >
> >
> >
> > Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
> >
> >
> >
> > I have used the mini-dragon board from evbplus and found the datasheets
> > provided at the site are pretty good.
> >
> >
> >
> > Good luck.
> >
> > Thanks.
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> >
> >
> >
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> >
> > No I do not, where would I find this?
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 4:31 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> > You should be able to locate this information in the data sheet. Do you
> > have the data sheet for your processor?
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > Subject: [68HC12] Another Spec Question
> >
> > Hi again,
> >
> > I have another question to ask of you: How would I determine the values
> > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > help.
> >
> > __________________________________________________________
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> >
> >
> >
> >
> >
> >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - Andrei Chichak - Mar 25 22:24:22 2010

Gordon,

Baud is another name for bits per second, or bps. 9600 baud means 9600 bits per second. You might think that there are 8 bits in a byte, well noooooo, there are 10 since you have to add a start bit and a stop bit. Therefore 9600 baud will be equivalent to 960 characters per second. (mumble mumble 110 baud has 2 stop bits mumble mumble teletype mumble mumble commutator mumble 10 keystrokes per second)

Next, you need to figure out what clock rate your processor is running at. Like a PC running at 2.8GHz or 2800000000Hz. your processor will be running internally at some speed like 16000000Hz. This is derived from the crystal that you are using and multiplied up and divided down by the PLL (phase locked loop). So, in the case of other Motorola processors, you could have a 32768Hz crystal that is multiplied by 512 to give you 16MiHz.

Next, you have to look through your databooks to find out how the SCI module clock relates to the system clock. It might be 1:1, it could be /2 or /16, or programmable. It depends. This will give you your SCI module clock SPEED.

Last, solve the equation 115200 = SCI_SPEED / (16 * x) for x.

The calculation is easy, getting all of the information needed to do the calculation is hard. But to achieve the aim you must grok the processor fully.

A
On 2010-March-25, at 7:59 PM, Fry, Gordon wrote:

> Well, I'm working through some problems for homework while trying to learn the board. The problem question for me is:
>
> "For the MC9S12DG256, determine the values for the serial pre-scalar and baud rate divisor for 115,200 bps."
>
> So, just by calculating the baud from the units --> 115,200 [bps] = x [baud] * 16 bits/baud (found on the Serial Communications datasheet). Ergo, x = 7200 [baud]. So is this: SCIBR[12:0] my baud rate divisor?! I'm confused by what my homework question is asking...
>
> Thanks again Justin, you're a lifesaver!
>
> ________________________________
>
> From: 6... on behalf of justin lucas
> Sent: Thu 3/25/2010 8:55 PM
> To: 6...
> Subject: RE: [68HC12] Another Spec Question
>
> The data sheet for your processor has the information you are looking for...I have the data sheet for this processor and its poorly organized. It has the basic datasheet, plus an additional zip file with all of the sections.
>
> First do you have all of the sections for the basic datasheet?
>
> Second, I have used this MCU for several projects and the default baud rate is usually 9600. Since you mentioned you were just learning about it, you are probably using some version of a boot loader program. Usually the BLP sets the baud rate and you don't have to worry about unless you have to configure the MCU to run off EEPROM from power up, then you have to set the PLL and BAUD for the SCI interface.
>
> I don't recall ever having to set a prescalar value for the 9S12, only the HC11.
>
> You should be able to set your baud to whatever rate you want using the formula
>
> SCI baud rate = SCI module clock / (16 * SCIBR[12:0])
>
> I think the module clock for the 9S12 is 25 MHz.
>
> and the divisor is the 16*(bits value in binary for the target baud rate)
>
> example,
>
> 9600= 25e6/(16*163)
>
> You will need to confirm you module clock. Its been awhile, but I think it is set by your boot loader program.
>
> If you set it for EEPROM , then you will have to set the PLL.
>
> Are you using the Minidragon2 board from Wytec?
>
> To: 6...
> From: g...@ku.edu
> Date: Thu, 25 Mar 2010 19:14:24 -0500
> Subject: RE: [68HC12] Another Spec Question
>
> Sorry about that, I just realized that what I had responded with didn't make any sense! Of course it is a 68HC12 board - I am in that Yahoo group. Anyhow, the microcontroller is MC9S12DG256.
>
> Ok, so in one of the previous posts to this thread, I was informed to check out the datasheets. I did find on page 14 of the serial communications data sheet that the board operates at 16 bits/baud. However, I still didn't find what the pre-scalar value is at 7200 baud. Maybe it's just me, but I cannot find it for the life of me.
>
> Also, what is meant by the "baud rate divisor?" Would this be my 7200 baud value from above in a different wording?! Thank you for all help to this thread! I greatly appreciate it!
>
> ________________________________
>
> From: 6... on behalf of Andrei Chichak
> Sent: Wed 3/24/2010 11:51 PM
> To: 6...
> Subject: Re: [68HC12] Another Spec Question
>
> Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.
>
> So with that in mind, Edward asks "what MCU you are using?"
>
> A
>
> On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:
>
> > Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
> >
> > ________________________________
> >
> > From: 6... on behalf of Edward Karpicz
> > Sent: Wed 3/24/2010 11:35 PM
> > To: 6...
> > Subject: Re: [68HC12] Another Spec Question
> >
> > From the beginning up to the end would be the best. Plus not less important
> > reading, CPU reference manual. If you are not going to use these MCUs
> > seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> > what MCU you are using?
> >
> > Edward
> >
> > ----- Original Message -----
> > From: "Fry, Gordon" >
> > To: <6... >
> > Sent: Thursday, March 25, 2010 6:05 AM
> > Subject: RE: [68HC12] Another Spec Question
> >
> > > Since I am kind of new to all of this terminology, do you know what
> > > section it could be under? I am looking at this 450pg.++ user's guide to
> > > the microprocessor and I have no idea where to start... haha. Thanks for
> > > the help!
> > >
> > > ________________________________
> > >
> > > From: 6... on behalf of justin lucas
> > > Sent: Wed 3/24/2010 7:39 PM
> > > To: 6...
> > > Subject: RE: [68HC12] Another Spec Question
> > >
> > >
> > >
> > >
> > > You can find a data sheet at freescale.com
> > >
> > >
> > >
> > > Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
> > >
> > >
> > >
> > > I have used the mini-dragon board from evbplus and found the datasheets
> > > provided at the site are pretty good.
> > >
> > >
> > >
> > > Good luck.
> > >
> > > Thanks.
> > >
> > > Justin
> > >
> > > "In theory, there is no difference between theory and practice. But, in
> > > practice, there is. "
> > > --Yogi Berra/Jan L.A. van de Snepscheut--
> > >
> > >
> > >
> > >
> > >
> > > To: 6...
> > > From: g...@ku.edu
> > > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > > Subject: RE: [68HC12] Another Spec Question
> > >
> > >
> > >
> > >
> > >
> > > No I do not, where would I find this?
> > >
> > > ________________________________
> > >
> > > From: 6... on behalf of justin lucas
> > > Sent: Wed 3/24/2010 4:31 PM
> > > To: 6...
> > > Subject: RE: [68HC12] Another Spec Question
> > >
> > > You should be able to locate this information in the data sheet. Do you
> > > have the data sheet for your processor?
> > >
> > > Justin
> > >
> > > "In theory, there is no difference between theory and practice. But, in
> > > practice, there is. "
> > > --Yogi Berra/Jan L.A. van de Snepscheut--
> > >
> > > To: 6...
> > > From: g...@ku.edu
> > > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > > Subject: [68HC12] Another Spec Question
> > >
> > > Hi again,
> > >
> > > I have another question to ask of you: How would I determine the values
> > > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > > help.
> > >
> > > __________________________________________________________
> > > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > > inbox.
> > > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> > >
> > >
> > >
> > >
> > >
> > >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - justin lucas - Mar 25 22:36:09 2010


That makes two of us...I checked my 9S12 book and there isn't a pre-scalar defined...my HC11 book has it.

I would assume that
(16 * SCIBR[12:0]) is the pre-scalar and baud rate divisor.

Sorry I can't be of more help. Sounds like the homework is hypothetical...to get that baud rate the BR[12:0] bits would have to equal a value less than 1...

I suggest you get with your instructor and ask for clarification and hopefully they will explain better than I.

Good Luck.

To: 6...
From: g...@ku.edu
Date: Thu, 25 Mar 2010 20:59:50 -0500
Subject: RE: [68HC12] Another Spec Question

Well, I'm working through some problems for homework while trying to learn the board. The problem question for me is:

"For the MC9S12DG256, determine the values for the serial pre-scalar and baud rate divisor for 115,200 bps."

So, just by calculating the baud from the units --> 115,200 [bps] = x [baud] * 16 bits/baud (found on the Serial Communications datasheet). Ergo, x = 7200 [baud]. So is this: SCIBR[12:0] my baud rate divisor?! I'm confused by what my homework question is asking...

Thanks again Justin, you're a lifesaver!

________________________________

From: 6... on behalf of justin lucas
Sent: Thu 3/25/2010 8:55 PM
To: 6...
Subject: RE: [68HC12] Another Spec Question

The data sheet for your processor has the information you are looking for...I have the data sheet for this processor and its poorly organized. It has the basic datasheet, plus an additional zip file with all of the sections.

First do you have all of the sections for the basic datasheet?

Second, I have used this MCU for several projects and the default baud rate is usually 9600. Since you mentioned you were just learning about it, you are probably using some version of a boot loader program. Usually the BLP sets the baud rate and you don't have to worry about unless you have to configure the MCU to run off EEPROM from power up, then you have to set the PLL and BAUD for the SCI interface.

I don't recall ever having to set a prescalar value for the 9S12, only the HC11.

You should be able to set your baud to whatever rate you want using the formula

SCI baud rate = SCI module clock / (16 * SCIBR[12:0])

I think the module clock for the 9S12 is 25 MHz.

and the divisor is the 16*(bits value in binary for the target baud rate)

example,

9600= 25e6/(16*163)

You will need to confirm you module clock. Its been awhile, but I think it is set by your boot loader program.

If you set it for EEPROM , then you will have to set the PLL.

Are you using the Minidragon2 board from Wytec?

To: 6...
From: g...@ku.edu
Date: Thu, 25 Mar 2010 19:14:24 -0500
Subject: RE: [68HC12] Another Spec Question

Sorry about that, I just realized that what I had responded with didn't make any sense! Of course it is a 68HC12 board - I am in that Yahoo group. Anyhow, the microcontroller is MC9S12DG256.

Ok, so in one of the previous posts to this thread, I was informed to check out the datasheets. I did find on page 14 of the serial communications data sheet that the board operates at 16 bits/baud. However, I still didn't find what the pre-scalar value is at 7200 baud. Maybe it's just me, but I cannot find it for the life of me.

Also, what is meant by the "baud rate divisor?" Would this be my 7200 baud value from above in a different wording?! Thank you for all help to this thread! I greatly appreciate it!

________________________________

From: 6... on behalf of Andrei Chichak
Sent: Wed 3/24/2010 11:51 PM
To: 6...
Subject: Re: [68HC12] Another Spec Question

Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.

So with that in mind, Edward asks "what MCU you are using?"

A

On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:

> Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
>
> ________________________________
>
> From: 6... on behalf of Edward Karpicz
> Sent: Wed 3/24/2010 11:35 PM
> To: 6...
> Subject: Re: [68HC12] Another Spec Question
>
> From the beginning up to the end would be the best. Plus not less important
> reading, CPU reference manual. If you are not going to use these MCUs
> seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> what MCU you are using?
>
> Edward
>
> ----- Original Message -----
> From: "Fry, Gordon" >
> To: <6... >
> Sent: Thursday, March 25, 2010 6:05 AM
> Subject: RE: [68HC12] Another Spec Question
>
> > Since I am kind of new to all of this terminology, do you know what
> > section it could be under? I am looking at this 450pg.++ user's guide to
> > the microprocessor and I have no idea where to start... haha. Thanks for
> > the help!
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 7:39 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> > You can find a data sheet at freescale.com
> >
> >
> >
> > Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
> >
> >
> >
> > I have used the mini-dragon board from evbplus and found the datasheets
> > provided at the site are pretty good.
> >
> >
> >
> > Good luck.
> >
> > Thanks.
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> >
> >
> >
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > Subject: RE: [68HC12] Another Spec Question
> >
> >
> >
> >
> >
> > No I do not, where would I find this?
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Wed 3/24/2010 4:31 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> > You should be able to locate this information in the data sheet. Do you
> > have the data sheet for your processor?
> >
> > Justin
> >
> > "In theory, there is no difference between theory and practice. But, in
> > practice, there is. "
> > --Yogi Berra/Jan L.A. van de Snepscheut--
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > Subject: [68HC12] Another Spec Question
> >
> > Hi again,
> >
> > I have another question to ask of you: How would I determine the values
> > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > help.
> >
> > __________________________________________________________
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> >
> >
> >
> >
> >
> >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - justin lucas - Mar 25 22:37:52 2010


Andrei

Thanks for pointing out my mistake. You're correct in with clock rate of the MCU...the table in the data sheet configures for 25 MHZ, but with MCU speed its about 16 Mhz or at least that was the 9S12 value I used to set a SCI configuration with PLL to 24 Mhz.

I forgot about the crystal value...

I'd still check with your instuctor to verify your findings...

Good Luck!

> To: 6...
> From: g...@chichak.ca
> Date: Thu, 25 Mar 2010 20:24:09 -0600
> Subject: Re: [68HC12] Another Spec Question
>
> Gordon,
>
> Baud is another name for bits per second, or bps. 9600 baud means 9600 bits per second. You might think that there are 8 bits in a byte, well noooooo, there are 10 since you have to add a start bit and a stop bit. Therefore 9600 baud will be equivalent to 960 characters per second. (mumble mumble 110 baud has 2 stop bits mumble mumble teletype mumble mumble commutator mumble 10 keystrokes per second)
>
> Next, you need to figure out what clock rate your processor is running at. Like a PC running at 2.8GHz or 2800000000Hz. your processor will be running internally at some speed like 16000000Hz. This is derived from the crystal that you are using and multiplied up and divided down by the PLL (phase locked loop). So, in the case of other Motorola processors, you could have a 32768Hz crystal that is multiplied by 512 to give you 16MiHz.
>
> Next, you have to look through your databooks to find out how the SCI module clock relates to the system clock. It might be 1:1, it could be /2 or /16, or programmable. It depends. This will give you your SCI module clock SPEED.
>
> Last, solve the equation 115200 = SCI_SPEED / (16 * x) for x.
>
> The calculation is easy, getting all of the information needed to do the calculation is hard. But to achieve the aim you must grok the processor fully.
>
> A
> On 2010-March-25, at 7:59 PM, Fry, Gordon wrote:
>
> > Well, I'm working through some problems for homework while trying to learn the board. The problem question for me is:
> >
> > "For the MC9S12DG256, determine the values for the serial pre-scalar and baud rate divisor for 115,200 bps."
> >
> > So, just by calculating the baud from the units --> 115,200 [bps] = x [baud] * 16 bits/baud (found on the Serial Communications datasheet). Ergo, x = 7200 [baud]. So is this: SCIBR[12:0] my baud rate divisor?! I'm confused by what my homework question is asking...
> >
> > Thanks again Justin, you're a lifesaver!
> >
> > ________________________________
> >
> > From: 6... on behalf of justin lucas
> > Sent: Thu 3/25/2010 8:55 PM
> > To: 6...
> > Subject: RE: [68HC12] Another Spec Question
> >
> > The data sheet for your processor has the information you are looking for...I have the data sheet for this processor and its poorly organized. It has the basic datasheet, plus an additional zip file with all of the sections.
> >
> > First do you have all of the sections for the basic datasheet?
> >
> > Second, I have used this MCU for several projects and the default baud rate is usually 9600. Since you mentioned you were just learning about it, you are probably using some version of a boot loader program. Usually the BLP sets the baud rate and you don't have to worry about unless you have to configure the MCU to run off EEPROM from power up, then you have to set the PLL and BAUD for the SCI interface.
> >
> > I don't recall ever having to set a prescalar value for the 9S12, only the HC11.
> >
> > You should be able to set your baud to whatever rate you want using the formula
> >
> > SCI baud rate = SCI module clock / (16 * SCIBR[12:0])
> >
> > I think the module clock for the 9S12 is 25 MHz.
> >
> > and the divisor is the 16*(bits value in binary for the target baud rate)
> >
> > example,
> >
> > 9600= 25e6/(16*163)
> >
> > You will need to confirm you module clock. Its been awhile, but I think it is set by your boot loader program.
> >
> > If you set it for EEPROM , then you will have to set the PLL.
> >
> > Are you using the Minidragon2 board from Wytec?
> >
> > To: 6...
> > From: g...@ku.edu
> > Date: Thu, 25 Mar 2010 19:14:24 -0500
> > Subject: RE: [68HC12] Another Spec Question
> >
> > Sorry about that, I just realized that what I had responded with didn't make any sense! Of course it is a 68HC12 board - I am in that Yahoo group. Anyhow, the microcontroller is MC9S12DG256.
> >
> > Ok, so in one of the previous posts to this thread, I was informed to check out the datasheets. I did find on page 14 of the serial communications data sheet that the board operates at 16 bits/baud. However, I still didn't find what the pre-scalar value is at 7200 baud. Maybe it's just me, but I cannot find it for the life of me.
> >
> > Also, what is meant by the "baud rate divisor?" Would this be my 7200 baud value from above in a different wording?! Thank you for all help to this thread! I greatly appreciate it!
> >
> > ________________________________
> >
> > From: 6... on behalf of Andrei Chichak
> > Sent: Wed 3/24/2010 11:51 PM
> > To: 6...
> > Subject: Re: [68HC12] Another Spec Question
> >
> > Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.
> >
> > So with that in mind, Edward asks "what MCU you are using?"
> >
> > A
> >
> > On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:
> >
> > > Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
> > >
> > > ________________________________
> > >
> > > From: 6... on behalf of Edward Karpicz
> > > Sent: Wed 3/24/2010 11:35 PM
> > > To: 6...
> > > Subject: Re: [68HC12] Another Spec Question
> > >
> > > From the beginning up to the end would be the best. Plus not less important
> > > reading, CPU reference manual. If you are not going to use these MCUs
> > > seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> > > what MCU you are using?
> > >
> > > Edward
> > >
> > > ----- Original Message -----
> > > From: "Fry, Gordon" >
> > > To: <6... >
> > > Sent: Thursday, March 25, 2010 6:05 AM
> > > Subject: RE: [68HC12] Another Spec Question
> > >
> > > > Since I am kind of new to all of this terminology, do you know what
> > > > section it could be under? I am looking at this 450pg.++ user's guide to
> > > > the microprocessor and I have no idea where to start... haha. Thanks for
> > > > the help!
> > > >
> > > > ________________________________
> > > >
> > > > From: 6... on behalf of justin lucas
> > > > Sent: Wed 3/24/2010 7:39 PM
> > > > To: 6...
> > > > Subject: RE: [68HC12] Another Spec Question
> > > >
> > > >
> > > >
> > > >
> > > > You can find a data sheet at freescale.com
> > > >
> > > >
> > > >
> > > > Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
> > > >
> > > >
> > > >
> > > > I have used the mini-dragon board from evbplus and found the datasheets
> > > > provided at the site are pretty good.
> > > >
> > > >
> > > >
> > > > Good luck.
> > > >
> > > > Thanks.
> > > >
> > > > Justin
> > > >
> > > > "In theory, there is no difference between theory and practice. But, in
> > > > practice, there is. "
> > > > --Yogi Berra/Jan L.A. van de Snepscheut--
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > To: 6...
> > > > From: g...@ku.edu
> > > > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > > > Subject: RE: [68HC12] Another Spec Question
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > No I do not, where would I find this?
> > > >
> > > > ________________________________
> > > >
> > > > From: 6... on behalf of justin lucas
> > > > Sent: Wed 3/24/2010 4:31 PM
> > > > To: 6...
> > > > Subject: RE: [68HC12] Another Spec Question
> > > >
> > > > You should be able to locate this information in the data sheet. Do you
> > > > have the data sheet for your processor?
> > > >
> > > > Justin
> > > >
> > > > "In theory, there is no difference between theory and practice. But, in
> > > > practice, there is. "
> > > > --Yogi Berra/Jan L.A. van de Snepscheut--
> > > >
> > > > To: 6...
> > > > From: g...@ku.edu
> > > > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > > > Subject: [68HC12] Another Spec Question
> > > >
> > > > Hi again,
> > > >
> > > > I have another question to ask of you: How would I determine the values
> > > > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > > > help.
> > > >
> > > > __________________________________________________________
> > > > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > > > inbox.
> > > > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - "Fry, Gordon" - Mar 25 22:40:01 2010

Andrei,

So what you're saying is that my calculation on my last post was completely wrong...haha. I see. That makes sense though about the baud. So my instructor is essentially asking what these values are at 115,200 baud then. Interesting...

I am almost certain from lecture that the bus clock speed of the microcontroller was 24 or 25 MHz, does this sound right to you? So solving for x gives me approximately 13.021. What are the units here and what does this value tell me?

Thanks again!

________________________________

From: 6... on behalf of Andrei Chichak
Sent: Thu 3/25/2010 9:24 PM
To: 6...
Subject: Re: [68HC12] Another Spec Question

Gordon,

Baud is another name for bits per second, or bps. 9600 baud means 9600 bits per second. You might think that there are 8 bits in a byte, well noooooo, there are 10 since you have to add a start bit and a stop bit. Therefore 9600 baud will be equivalent to 960 characters per second. (mumble mumble 110 baud has 2 stop bits mumble mumble teletype mumble mumble commutator mumble 10 keystrokes per second)

Next, you need to figure out what clock rate your processor is running at. Like a PC running at 2.8GHz or 2800000000Hz. your processor will be running internally at some speed like 16000000Hz. This is derived from the crystal that you are using and multiplied up and divided down by the PLL (phase locked loop). So, in the case of other Motorola processors, you could have a 32768Hz crystal that is multiplied by 512 to give you 16MiHz.

Next, you have to look through your databooks to find out how the SCI module clock relates to the system clock. It might be 1:1, it could be /2 or /16, or programmable. It depends. This will give you your SCI module clock SPEED.

Last, solve the equation 115200 = SCI_SPEED / (16 * x) for x.

The calculation is easy, getting all of the information needed to do the calculation is hard. But to achieve the aim you must grok the processor fully.

A
On 2010-March-25, at 7:59 PM, Fry, Gordon wrote:

> Well, I'm working through some problems for homework while trying to learn the board. The problem question for me is:
>
> "For the MC9S12DG256, determine the values for the serial pre-scalar and baud rate divisor for 115,200 bps."
>
> So, just by calculating the baud from the units --> 115,200 [bps] = x [baud] * 16 bits/baud (found on the Serial Communications datasheet). Ergo, x = 7200 [baud]. So is this: SCIBR[12:0] my baud rate divisor?! I'm confused by what my homework question is asking...
>
> Thanks again Justin, you're a lifesaver!
>
> ________________________________
>
> From: 6... on behalf of justin lucas
> Sent: Thu 3/25/2010 8:55 PM
> To: 6...
> Subject: RE: [68HC12] Another Spec Question
>
> The data sheet for your processor has the information you are looking for...I have the data sheet for this processor and its poorly organized. It has the basic datasheet, plus an additional zip file with all of the sections.
>
> First do you have all of the sections for the basic datasheet?
>
> Second, I have used this MCU for several projects and the default baud rate is usually 9600. Since you mentioned you were just learning about it, you are probably using some version of a boot loader program. Usually the BLP sets the baud rate and you don't have to worry about unless you have to configure the MCU to run off EEPROM from power up, then you have to set the PLL and BAUD for the SCI interface.
>
> I don't recall ever having to set a prescalar value for the 9S12, only the HC11.
>
> You should be able to set your baud to whatever rate you want using the formula
>
> SCI baud rate = SCI module clock / (16 * SCIBR[12:0])
>
> I think the module clock for the 9S12 is 25 MHz.
>
> and the divisor is the 16*(bits value in binary for the target baud rate)
>
> example,
>
> 9600= 25e6/(16*163)
>
> You will need to confirm you module clock. Its been awhile, but I think it is set by your boot loader program.
>
> If you set it for EEPROM , then you will have to set the PLL.
>
> Are you using the Minidragon2 board from Wytec?
>
> To: 6...
> From: g...@ku.edu
> Date: Thu, 25 Mar 2010 19:14:24 -0500
> Subject: RE: [68HC12] Another Spec Question
>
> Sorry about that, I just realized that what I had responded with didn't make any sense! Of course it is a 68HC12 board - I am in that Yahoo group. Anyhow, the microcontroller is MC9S12DG256.
>
> Ok, so in one of the previous posts to this thread, I was informed to check out the datasheets. I did find on page 14 of the serial communications data sheet that the board operates at 16 bits/baud. However, I still didn't find what the pre-scalar value is at 7200 baud. Maybe it's just me, but I cannot find it for the life of me.
>
> Also, what is meant by the "baud rate divisor?" Would this be my 7200 baud value from above in a different wording?! Thank you for all help to this thread! I greatly appreciate it!
>
> ________________________________
>
> From: 6... on behalf of Andrei Chichak
> Sent: Wed 3/24/2010 11:51 PM
> To: 6...
> Subject: Re: [68HC12] Another Spec Question
>
> Gordon, there are tons of different models of HC12s. The whole part number is required to know which processor you are dealing with. It will look like MC9S12DG512 or something like that. The DG indicates what extra stuff has been thrown into the processor and the 512 indicates how much FLASH memory you have. You really have to haul out your board and look at the processor.
>
> So with that in mind, Edward asks "what MCU you are using?"
>
> A
>
> On 2010-March-24, at 10:37 PM, Fry, Gordon wrote:
>
> > Edward, I'm using the Motorola 68HC12 MCU. I'll take a look at these suggestions, and let you all know what I find. Thanks a bunch!
> >
> > ________________________________
> >
> > From: 6... on behalf of Edward Karpicz
> > Sent: Wed 3/24/2010 11:35 PM
> > To: 6...
> > Subject: Re: [68HC12] Another Spec Question
> >
> > From the beginning up to the end would be the best. Plus not less important
> > reading, CPU reference manual. If you are not going to use these MCUs
> > seriously, then look at Serial Communication Interface (SCI) chapter. BTW
> > what MCU you are using?
> >
> > Edward
> >
> > ----- Original Message -----
> > From: "Fry, Gordon" >
> > To: <6... >
> > Sent: Thursday, March 25, 2010 6:05 AM
> > Subject: RE: [68HC12] Another Spec Question
> >
> > > Since I am kind of new to all of this terminology, do you know what
> > > section it could be under? I am looking at this 450pg.++ user's guide to
> > > the microprocessor and I have no idea where to start... haha. Thanks for
> > > the help!
> > >
> > > ________________________________
> > >
> > > From: 6... on behalf of justin lucas
> > > Sent: Wed 3/24/2010 7:39 PM
> > > To: 6...
> > > Subject: RE: [68HC12] Another Spec Question
> > >
> > >
> > >
> > >
> > > You can find a data sheet at freescale.com
> > >
> > >
> > >
> > > Since you have a dragon board, check http://www.evbplus.com/, <http://www.evbplus.com/,> too.
> > >
> > >
> > >
> > > I have used the mini-dragon board from evbplus and found the datasheets
> > > provided at the site are pretty good.
> > >
> > >
> > >
> > > Good luck.
> > >
> > > Thanks.
> > >
> > > Justin
> > >
> > > "In theory, there is no difference between theory and practice. But, in
> > > practice, there is. "
> > > --Yogi Berra/Jan L.A. van de Snepscheut--
> > >
> > >
> > >
> > >
> > >
> > > To: 6...
> > > From: g...@ku.edu
> > > Date: Wed, 24 Mar 2010 19:17:49 -0500
> > > Subject: RE: [68HC12] Another Spec Question
> > >
> > >
> > >
> > >
> > >
> > > No I do not, where would I find this?
> > >
> > > ________________________________
> > >
> > > From: 6... on behalf of justin lucas
> > > Sent: Wed 3/24/2010 4:31 PM
> > > To: 6...
> > > Subject: RE: [68HC12] Another Spec Question
> > >
> > > You should be able to locate this information in the data sheet. Do you
> > > have the data sheet for your processor?
> > >
> > > Justin
> > >
> > > "In theory, there is no difference between theory and practice. But, in
> > > practice, there is. "
> > > --Yogi Berra/Jan L.A. van de Snepscheut--
> > >
> > > To: 6...
> > > From: g...@ku.edu
> > > Date: Wed, 24 Mar 2010 16:04:53 -0500
> > > Subject: [68HC12] Another Spec Question
> > >
> > > Hi again,
> > >
> > > I have another question to ask of you: How would I determine the values
> > > for the serial communications pre-scalar at 7200 baud? Thanks for the
> > > help.
> > >
> > > __________________________________________________________
> > > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > > inbox.
> > > http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1 <http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1>
> > >
> > >
> > >
> > >
> > >
> > >



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - Bill Auerbach - Mar 25 23:05:20 2010

> Fry, Gordon writes on 10:39 PM 3/25/2010
>So what you're saying is that my calculation on my last post was
>completely wrong...haha. I see. That makes sense though about the
>baud. So my instructor is essentially asking what these values are
>at 115,200 baud then. Interesting...
>
>I am almost certain from lecture that the bus clock speed of the
>microcontroller was 24 or 25 MHz, does this sound right to you? So
>solving for x gives me approximately 13.021. What are the units here
>and what does this value tell me?

It would be correct that you don't get a whole number for the
integral divisor. With "round number" clocks like 24MHz and 25MHz
there is usually a small error with several or even all baud rates
output from the clock divider. In the "old" days CPUs were clocked
e.g. at 6.144MHz or 12.288Mhz because this worked out to easily
provide error free baud rates at 19200 and multiples of 19200 and
even dividers into 19200 (2400, 4800, 9600, 19200, 38400, 115200,
etc.). It turns out that the error is usually a fraction of a
percent and RS-232 is very tolerant of this error, although at higher
speeds it can be more of a problem.

Bill





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - "Fry, Gordon" - Mar 25 23:22:49 2010

Bill,

Thanks for your response. That actually makes perfect sense what you just explained about the discrepencies of the real values and whole values. Now, when you mention that it makes sense that I did not get a whole number value for my integral divisor, would an equivalent name for the term be baud rate divisor by chance?

________________________________

From: 6... on behalf of Bill Auerbach
Sent: Thu 3/25/2010 10:03 PM
To: 6...
Subject: RE: [68HC12] Another Spec Question

> Fry, Gordon writes on 10:39 PM 3/25/2010
>So what you're saying is that my calculation on my last post was
>completely wrong...haha. I see. That makes sense though about the
>baud. So my instructor is essentially asking what these values are
>at 115,200 baud then. Interesting...
>
>I am almost certain from lecture that the bus clock speed of the
>microcontroller was 24 or 25 MHz, does this sound right to you? So
>solving for x gives me approximately 13.021. What are the units here
>and what does this value tell me?

It would be correct that you don't get a whole number for the
integral divisor. With "round number" clocks like 24MHz and 25MHz
there is usually a small error with several or even all baud rates
output from the clock divider. In the "old" days CPUs were clocked
e.g. at 6.144MHz or 12.288Mhz because this worked out to easily
provide error free baud rates at 19200 and multiples of 19200 and
even dividers into 19200 (2400, 4800, 9600, 19200, 38400, 115200,
etc.). It turns out that the error is usually a fraction of a
percent and RS-232 is very tolerant of this error, although at higher
speeds it can be more of a problem.

Bill







(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - Andrei Chichak - Mar 25 23:49:06 2010


On 2010-March-25, at 8:39 PM, Fry, Gordon wrote:

>
> I am almost certain from lecture that the bus clock speed of the microcontroller was 24 or 25 MHz, does this sound right to you?
>
From my old code - final E-clock rate is crystal * PLL. Baud divisor is final e-clock / (16 * 115200).

> So solving for x gives me approximately 13.021. What are the units here and what does this value tell me?
>

Baud clocks will lock if they are within +/- 10% (within 1 bit width in 10 (10 bits per character yadda yadda)). HC12 SCIs are even better since they resynch within a byte.

As Professor Weichman said in ASTRO 253 class "What's an order of magnitude between friends?"

A







(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Another Spec Question - Bill Auerbach - Mar 26 0:25:23 2010

Gordon,

> Fry, Gordon writes on 11:19 PM 3/25/2010
>Thanks for your response. That actually makes perfect sense what you
>just explained about the discrepencies of the real values and whole
>values. Now, when you mention that it makes sense that I did not get
>a whole number value for my integral divisor, would an equivalent
>name for the term be baud rate divisor by chance?

Yes, baud rate divisor is what you'll often see for this value. It's
something applied to a much faster clock to derive a much slower
clock for serial communications. The several megahertz input clock
has to be divided down to a several kilohertz baud clock.
Bill





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )