EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Novice help wiring HCS12 to program

Started by darkprism23 February 26, 2008
Hello,

I'm trying to get back into microcontrollers, however, I'm having
trouble figuring out how to wire the controller to get programmed. I
would like to start out by using an RS232 interface. Can somebody
guide me along? The chip I'm currently interested in using is
MC9S12DG256. Thanks in advance!

-Chris
connect the rs232 to the port near the display and make sure that the com port is selected in option menu. Are you writing in assembly or C?

----- Original Message ----
From: darkprism23
To: 6...
Sent: Tuesday, February 26, 2008 5:40:47 PM
Subject: [68HC12] Novice help wiring HCS12 to program

Hello,

I'm trying to get back into microcontrollers, however, I'm having

trouble figuring out how to wire the controller to get programmed. I

would like to start out by using an RS232 interface. Can somebody

guide me along? The chip I'm currently interested in using is

MC9S12DG256. Thanks in advance!

-Chris





--- In 6..., Jerome Williams
wrote:
>
> connect the rs232 to the port near the display and make sure that
the com port is selected in option menu. Are you writing in assembly
or C?

I don't understand. Let's assume I have just the microcontroller. I
would like to be able to program the processor using my computer and
the RS232 port. I suppose I could try and use a BDM, however, I'm
curious as to how I can do this. Do you know how to wire them up?

I guess I'm not seeing how I can just connect a RS232 port to a
max232 and then output that to the processor expecting it will
program. Isn't there some pin I'm supposed to set high or something
to tell the chip it's getting programmed? Let me know, I feel I have
a lack of information.

-Chris

>
> ----- Original Message ----
> From: darkprism23
> To: 6...
> Sent: Tuesday, February 26, 2008 5:40:47 PM
> Subject: [68HC12] Novice help wiring HCS12 to program
>
>
> Hello,
>
> I'm trying to get back into microcontrollers, however, I'm having
>
> trouble figuring out how to wire the controller to get programmed.
I
>
> would like to start out by using an RS232 interface. Can somebody
>
> guide me along? The chip I'm currently interested in using is
>
> MC9S12DG256. Thanks in advance!
>
> -Chris
>
>
>
>
>
>
>
>
Chris:

You should definitely use the BDM port to program and debug your
MCU. If you look at page 3 of
http://www.freescale.com/files/microcontrollers/doc/app_note/AN2104.pdf
shows the pin designations for the 2x3 header of the BDM port.
Unfortunately, you will not be able to use the SCI port until you have
some kind of program loaded, either your programming application or a
bootloader. The least expensive BDM cable option would be the product
from P&E Microcomputer Systems,
http://www.pemicro.com/products/product_viewDetails.cfm?product_id2&CF
ID12404&CFTOKEN020459 for hardware and
http://www.pemicro.com/products/backend_product_processor.cfm?product_id
I for programming software. These are still not cheap for the
hobbyist, but I don't know of anything cheaper.

Regards,

John Honnold
Freescale Semiconductor
Technical Information Center
MCU 16/32 Bit Applications Engineer
----------------------
This email has been classified:
( ) Freescale General Business
( ) Freescale Confidential Proprietary
( ) Freescale Internal Use Only
(x) Public

________________________________

From: 6... [mailto:6...] On Behalf
Of darkprism23
Sent: Tuesday, February 26, 2008 4:28 PM
To: 6...
Subject: [68HC12] Re: Novice help wiring HCS12 to program

--- In 6...







''

'


'

''
'












''






'





Hello, Chris,

A couple of years ago, I moved from Intel 8051 (40 pins DIL package) to
Freescale HC12 (CMS 112 pins).
I was afraid about to start with a new and more powerful CMS processor.

The first thing I did was to buy a development board with BDM, demo version
of C compiler ICC12, NoIce debugger... I found with this board all sheets to
understand haw to connect BDM, but also other components for PLL...
Now, I think it's so easy !!!

Sure, you HAVE to use BDM, because RS232 interface needs a soft is present
in the CPU... And when you buy your CPU, it's empty.

If you really want to use RS-232 on your PC, try a BDM using RS-232.
For me, I use BDM on parallel port (P&E Micro), and sometimes, an USB BDM.

With your BDM and NoIce, you can download, debug, step by step in C or
assembly language, read flash, ram, registers, program flash...
In the beginning, with dp256, I wrote some little function in RAM area, then
add them in the final project.

Now, I use ICC12 pro version (which allow paged functions), and NoIce
debugger, and it's very very easy !!!

Hope this help.

Joel


> -----Message d'origine-----
> De: 6... [mailto:6...] De la part de
> darkprism23
> Envoy mardi 26 frier 2008 23:41
> : 6...
> Objet: [68HC12] Novice help wiring HCS12 to program
>
> Hello,
>
> I'm trying to get back into microcontrollers, however, I'm having
> trouble figuring out how to wire the controller to get programmed. I
> would like to start out by using an RS232 interface. Can somebody
> guide me along? The chip I'm currently interested in using is
> MC9S12DG256. Thanks in advance!
>
> -Chris
>
>
>
>
>
--- In 6..., "darkprism23" wrote:
>
> Hello,
>
> I'm trying to get back into microcontrollers, however, I'm having
> trouble figuring out how to wire the controller to get programmed. I
> would like to start out by using an RS232 interface. Can somebody
> guide me along? The chip I'm currently interested in using is
> MC9S12DG256. Thanks in advance!

There are some commercial development boards using the DP256 that come
with the d-bug12 monitor. They can be programmed from a PC using a
serial port without a BDM device. But these programs can only run from
RAM.

To store a program in flash using only a serial port, you could get a
board that uses the C32 chip with the internal serial monitor. This is
a fun chip to play with. The serial monitor can also work on other
chips, such as the E128, I think.

If you want to make your own board you could also use a DP256 or C32
but they have to be programmed first (with d-bug12 or the serial monitor).

A BDM solution is the best. But you will pay a lot more. It might be
wise to test your interest with a cheaper solution first.

Eric
http://www.EricEngler.com/EmbeddedGNU.aspx
http://www.EricEngler.com/AsmIDE.aspx
http://www.EricEngler.com/Pluto.aspx

The 2024 Embedded Online Conference