Questions tagged [68hc12]

A 16-bit microcontroller family from Freescale Semiconductor

The 68HC12 (6812 or HC12 for short) is a microcontroller family from Freescale (former Motorola) Semiconductor. Originally introduced in the mid 1990s, the architecture is a 16-bit enhancement of the 8-bit Motorola 68HC11. Programs written for the HC11 are usually compatible with the HC12, which has a few extra instructions. The first 68HC12 derivatives had a maximum bus speed of 8MHz and flash memory sizes up to 128 kB.

Around year 2002, the devices known as 68HC12 were gradually replaced by the very similar HCS12, which uses the same CPU core but different hardware peripherals. The name 68HC12 or HC12 (without 'S') nowadays refers to the older, obsolete MCU.

Source: Freescale 68HC12D data sheet/manual

50 questions
9
votes
9 answers

Bit-reverse a byte on 68HC12

I'm in a microprocessors class and we are using assembly language in Freescale CodeWarrior to program a 68HCS12 micro controller. Our assignment this week is to revers a byte, so if the byte was 00000001, the output would be 10000000, or 00101011 to…
7
votes
7 answers

Preventing torn reads with an HCS12 microcontroller

Summary I'm trying to write an embedded application for an MC9S12VR microcontroller. This is a 16-bit microcontroller but some of the values I deal with are 32 bits wide and while debugging I've captured some anomalous values that seem to be due to…
Tagc
  • 8,736
  • 7
  • 61
  • 114
3
votes
1 answer

CMake with an embedded C compiler that doesn't support "-o"

I'm writing firmware using an older C compiler called HC12. Currently I use GNU Make for the build system. I'm hoping to start using CMake, but ran into an issue: The compiler does not support some standard C compiler syntax, namely the "-o"…
3
votes
2 answers

NOT function using CPU12 processor

Is there a code in the CPU12 processor that provides straightforward NOT functionality?
2
votes
1 answer

Dissasemble 68xx code without entry point vector

I am trying to disassemble a code from a old radio containing a 68xx (68hc12 like) microcontroller. The problem is, I dont have the access to the interrupt vector of the micro in the top of the ROM, so I don't know where start to look. I only have…
2
votes
1 answer

How do you Interface HCS12 with bluetooth device?

I need some information about interfacing Bluetooth module to HSC12 board. I'm making a project with microcontroller (HSC12 freescale) and I want to interface it with Bluetooth device (bc417) . I am planning to use SCI0 port which has RXD on pin PS0…
Ammar
  • 1,203
  • 5
  • 27
  • 64
2
votes
1 answer

No copydown created for initialized object?

I'm using codewarrior to compile for the HC12, and I have two 120 element arrays: score and dur. I have initialized them in the typical fashion: unsigned int score[120] = { ... }; When I try to compile it, however, I get a linker error that says…
user702905
  • 71
  • 1
  • 4
2
votes
1 answer

Understanding bset and bclr

I've run across an example my professor made which made me question my understanding of the bset and bclr assembly commands. If I do this: bset BITS,80 am I performing an AND or an OR operation between the two? My reference guide says that bset…
user623990
1
vote
0 answers

Has anyone had experience with the Freescale HCS12 Flash Driver for EEPROM Emulation source code?

... and actually had it working, and changed the length of the data record to something larger than the 2 bytes that its demo comes with? It's a bunch of code to talk to the on-chip DFlash, emulating EEPROM pages, in the Freescale HCS12 range of…
RichColours
  • 670
  • 1
  • 4
  • 15
1
vote
0 answers

What is the code to print text into a new line on assembly code, on HCS12 microcontroller using CodeWarrior?

I need my output to be put in colons on the terminal but they always display in the first row. I need to implement a part of code (which I am trying to find out on YouTube but they are using different microprocessors and I am not very familiar with…
Bixo
  • 95
  • 10
1
vote
1 answer

why does my loop stop at 3, and reports an incorrect order

I'm working on a program that uses bubble sort in order to sort a defined array in descending order. My code seems to loop 3 times, creating an incorrect result as well too, before stopping. This is in HCS12 assembly language. RAMStart EQU …
Tuggs
  • 11
  • 2
1
vote
3 answers

Which Codewarrior version is needed for HCS08 and HCS12X under Windows 10?

I use Codewarrior - V4.7 for HCS12X - V6.3 for HCS08 in Windows XP. Moving CW to Windows 10 seems impossible. It won’t install, and dongle licensing does not work. I have tried to figure this out on the NXP site, but I find it extremely…
AndersJ
  • 411
  • 1
  • 3
  • 15
1
vote
0 answers

How to config a flexray node to send a 16 word payload?

Trying to edit Flexray_UNIFIED_cfg.c in Freescale NCV7383 demo (using CW5.1 and MC9S12XF512) to send bigger packets with different frame IDs to match my automotive target system. Any of youse guys ever grok flexray? Thanks.
1
vote
0 answers

Making a GPS on LCD screen Using C and ASSEMBLY

One of my concerns right now is making some assembly language subroutines which needs to be called from a C program in order to CountRoutes, FindRoutes or DisplayRoutes on a LCD Screen. For example this is the code in which i have the route…
1
vote
0 answers

Creating a Tree Using HCS12 Microcontroller Assembly Lang

I want to make an insertion to a binary search tree in HCS12 Microcontroller Assembly Language. I get the values first and they are in certain adresses. For example; let me assume that the numbers given are 5-3-8-9-1, respectively. And let me assume…
Aron Feller
  • 65
  • 1
  • 1
  • 9
1
2 3 4