Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | Setting SCI baud rate


Advertise Here

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

Setting SCI baud rate - acerunner316 - Jun 9 17:05:01 2008

I want to set the baud rate for the SCI based on user selection. So I
am setting SCI1BDH and SCI1BDL depending on what the baud rate is
selected (choices are limited to a few standard baud rates). However,
it seems like any baudrate that requires setting of SCI1BDH does not work.

Bus Speed is 24MHz
I allow the following baud rate:
38.4K, BR = 39 (default)
19.2K, BR = 78
9600, BR = 156
4800, BR = 313
2400, BR = 625
1200, BR = 1250

So the first 3 baud rates work, but the latter 3 doesn't. Only obvious
thing in common in those are that the upper byte of the registry
(SCI1BDH) needs to be written.

Datasheets say "writing to SCIBDH has no effect without writing ot
SCIBDL, since writin got SCIBDH puts the data in a temporary location
until SCIBDL is written to." So I always write SCI1BDH first, followed
by SCI1BDL.

What am I doing wrong?
------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


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


RE: Setting SCI baud rate - "Redd, Emmett R" - Jun 9 17:14:08 2008

It may be that you need to do a 16-bit write.

Emmett Redd

________________________________

From: 6...@yahoogroups.com on behalf of acerunner316
Sent: Mon 6/9/2008 4:04 PM
To: 6...@yahoogroups.com
Subject: [68HC12] Setting SCI baud rate

I want to set the baud rate for the SCI based on user selection. So I
am setting SCI1BDH and SCI1BDL depending on what the baud rate is
selected (choices are limited to a few standard baud rates). However,
it seems like any baudrate that requires setting of SCI1BDH does not work.

Bus Speed is 24MHz
I allow the following baud rate:
38.4K, BR = 39 (default)
19.2K, BR = 78
9600, BR = 156
4800, BR = 313
2400, BR = 625
1200, BR = 1250

So the first 3 baud rates work, but the latter 3 doesn't. Only obvious
thing in common in those are that the upper byte of the registry
(SCI1BDH) needs to be written.

Datasheets say "writing to SCIBDH has no effect without writing ot
SCIBDL, since writin got SCIBDH puts the data in a temporary location
until SCIBDL is written to." So I always write SCI1BDH first, followed
by SCI1BDL.

What am I doing wrong?
------------------------------------



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

open source HC12 project - Steve Letkeman - Jun 9 17:51:24 2008

Good Day! this post is to test the waters and see if there is any interest
in an open source hardware 9S12DP512 board that would include an RS232 and
CAN bootloader. The board has two Xpansion ports that allow a choice
of RS232, XBee, Ethernet (Digi or XPort) or USB plus the internal CAN
so it allows a number of different options as well as being a protocol
converter
(RS232 to XBee, Ethernet to CAN etc)
I would also be looking for companies that would be interested in building
and selling these boards as a ready to run unit. I would also appreciate
any
feedback in terms of creating a separate forum and/or wiki type web site

Here's some pictures of the prototype hardware. I also have home
automation
software that can run on this board, hence the mounting options for the
Leviton
cabinet.

This picture is an overview of the main cpu board with the current plug
in modules
http://i210.photobucket.com/albums/bb314/Brightan/overview.jpg

This picture is the main cpu board mounted in a plastic case. I milled
out the two slots in the front to accommodate the two RS232 ports. In
this configuration it could act as a protocol converter
http://i210.photobucket.com/albums/bb314/Brightan/incase.jpg

This is the cpu mounted to a Leviton plastic mount and sitting in a
Leviton cabinet
http://i210.photobucket.com/albums/bb314/Brightan/levitonmountingbracket.jpg
This is the CPU board mounted on standoffs in a Leviton case with an
expansion board next to it that brings out 48 points of I/O
http://i210.photobucket.com/albums/bb314/Brightan/standoffswithIOexpansion.jpg
This is the cpu board acting as a 5 port CAN hub
http://i210.photobucket.com/albums/bb314/Brightan/5portCANexpansion.jpg

This is the board with a specific I/O board to handle 6 rooms of
lighting control through a single CAT5 cable to each room. In this case
each room would get either 3 switches/3 status LEDs and one dimming
output (for driving a local solid state relay) or 2 switches/2 status
LEDs, an infrared input and one dimming output.
http://i210.photobucket.com/albums/bb314/Brightan/6roomlightingexpansion.jpg
I'm open to all comments,
Steve

--
Steven D. Letkeman BSc.
Zanthic Technologies Inc.
www.zanthic.com Embedded micro-controllers and CAN interfaces
------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


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

Re: Setting SCI baud rate - acer...@yahoo.com - Jun 9 18:38:51 2008

Issue solved. Mistake was in misinterpretation of a compiler define.

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


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