Questions tagged [68hc11]

The 68HC11 (6811 or HC11 for short) is an 8-bit microcontroller (µC) family introduced by Motorola

The 68HC11 (6811 or HC11 for short) is an 8-bit CISC microcontroller (µC) family introduced by Motorola in 1985, and it is now produced by Freescale Semiconductor. It's a descendant from the Motorola 6800 microprocessor.

Microcontrollers of this family are used in barcode readers, hotel card key writers, amateur robotics, and various other embedded systems.

38 questions
8
votes
1 answer

Getting GCC to optimize hand assembly

In an attempt to make GCC not generate a load-modify-store operation every time I do |= or &=, I have defined the following macros: #define bset(base, offset, mask) bmanip(set, base, offset, mask) #define bclr(base, offset, mask) bmanip(clr, base,…
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
4
votes
1 answer

GCC toolchain for 68HC12/68HC12X

I wonder if anyone is using GCC as production stable toolchain for Freescale's 68HC12 microcontroller family. It seems to me that there aren't up-to-date toolchains other than that from Freescale itself and those from Cosmic Software…
lorcap
  • 173
  • 2
  • 8
4
votes
0 answers

How to override/remove CMake's C Compiler Flags

I have a CMakeLists.txt file and am compiling a firmware program with the GCC 68HC11 C compiler. The issue is that CMake is appending the "-E" compiler flag at the end which I don't want. The other appended flags "-v" "-dD" and '-D___CIDR..." are…
dodgy_coder
  • 12,407
  • 10
  • 54
  • 67
4
votes
0 answers

Constraints for indexed addressing

(This is a followup from "Getting GCC to optimize hand assembly") I've been trying to get GCC (3.3.6-m68hc1x-20060122) to emit bset and bclr assembly instructions using indexed addressing, but no set of constraints I use seems to work. The…
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
2
votes
2 answers

How can I find and change a variable in an embedded Forth controller?

In repairing an instrument cluster, I need to replace a controller which is built on an Motorola MC68HC11 using Forth. While I was able to dump the whole memory, it is unknown which Forth is used and the available words seem very limited. How does…
Riley
  • 359
  • 2
  • 11
2
votes
1 answer

Counting number (HC11)

I'm still playing with this MC Now i want to count positive/negative numbers and 0's in a given array. In c, i did something like this and it worked perfectly: int A[15], pos, neg, nul, i; [...] pos = 0; neg = 0; nul = 0; for for (i = 0; i < 15;…
JustToKnow
  • 785
  • 6
  • 23
2
votes
1 answer

Swapping positions (HC11)

I'm just playing with my MC 68HC11; in C i can perform a simple byte swap by doing something like this: swapped = ((num>>24)&0xff) | // move byte 3 to byte 0 ((num<<8)&0xff0000) | // move byte 1 to byte 2 …
JustToKnow
  • 785
  • 6
  • 23
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
2 answers

Address 0 being overwritten by NULL pointer on HCS08

On my 8-bit Freescale HCS08 micro, whenever I call a library function that returns values to pointers I pass it, and I don't really want them, I threw in a NULL, e.g. UART_SendBlock((char *)txstr, strlen(txstr), NULL); The type of the last argument…
Nick T
  • 25,754
  • 12
  • 83
  • 121
2
votes
3 answers

Assembly code for 68HC11 to calculate sin(x)

What would be the assembly code for 68HC11 to calculate value of sine using either Taylor series or a lookup table? Display value will be only in integer. How would a lookup table work in this case? How can it be implemented using Taylor series?
Digonto
  • 25
  • 1
  • 5
2
votes
1 answer

Write assembler directives to build a table to hold the ASCII codes of the capital letters A-Z

Write assembler directives to build a table to hold the ASCII codes of the capital letters A-Z. The table should be store in the memory locations $00 to $19? (68HC11) I think the response would be like, can you tell if my response is correct? and if…
user43680
  • 33
  • 6
2
votes
0 answers

Freescale CodeWarrior : Register watchpoint on HCS08

I need to break the debugging when I-bit of SR (global interrupt mask) changes it's state. Freescale CodeWarrior 6.1 MCU: HCS08
THX-1138
  • 21,316
  • 26
  • 96
  • 160
1
vote
1 answer

How do i store the contents of a register, to an address specified by a variable in memory?

The title is basically it. I have lights that i need to switch on and off. There is a button that dictates which light it should be. So when the button is pressed or not pressed, i modify a variable that contains the PORT address of that light. To…
Vitalie
  • 59
  • 4
1
vote
0 answers

Is there a way to prevent a looping illegal opcode interrupt in the 68HC11?

I'm working on a legacy design that makes use of the MC68HC11E1 (originally the MC68HC11A1) series micro. It's used in extended mode with an external EPROM for program memory and an external NVRAM for additional program memory, stored data, stack…
Adam
  • 11
  • 2
1
vote
1 answer

Interrupts IQR and XIRQ - assembly

I've been struggling with a topic related to IRQ (interrupts itself); i'm using an old MC68HC11 Been practicing for a while; i decided to move on and check the hardest exercises showed in this chapter that's why i found an interesting one (and a…
JustToKnow
  • 785
  • 6
  • 23
1
2 3