Motorola 68HC12BC32, 68HC12B32, CME-12B/BC manual Assembling source code, AS12 HELLO.ASM -LHELLO

Page 6

Assembling source code

An example program called “HELLO.ASM” is provided under the \EXAMPLE directory.

You can assemble your source code using command line tools under a DOS prompt by typing:

AS12 HELLO.ASM –LHELLO

Most compilers and assemblers allow many command line options so using a MAKE utility or batch file is recommended if you use this method. Run AS12 without any arguments to see all the options, or see the AS12.TXT file on the disk.

The programming utilities provided with this board also contain a simple interface to the free assembler. Use it by selecting "Build" or “Assembler” from the menu. This will prompt you for the file to be assembled.

DO NOT use long path names (> 8 characters). The free assembler is an old DOS tool that does not recognize them.

If there are no errors in your source code, 2 output files will be created:

HELLO.S19 a Motorola S-Record file that can be programmed into memory

HELLO.LST a common listing file which shows the relationship between source and output

The listing file is especially helpful to look at when debugging your program. If your program has errors, they will be displayed and no output will be generated, otherwise the listing file will be displayed.

If you prefer a windows integrated programming environment – try the Motorola MCU-EZ tools. Refer to the MCU-EZ documentation on the disk for more information.

Also, a port for the free GNU C compiler and tools for the HC12 is in the works and may be finished as you read this. Check www.axman.com or :

http://home.worldnet.fr/~stcarrez/m68hc11_port.html

6

Image 6
Contents CME-12B/BC Contents Installing the Software Getting StartedBoard Startup Support Software Software DevelopmentTutorial Creating source codeAssembling source code AS12 HELLO.ASM -LHELLORunning your application Programming Flash Eeprom ORG $1000 to ORG $8000Config Switch Memory MAPOFF Config Switch MEM-SEL JumpersKeypad Ports and ConnectorsLcdport GNDMcuport CanportGND CAN-H CAN-L COM1 Serial Port BusportEVU Compatibility Jumpers ResetBDM-IN Bgnd GNDTroubleshooting Tips and Suggestions UtilitiesLCD Command Codes TablesLCD Character Codes 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.