Motorola CME-12B/BC, 68HC12BC32, 68HC12B32 manual Programming Flash Eeprom, ORG $1000 to ORG $8000

Page 8

Programming Flash EEPROM

You can program your application into EEPROM so it executes automatically when you apply power to the board as follows:

1.Make a backup copy of HELLO.ASM then use a text editor to modify it. Change the start of the program to $8000 which is the beginning of the EEPROM. Do this by changing the

”ORG $1000” to ”ORG $8000”.

2.Remove the comment ; character from before the following line to initialize the stack pointer which is necessary when running outside of D-Bug12:

LDS

#$C00 ; initialize the stack pointer

3.Add a comment ; character to the beginning of the first RTS statement, which will cause the program to end gracefully with an endless loop:

;

RTS

; return (use this only if called, from monitor

 

bra

ENDPROG ; endless loop

4.Remove the comment ; character from before the following 2 lines at the end, to set the reset vector to go to the beginning of the program (the label START) when powered on:

org

$fffe

reset vector

 

fdb

START

5.Re-Assemble HELLO.ASM as described in the "Assembling Source Code" section.

6.Select “CME12BC” under AxIDE.

7.Select the “Program” option and when prompted for a file name, enter the new HELLO.S19 file then select [OK].

8.Set the CONFIG SWITCH positions 1,2,3,4 and 6 to ON.

9.Press the RESET button on the board then select Continue or hit ENTER. A new utilities menu should be displayed. If you have trouble here, see the TROUBLESHOOTING section.

10.Set the CONFIG SWITCH position 5 ON. The red VPP light should come on.

11.When prompted to “Erase” choose Yes.

12.When finished programming, set the CONFIG SWITCH positions 1,2,3,4 and 5 OFF. The VPP light should turn off.

13.Cycle power or press RESET on the board. Your new program should start automatically and the “Hello World” prompt should be displayed in the terminal window.

To return to the D-Bug12 monitor program, set the CONFIG SWITCH positions 1,2,3 and 4 back ON then press RESET.

8

Image 8
Contents CME-12B/BC Contents Board Startup Installing the SoftwareGetting Started Support Software Software DevelopmentTutorial Creating source codeAssembling source code AS12 HELLO.ASM -LHELLORunning your application Programming Flash Eeprom ORG $1000 to ORG $8000OFF Config SwitchMemory MAP Config Switch MEM-SEL JumpersPorts and Connectors LcdportKeypad GNDGND CAN-H CAN-L McuportCanport COM1 Serial Port BusportReset BDM-INEVU Compatibility Jumpers Bgnd GNDTroubleshooting Tips and Suggestions UtilitiesLCD Character Codes LCD Command CodesTables Bug12 Monitor Commands Bulk

68HC12B32, CME-12B/BC, 68HC12BC32 specifications

The Motorola 68HC12BC32, CME-12B/BC, and 68HC12B32 are microcontroller units (MCUs) that are part of the renowned HC12 series, which gained popularity in embedded system designs due to their versatility, robust performance, and comprehensive feature set. These MCUs are widely used in automotive applications, industrial control systems, and various consumer electronics due to their advanced capabilities.

One of the main features of the 68HC12BC32 is its 16-bit architecture, which allows for efficient processing and greater precision in calculations compared to 8-bit counterparts. This feature is crucial for applications requiring high-performance processing, such as real-time control systems. The processor operates at clock speeds of up to 25 MHz, providing the computational power necessary for complex operations.

The 68HC12MCUs include various on-chip memory options, such as ROM, RAM, and EEPROM. For instance, the 68HC12BC32 comes with up to 32 KB of ROM and 1 KB of RAM, along with 512 bytes of EEPROM, making it suitable for applications that require data retention even when the power is turned off. The presence of on-chip memory significantly reduces the need for external components, simplifying system design and enhancing reliability.

Moreover, these microcontrollers feature a rich set of input/output (I/O) capabilities, including multiple general-purpose I/O lines, timer/counter modules, and analog-to-digital converters (ADCs). The integration of these components allows for flexible interfacing with a multitude of sensors and actuators, enabling designers to create sophisticated applications without needing extensive external circuitry.

The embedded communication interfaces, such as SPI (Serial Peripheral Interface), I2C (Inter-Integrated Circuit), and CAN (Controller Area Network), are vital for enabling communication between devices in multiprocessor systems. This capability is particularly beneficial in automotive applications, where seamless data exchange is critical for tasks such as engine control and diagnostics.

Power management features in the 68HC12 series enhance its suitability for battery-powered applications. The ability to enter low-power modes helps extend battery life, making these microcontrollers ideal for portable devices.

In summary, the Motorola 68HC12BC32, CME-12B/BC, and 68HC12B32 microcontrollers are robust and flexible MCUs that offer a combination of advanced processing capabilities, extensive memory options, versatile I/O functionality, and efficient communication interfaces. These characteristics make them well-suited for various applications, from automotive and industrial systems to consumer electronics, ensuring they remain relevant in the evolving landscape of embedded technology.