Leandro Maia

HCS12 External Memony in Narrow Mode

Discussion created by Leandro Maia on Aug 27, 2007
Latest reply on Sep 19, 2007 by William Whyte

I'm  trying to change from Normal Single Chip to Normal Expanded Narrow but only data outs in External Bus, the address doesn't appear.

The code I use to change follow:

// Until here I'm in Normal Single Chip

      PEAR = 0x0C;   // LSTRB ? (Bit 3)
      EBICTL = 0x01; // ESTR
      MISC = 0x07;   // 1:1 Clock; $4000-7FFF; Internal Flash
      MODE =  0xA8;  // MOD CBA ; 0 ; Visivel ; 0 ; K ; E

// Try access external address

      for (;:smileywink:
        *((char *)0x4000) = a++;

Using a logic analyzer, the data appear in PORTA but nothing in PORTB. The address doesn't appear nether PORTB nor PORTA.

If you have a code that could help me, I would be grateful.


Leandro Maia