Running your application

After creating an S-Record file you can "upload" it to the development board for a test run. The provided example “HELLO.ASM” was created to run from RAM so you can use the D- Bug12 Monitor to test it without programming it into EEPROM.

If you haven’t done so already, verify that the CME-12B/BC board is connected and operating properly by following the steps under “GETTING STARTED” until you see the D-Bug12 prompt, then follow these steps to run your program:

1.Press and release the RESET button on the CME-12B/BC board. You should see the PRESS ANY KEY message. Hit the return key to get the monitor prompt.

2.Type LOAD

This will prepare D-Bug12 to receive a program.

3.Select Upload or Send and when prompted for a file name select your assembled program file in s-record format that was created in the previous section called: HELLO.S19 Your program will be sent to the board thru the serial port.

4.When finished loading you will see the > prompt again. Type CALL 1000

This tells D-Bug12 to execute the subroutine at address $1000, which is the start of our test program.

5.If everything is working properly you should see the message “Hello World” echoed back to your terminal screen then, since we return at then end of our program, a line containing the internal register status displayed by D-Bug12 and a message prompt.

6.If you do not get this message, try going thru this tutorial once more, then if still no go, see the TROUBLESHOOTING section in this manual

You can modify the hello program to display other strings or do anything you want. The procedures for assembling your code, uploading it to the board and executing it remain the same. D-Bug12 has many powerful features such as breakpoints, assembly/disassembly, memory dump and modify and program trace. Type HELP at the D-Bug12 prompt for a listing of commands or consult the D-Bug12 documentation on the disk for more information.

7

Page 7
Image 7
Motorola 68HC12B32, 68HC12BC32, CME-12B/BC manual Running your application

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.