MC68HC908QB8 problems

Discussion created by ROB LUND on Jun 6, 2006
Latest reply on Jun 7, 2006 by CrasyCat
When you want something to work in a timely fashion, it usually won't. Isn't that one of Murphy's Laws? :smileyhappy:

So I'm working on a MC68HC908QT4 project that uses the internal EEPROM routines and ran into a very strange bug. That drove me back to my DEMO QB8 board to try to debug it.

Problem #1

Well that in turn revealed a totally different bug. I'm unable to change the RAM on this known working demo board at the addresses: $EE-F4. I can't tell if this is because my program is locking up those addresses somehow (not even sure if that's possible), or what. The datasheet claims that $80-FF should be RAM. Beyond $F4 can be edited in the debugger.

Problem #2

Both CodeWarrior 3.1 and 5.0 are compiling the following lines of C bizarrely.

if (variable1 == CONSTANT1)
c60000 LDA variable1

if (variable2 == CONSTANT2)
c60000 LDA variable2

See the problem? Both are compiling as a LDA from memory address $0000. That's the PTA control register! How can both variable1 and variable2 be in the same spot? More importantly, they're not in the PTA! I'm confused.

One clarification: both variable1 and 2 are defined as enums. But that shouldn't be a problem, right?

Message Edited by irob on 06-05-2006 10:28 PM