Using the 9S12 external bus for LCD module

Started by multiplexeon February 3, 2005

Hello Everyone,

I would like to use the external bus interface on the 9S12 (9S12DT128)
to control an LCD module while maintaining the use of the internal
flash to hold program code. I am somewhat new to this particular
microcontroller, but not new to the instruction set or memory map.

I am using Codewarrier and Processor Expert. I would like to be able
to use the BDM port while in development.

I currently have memory mapped the LCD module to Hex 4000 in the 9S12
memory map, but I have not even been able to toggle the address/data
lines on the external bus I and read/write to/from a ports, use the
timer/interrupts etc. but can't address the external bus.

Does anyone have any suggestion for a way to use an LCD module this way?

Thank you in advance,
Tracy


Look in the archives of this list for the subject "Looking for 9S12DP256B
users" in the last few days.

MC9S12xxx family memory interfacing has hard to meet timing specs. As the
LCD isn't very time critical, you should consider interfacing it to general
purpose IO pins and controlling the transfer in software.

If you must use the external memory bus, see Doron Fael's 8/2/2004 post on
"Expanded RAM". There is also much more material in the archive posted
earlier than this.

See also:
http://www.nohau.com/appnotes/hcs12-expanded-mode-guide.pdf

Hope this helps.

Steve Russell
Nohau Emulators.

At 04:10 PM 2/2/2005, "multiplexeon" <> wrote:
>Hello Everyone,
>
>I would like to use the external bus interface on the 9S12 (9S12DT128)
>to control an LCD module while maintaining the use of the internal
>flash to hold program code. I am somewhat new to this particular
>microcontroller, but not new to the instruction set or memory map.
>
>I am using Codewarrier and Processor Expert. I would like to be able
>to use the BDM port while in development.
>
>I currently have memory mapped the LCD module to Hex 4000 in the 9S12
>memory map, but I have not even been able to toggle the address/data
>lines on the external bus I and read/write to/from a ports, use the
>timer/interrupts etc. but can't address the external bus.
>
>Does anyone have any suggestion for a way to use an LCD module this way?
>
>Thank you in advance,
>Tracy




Hi,

This is a partial answer to your query as I have not used a 9S12DT128.

Is your processor coming out of reset in expanded mode?

Be very careful when using LCD modules on external buses. Typical 16 char x 2 line modules (or similar) are slow devices and are not suitable to drive directly off high speed processor buses unless an adequate number of wait states are inserted. This was not generally a problem with the slower 2-8MHz type microcontrollers but can be on higher speed devices. Too high a speed and the device simply won't work. In a border line case you will find characters go missing.

Regards

ENG PI multiplexeon <> wrote:

Hello Everyone,

I would like to use the external bus interface on the 9S12 (9S12DT128)
to control an LCD module while maintaining the use of the internal
flash to hold program code. I am somewhat new to this particular
microcontroller, but not new to the instruction set or memory map.

I am using Codewarrier and Processor Expert. I would like to be able
to use the BDM port while in development.

I currently have memory mapped the LCD module to Hex 4000 in the 9S12
memory map, but I have not even been able to toggle the address/data
lines on the external bus I and read/write to/from a ports, use the
timer/interrupts etc. but can't address the external bus.

Does anyone have any suggestion for a way to use an LCD module this way?

Thank you in advance,
Tracy
---------------------------------
Yahoo! Groups Links

To
---------------------------------


The S12X which will have a general release in the middle of the year will
have a much improved external bus if you can wait till then.

Best regards
Jim
www.freegeeks.net

----- Original Message -----
From: "Steve Russell" <>
To: <>
Sent: Thursday, February 03, 2005 12:41 AM
Subject: Re: [68HC12] Using the 9S12 external bus for LCD module
Look in the archives of this list for the subject "Looking for 9S12DP256B
users" in the last few days.

MC9S12xxx family memory interfacing has hard to meet timing specs. As the
LCD isn't very time critical, you should consider interfacing it to general
purpose IO pins and controlling the transfer in software.

If you must use the external memory bus, see Doron Fael's 8/2/2004 post on
"Expanded RAM". There is also much more material in the archive posted
earlier than this.

See also:
http://www.nohau.com/appnotes/hcs12-expanded-mode-guide.pdf

Hope this helps.

Steve Russell
Nohau Emulators.

At 04:10 PM 2/2/2005, "multiplexeon" <> wrote:
>Hello Everyone,
>
>I would like to use the external bus interface on the 9S12 (9S12DT128)
>to control an LCD module while maintaining the use of the internal
>flash to hold program code. I am somewhat new to this particular
>microcontroller, but not new to the instruction set or memory map.
>
>I am using Codewarrier and Processor Expert. I would like to be able
>to use the BDM port while in development.
>
>I currently have memory mapped the LCD module to Hex 4000 in the 9S12
>memory map, but I have not even been able to toggle the address/data
>lines on the external bus I and read/write to/from a ports, use the
>timer/interrupts etc. but can't address the external bus.
>
>Does anyone have any suggestion for a way to use an LCD module this way?
>
>Thank you in advance,
>Tracy

Yahoo! Groups Links



Hello

I saw the schematic recently for an automotive module using a S12
derivative and it had a couple of special 8 bit peripheral IC's attached
to it. That's all I can say about it....but...

This module is made by a really big Tier 1 supplier and I asked how they
accesed these devices and they said by bit banging the I/O ports. They
were aware of the issues regarding the external bus of the S12. They will
be making gazillions of these modules. This is how they solved the issue.
So, I guess this is a good validation of bit banging. The module works
fine as far as I know.

Then Motorola (now Freescale) purposely made the address and data bus weak
in order to save space on the chip. Since the S12 family was designed
exclusively for single chip automotive designs - the only people needing
these busses are the emulator people. Else they probably could have been
left off completely. The big customers demand full emulators because of
the large engineering productivity gains they provide over BDMs or
simulators.

Don't forget that the more chips they can squeeze on to a wafer the more
money they make in this very, very competitive automotive field. That is
their motivation.

I think Freescale were a bit surprised at the popularity of the new S12
parts for the general market (they shouldn't have been) and this may
explain why they reversed their position on the busses for the S12X parts.

I would pay close attention to Doron Fael's document on this subject and
also the Freescale app note. Doron has a lot of experience with the S12
bus and some of it was quite painful.

Bob Boys
Pasadena >


Hello Everyone,

I would like to use the external bus interface on the 9S12 (9S12DT128)
to control an LCD module while maintaining the use of the internal
flash to hold program code. I am somewhat new to this particular
microcontroller, but not new to the instruction set or memory map.

I am using Codewarrier and Processor Expert. I would like to be able
to use the BDM port while in development.

I currently have memory mapped the LCD module to Hex 4000 in the 9S12
memory map, but I have not even been able to toggle the address/data
lines on the external bus I and read/write to/from a ports, use the
timer/interrupts etc. but can't address the external bus.




Tracy,

Just drive the LCD using the ports, LCDs are very slow
devices anyway as others have said. Place the data on
a port and toggle the R/S, R/W, E lines in software.

Darren Moore > -----Original Message-----
> From: multiplexeon [mailto:] >
> Hello Everyone,
>
> I would like to use the external bus interface on the 9S12 (9S12DT128)
> to control an LCD module while maintaining the use of the internal
> flash to hold program code. I am somewhat new to this particular
> microcontroller, but not new to the instruction set or memory map.
>
> I am using Codewarrier and Processor Expert. I would like to be able
> to use the BDM port while in development.
>
> I currently have memory mapped the LCD module to Hex 4000 in the 9S12
> memory map, but I have not even been able to toggle the address/data
> lines on the external bus - I and read/write to/from a ports, use the
> timer/interrupts etc. but can't address the external bus.
>
> Does anyone have any suggestion for a way to use an LCD
> module this way?
>
> Thank you in advance,
> Tracy





Thanks to Everyone for your collective recommendation. It's not what I
wanted to hear but there are certain advantages in using the chip in
its native mode without trying to push the limits of timing and in the
end sacrificing usability overall.

Your help is much appreciated,
Tracy

--- In , "multiplexeon" <tjohns21@a...> wrote:
>
> Hello Everyone,
>
> I would like to use the external bus interface on the 9S12 (9S12DT128)
> to control an LCD module while maintaining the use of the internal
> flash to hold program code. I am somewhat new to this particular
> microcontroller, but not new to the instruction set or memory map.
>
> I am using Codewarrier and Processor Expert. I would like to be able
> to use the BDM port while in development.
>
> I currently have memory mapped the LCD module to Hex 4000 in the 9S12
> memory map, but I have not even been able to toggle the address/data
> lines on the external bus I and read/write to/from a ports, use the
> timer/interrupts etc. but can't address the external bus.
>
> Does anyone have any suggestion for a way to use an LCD module this way?
>
> Thank you in advance,
> Tracy




Slow down the clock speed... That would help the timing a bit, but
lose other advantage. Other than timing, I think it should work with
the right interface. --- In , "multiplexeon" <tjohns21@a...> wrote:
>
> Thanks to Everyone for your collective recommendation. It's not what I
> wanted to hear but there are certain advantages in using the chip in
> its native mode without trying to push the limits of timing and in the
> end sacrificing usability overall.
>
> Your help is much appreciated,
> Tracy >
>
> --- In , "multiplexeon" <tjohns21@a...> wrote:
> >
> > Hello Everyone,
> >
> > I would like to use the external bus interface on the 9S12 (9S12DT128)
> > to control an LCD module while maintaining the use of the internal
> > flash to hold program code. I am somewhat new to this particular
> > microcontroller, but not new to the instruction set or memory map.
> >
> > I am using Codewarrier and Processor Expert. I would like to be able
> > to use the BDM port while in development.
> >
> > I currently have memory mapped the LCD module to Hex 4000 in the 9S12
> > memory map, but I have not even been able to toggle the address/data
> > lines on the external bus I and read/write to/from a ports, use the
> > timer/interrupts etc. but can't address the external bus.
> >
> > Does anyone have any suggestion for a way to use an LCD module
this way?
> >
> > Thank you in advance,
> > Tracy