Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | Re: Fw: HCS12 with non-multiplexed expand paged memory.

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Fw: HCS12 with non-multiplexed expand paged memory. - Andrew Lohmann's New Email Server - Feb 24 5:34:00 2003

Hi All,

Does anyone know if there will be a variant of HCS12 with non-multiplexed memory in the future? It seems to me that the only option is to use HC16, but this a little different, does not have so much flash and may be an unpopular choice.

I have used this controller and find the interrupt handling elegant and fast, but I wish to use a more popular part. As I fear it's now not widely supported. Andrew Lohmann AIIE
Design Engineer

Bellingham + Stanley Ltd.
Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England.
Tel: +44 (0) 1892 500400
Fax: +44 (0) 1892 543115
Website: www.bs-ltd.com
--- Email Disclaimer ---

Internet communications are not secure and therefore Bellingham + Stanley Ltd does
not accept legal responsibility for the contents of this message. Any views
or opinions presented are solely those of the author and do not necessarily
represent those of Bellingham + Stanley Ltd unless otherwise specifically stated.
If this message is received by anyone other than the addressee, please
notify the sender and then delete the message and any attachments from your
computer.

--- End --- [Non-text portions of this message have been removed]





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: Fw: HCS12 with non-multiplexed expand paged memory. - Stephen Trier - Feb 24 15:04:00 2003

At 10:34 AM 2/24/03 +0000, Andrew Lohmann <> wrote:
>Does anyone know if there will be a variant of HCS12 with non-multiplexed
>memory in the future?

Check out the 812A4. This is an older part that maxes out at 8 MHz.
It doesn't have any on-chip flash, but it is very easy to add external
flash. The built-in paging hardware can handle 4M of PPAGE code space
and 1M + 256K of additional paged memory.

The 812A4 board I'm working on puts a 2M flash chip in that PPAGE space.

Note, by the way, that although the 812A4 is specified to run to 8 MHz,
its bus specifications are hard to satisfy at that speed. If meeting the
timing specs is important to you, you may find yourself limited to 5 or
6 MHz. However, there have been several reports on the list of successful
systems that run at 8 MHz.

>It seems to me that the only option is to use HC16, but this a little
>different, does not have so much flash and may be an unpopular choice.

My lab used an HC16 and a pair of HC05s for a previous generation product.
The new design uses an 812A4 as the main CPU and 912B32s as I/O processors.

Stephen

--
Stephen Trier
Technical Development Lab
Cleveland FES Center / CWRU
/ KG8IH





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Fw: HCS12 with non-multiplexed expand paged memory. - Dick Webb - Feb 24 16:15:00 2003

on 2/24/03 3:04 PM, Stephen Trier at wrote: Check out the
812A4. This is an older part that maxes out at 8 MHz. It doesn't have any
on-chip flash, but it is very easy to add external flash. The built-in
paging hardware can handle 4M of PPAGE code space and 1M + 256K of
additional paged memory. The 812A4 board I'm working on puts a 2M flash chip
in that PPAGE space. Do you have any info on how you did this? I'm working on a board using the
812A4 and I'm trying to use the paged memory for code in ROM. I've set up a
jumper to route the program chip selects to RAM during development so I can
have the entire program plus data in RAM for debugging, then change the
jumper when I want to have the program in ROM for production.

Problem is, when I burn the ROMs, they don't boot. On the same board, if I
build a smaller program that fits in the 32K from $8000..$FFFF so it doesn't
use paging, the ROMs work.

I suspect that my problem revolves around the fact that the 2 lowest bits of
PPAGE replace A14 and A15 so the program needs to reside in a different
physical area than a non--paged program resides, but I don't know the best
way to accomodate this.

I'm using the IAR compiler. Their tech person has offered suggestions but
so far nothing works.

Many thanks if you (or anyone else out there) can help.

Dick
[Non-text portions of this message have been removed]





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Fw: HCS12 with non-multiplexed expand paged memory. - Author Unknown - Feb 24 16:55:00 2003

In a message dated 2/24/03 4:17:05 PM Eastern Standard Time,
writes:

> Many thanks if you (or anyone else out there) can help.
The Tech Arts 812DX schematics are on line, and there is an example of a
multiple page program in ICC12 there as well. My experience with the HC12A4
and paging is that it works great once you get the HC12Setup() subroutine
called at powerup right, and you get the compiler and linker options right. I
know for a fact that it does indee work.
[Non-text portions of this message have been removed]




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Fw: HCS12 with non-multiplexed expand paged memory. - Stephen Trier - Feb 24 17:15:00 2003

Dick,

The $8000-$BFFF range in non-paged mode is equivalent to page $FE in paged
mode. Your programs should work OK in paged mode if you load PPAGE with
$FE before you turn on paging by writing to WINDEF and MXAR.

It sounds like things work correctly when running out of RAM, which is
strange if the RAM is mapped to exactly the same PPAGE range as the ROM.
Is it?

The board I'm working on powers up in single-chip mode, then switches to
expanded mode under software control, so I haven't had to deal with quite
the same issues.

Stephen

--
Stephen Trier
Technical Development Lab
Cleveland FES Center / CWRU
/ KG8IH





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Metrowerks: What's the CASE? - Paul Johnson - Feb 24 19:11:00 2003

I wrote a snippet of code as follows:

switch(abc) {
case 0:
doZero();
break;
case 1:
break;
case 2:
doTwo();
break;
default:
doDefault();
break;
}

When compiled and run, only the default clause was executed, regardless of
the value of abc. I set a breakpoint in the debugger and checked the value
of abc to confirm this. (Note: I deliberately left case 1 empty, because I
didn't want anything to happen in this case).

So I changed the code to:

if (abc == 0)
doZero();
else if (abc = 2)
doTwo();
else if (abc > 2)
doDefault();

This compiled and ran fine.

Is there a compiler optimization that can create this problem with case
statements? I tried to follow the assembly output, but it is rather
"opimized" and I need to get the work out, not debug the compiler, so I
abandoned that. I am now leery of case statements in this compiler, which
is very troubling.

Anybody know what gives? I actually hope it is something stupid that I have
ignored/forgotten.

Thanks,

Paul Johnson
Lynx Robotics
8125 Lankershim Blvd.
North Hollywood, CA 91605
Voice: (818) 252-7890
FAX: (818) 252-7892





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Metrowerks: What's the CASE? - Author Unknown - Feb 24 19:18:00 2003

In a message dated 2/24/03 7:13:31 PM Eastern Standard Time,
writes:

> Anybody know what gives? I actually hope it is something stupid that I have
> ignored/forgotten. Send the whole program. One prob: abc=2 in the if example should be abc==2...
probably a typo, right? abc should be a char I think.... if its an int, maybe
its trying to do the switch on the hi byte, which is always 0..... ok, that's
my try at it..... over..... [Non-text portions of this message have been removed]




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Fw: HCS12 with non-multiplexed expand paged memory. - Andrew Lohmann's New Email Server - Feb 25 4:13:00 2003

Thanks for your various comments on non-multiplexed expanded memory variant
of HCS12.

I had discounted HC12A because it looked like it was on the way out. I am
working on a new design and have not purchased a C compiler yet, and
therefore would like to select a part which will do what I need for a long
time.

Another suggestion I had was look at Mitsubishi M16C, but HC12/16 is more
convenient because I have a lot of Hitachi HD6301 assembler code which is
similar to MC6801. Andrew Lohmann AIIE
Design Engineer

Bellingham + Stanley Ltd.
Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England.
Tel: +44 (0) 1892 500400
Fax: +44 (0) 1892 543115
Website: www.bs-ltd.com
----- Original Message -----
From: Dick Webb <>
To: <>
Sent: Monday, February 24, 2003 9:15 PM
Subject: Re: [68HC12] Fw: HCS12 with non-multiplexed expand paged memory. > on 2/24/03 3:04 PM, Stephen Trier at wrote: Check out the
> 812A4. This is an older part that maxes out at 8 MHz. It doesn't have any
> on-chip flash, but it is very easy to add external flash. The built-in
> paging hardware can handle 4M of PPAGE code space and 1M + 256K of
> additional paged memory. The 812A4 board I'm working on puts a 2M flash
chip
> in that PPAGE space. > Do you have any info on how you did this? I'm working on a board using the
> 812A4 and I'm trying to use the paged memory for code in ROM. I've set up
a
> jumper to route the program chip selects to RAM during development so I
can
> have the entire program plus data in RAM for debugging, then change the
> jumper when I want to have the program in ROM for production.
>
> Problem is, when I burn the ROMs, they don't boot. On the same board, if I
> build a smaller program that fits in the 32K from $8000..$FFFF so it
doesn't
> use paging, the ROMs work.
>
> I suspect that my problem revolves around the fact that the 2 lowest bits
of
> PPAGE replace A14 and A15 so the program needs to reside in a different
> physical area than a non--paged program resides, but I don't know the best
> way to accomodate this.
>
> I'm using the IAR compiler. Their tech person has offered suggestions but
> so far nothing works.
>
> Many thanks if you (or anyone else out there) can help.
>
> Dick >
> [Non-text portions of this message have been removed] >
> --------------------------------------------------------
> To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu >
>
> --- Email Disclaimer ---
>
> Internet communications are not secure and therefore Bellingham + Stanley
Ltd does
> not accept legal responsibility for the contents of this message. Any
views
> or opinions presented are solely those of the author and do not
necessarily
> represent those of Bellingham + Stanley Ltd unless otherwise specifically
stated.
> If this message is received by anyone other than the addressee, please
> notify the sender and then delete the message and any attachments from
your
> computer.
>
> --- End ---
--- Email Disclaimer ---

Internet communications are not secure and therefore Bellingham + Stanley Ltd does
not accept legal responsibility for the contents of this message. Any views
or opinions presented are solely those of the author and do not necessarily
represent those of Bellingham + Stanley Ltd unless otherwise specifically stated.
If this message is received by anyone other than the addressee, please
notify the sender and then delete the message and any attachments from your
computer.

--- End ---




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

RE: Metrowerks: What's the CASE? - Daniel Friederich - Feb 25 7:43:00 2003

Hi Paul,

I'm not aware of any compiler problems with switches. But I have to agree that stepping through them is hard. Especially the branch
tail mergings (to disable "-onb=t -onbt") and the branch optimizations ("-onb") do make the generated code step differently than you
would expect from the source. Disabling common code ("-onf") also helps. I don't see the problem in your snippet though.
Can you provide us a complete, compliable example of your problem? Best if with compiler version, used options and everything else
needed to reproduce it. If it is big, then please reply to me off list.

bye

Daniel
PS: In your workaround you missed one =. It should probably be "(abc == 2)" and not "(abc = 2)". > -----Original Message-----
> From: Paul Johnson [mailto:]
> Sent: Tuesday, February 25, 2003 1:11
> To:
> Subject: [68HC12] Metrowerks: What's the CASE? > I wrote a snippet of code as follows:
>
> switch(abc) {
> case 0:
> doZero();
> break;
> case 1:
> break;
> case 2:
> doTwo();
> break;
> default:
> doDefault();
> break;
> }
>
> When compiled and run, only the default clause was executed, regardless of
> the value of abc. I set a breakpoint in the debugger and checked the value
> of abc to confirm this. (Note: I deliberately left case 1 empty, because I
> didn't want anything to happen in this case).
>
> So I changed the code to:
>
> if (abc == 0)
> doZero();
> else if (abc = 2)
> doTwo();
> else if (abc > 2)
> doDefault();
>
> This compiled and ran fine.
>
> Is there a compiler optimization that can create this problem with case
> statements? I tried to follow the assembly output, but it is rather
> "opimized" and I need to get the work out, not debug the compiler, so I
> abandoned that. I am now leery of case statements in this compiler, which
> is very troubling.
>
> Anybody know what gives? I actually hope it is something stupid that I have
> ignored/forgotten.
>
> Thanks,
>
> Paul Johnson
> Lynx Robotics
> 8125 Lankershim Blvd.
> North Hollywood, CA 91605
> Voice: (818) 252-7890
> FAX: (818) 252-7892 >
> --------------------------------------------------------
> To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Metrowerks: What's the CASE? - s_spears_2000 - Feb 27 15:05:00 2003

I have run into the same problem using Imagecraft compiler. I too
didn't feel like debugging the compiler a whole lot but the little
experimenting I did made me think it has to do with type matching.

One in particular was reading in a character and doing a test like:

switch (char) {
case 'A':
got_an_a();
break;
case 'B':
etc.

The above didn't work for me but something like

if (char == 'A') got_an_a();

worked fine.

And finally, below did work...

switch (char) {
case 0x41: // changed to hex ascii value
got_an_a();
break; I'm sure there is a good explanation out there but its probably
over my head.

--- In , "Paul Johnson" <paul@l...> wrote:
> I wrote a snippet of code as follows:
>
> switch(abc) {
> case 0:
> doZero();
> break;
> case 1:
> break;
> case 2:
> doTwo();
> break;
> default:
> doDefault();
> break;
> }
>
> When compiled and run, only the default clause was executed,
regardless of
> the value of abc. I set a breakpoint in the debugger and checked
the value
> of abc to confirm this. (Note: I deliberately left case 1 empty,
because I
> didn't want anything to happen in this case).
>
> So I changed the code to:
>
> if (abc == 0)
> doZero();
> else if (abc = 2)
> doTwo();
> else if (abc > 2)
> doDefault();
>
> This compiled and ran fine.
>
> Is there a compiler optimization that can create this problem with
case
> statements? I tried to follow the assembly output, but it is rather
> "opimized" and I need to get the work out, not debug the compiler,
so I
> abandoned that. I am now leery of case statements in this
compiler, which
> is very troubling.
>
> Anybody know what gives? I actually hope it is something stupid
that I have
> ignored/forgotten.
>
> Thanks,
>
> Paul Johnson
> Lynx Robotics
> 8125 Lankershim Blvd.
> North Hollywood, CA 91605
> Voice: (818) 252-7890
> FAX: (818) 252-7892




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

RE: Re: Metrowerks: What's the CASE? - LaPointe, Dan -AES - Feb 28 7:10:00 2003

Try defining the variable in the switch statement as an INT instead of a
CHAR. I think that might take care of the problem.

Dan L.

-----Original Message-----
From: s_spears_2000 <>
[mailto:]
Sent: Thursday, February 27, 2003 3:05 PM
To:
Subject: [68HC12] Re: Metrowerks: What's the CASE? I have run into the same problem using Imagecraft compiler. I too
didn't feel like debugging the compiler a whole lot but the little
experimenting I did made me think it has to do with type matching.

One in particular was reading in a character and doing a test like:

switch (char) {
case 'A':
got_an_a();
break;
case 'B':
etc.

The above didn't work for me but something like

if (char == 'A') got_an_a();

worked fine.

And finally, below did work...

switch (char) {
case 0x41: // changed to hex ascii value
got_an_a();
break; I'm sure there is a good explanation out there but its probably
over my head.

--- In , "Paul Johnson" <paul@l...> wrote:
> I wrote a snippet of code as follows:
>
> switch(abc) {
> case 0:
> doZero();
> break;
> case 1:
> break;
> case 2:
> doTwo();
> break;
> default:
> doDefault();
> break;
> }
>
> When compiled and run, only the default clause was executed,
regardless of
> the value of abc. I set a breakpoint in the debugger and checked
the value
> of abc to confirm this. (Note: I deliberately left case 1 empty,
because I
> didn't want anything to happen in this case).
>
> So I changed the code to:
>
> if (abc == 0)
> doZero();
> else if (abc = 2)
> doTwo();
> else if (abc > 2)
> doDefault();
>
> This compiled and ran fine.
>
> Is there a compiler optimization that can create this problem with
case
> statements? I tried to follow the assembly output, but it is rather
> "opimized" and I need to get the work out, not debug the compiler,
so I
> abandoned that. I am now leery of case statements in this
compiler, which
> is very troubling.
>
> Anybody know what gives? I actually hope it is something stupid
that I have
> ignored/forgotten.
>
> Thanks,
>
> Paul Johnson
> Lynx Robotics
> 8125 Lankershim Blvd.
> North Hollywood, CA 91605
> Voice: (818) 252-7890
> FAX: (818) 252-7892
--------------------------------------------------------
To unsubscribe from this group, send an email to: To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu ************************************
If this email is not intended for you, or you are not responsible for the
delivery of this message to the addressee, please note that this message may
contain ITT Privileged/Proprietary Information. In such a case, you may not
copy or deliver this message to anyone. You should destroy this message and
kindly notify the sender by reply email. Information contained in this
message that does not relate to the business of ITT is neither endorsed by
nor attributable to ITT.
************************************




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )