EmbeddedRelated.com
Forums

Ports and interupts overview

Started by Aaron Rosenberg October 16, 2005
I have to write a report on the ports and interrupts of the 68HC12 microcontroller and I'm fairly new to it. The book I have does not have enough detail for this report and I have tried for hours to find the information on the internet but cannot come up with a search phrase that brings me to the one website that has all this information in great detail. I was wondering if any members of this group have knowledge of such a site or can tell me everything there is to know about the ports and interrupts on the chip. I need to know what the ports are, how they work, what they are used for. For the interrupts I need to know what causes them, what are they used for, how the standard timer is involved in port communication. Any links or information is greatly appreciated. Thanks.

Hi Aaron ports are used to read data from input devices or write data
out to an output devices. Depending on the microcontroller a port has
few to many number of ports. Each port has 8-pins. so total I/O lines
can be from say 20 to hundreds something like that. Each port has data
direction register and also a data register. Need to set the data
direction register to define it as an input or output port. And u
write data to data register if its o/p port and read from data
register if i/p port.

Interrupts are like high priority calls to the controller. When ever
there is an interrupt the controller stops the work its doing and
services the interrupt call. Each interrupt has a service routine
which contains the tasks to carry out during that interrupt. So when
ever there is a interrupt controller starts executing the ISR.
Interrupts are many types. like Timers, external interrupts, Analog to
Digital interrupts, Serial communication interrupts

Hope this helps. For more info refer to this sites

http://homepages.wmich.edu/~grantner/ece451
http://www.ece.utexas.edu/%7Evalvano/

bye
Rama




Aaron,

You have a wide choice available.

For a lot of general information try Googling "HCS-12"

The parts are manufactures by Freescale Semiconductor, formerly the
Motorola Semiconductor Products Division.

You said "68HC12 microcontroller" but there are 3 major product families
that you might consider. They are currently called "HC-12", "HCS-12" and
"S12X" series.

The HC-12 parts begin with "MC68HC812" "MC68HC912" and go on to detail the
individual part.

The "HCS-12" parts begin with "MC9S12" and go on to detail the individual part.

The "S12X" parts begin with MC9S12X" and go on to detail the individual part.

For a simple, more or less typical HCS-12 part see:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12C32&nodeId62468636K100

For a general overview of all the HC-12 families see:
http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId62468636&tid=tmhb

For the fanciest member of the family, see:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12XDP512&nodeId62468636K100

Be warned, there are 1500 pages of documentation on the MC9S12XDP512. To
find out something about ports and interrupts, you don't need to read all
of them, but you'll have to read some of them.

To get detailed information on ports and interrupts, you will need to read
parts of the "datasheet" or the "device user's guide" and the "cpu manual".

Hope this helps,
Steve Russell
Nohau Emulators

At 01:44 PM 10/16/2005, "Aaron Rosenberg" <Aaron.Rosenberg@Aaro...> wrote:
>I have to write a report on the ports and interrupts of the 68HC12
>microcontroller and I'm fairly new to it. The book I have does not have
>enough detail for this report and I have tried for hours to find the
>information on the internet but cannot come up with a search phrase that
>brings me to the one website that has all this information in great
>detail. I was wondering if any members of this group have knowledge of
>such a site or can tell me everything there is to know about the ports and
>interrupts on the chip. I need to know what the ports are, how they work,
>what they are used for. For the interrupts I need to know what causes
>them, what are they used for, how the standard timer is involved in port
>communication. Any links or information is greatly appreciated. Thanks. >Yahoo! Groups Links >
>


*************************************************************************
Steve Russell mailto:stever@stev...
Senior Software Design Engineer http://www.nohau.com
Nohau phone: (408)866-1820 ext. 1873
fax: (408)378-7869
NEW mailing address:

275 E. Hacienda Ave.
Campbell, CA 95008
*************************************************************************


Hi Aaron,

The best place to get details for Freescale micros is from documents
that are freely available from their website (www.freescale.com).

Port details will vary slightly between HC12 derivatives. The following
gives the port details for the dp256 part:
http://www.freescale.com/files/microcontrollers/doc/ref_manual/S12DP256PIMV2.pdf

The following reference manual gives the exception processing model,
etc. for all HC12 micros:
http://www.freescale.com/files/microcontrollers/doc/ref_manual/S12CPUV2.pdf

Rob Milne

Aaron Rosenberg wrote:

> I have to write a report on the ports and interrupts of the 68HC12
> microcontroller and I'm fairly new to it. The book I have does not
> have enough detail for this report and I have tried for hours to find
> the information on the internet but cannot come up with a search
> phrase that brings me to the one website that has all this information
> in great detail. I was wondering if any members of this group have
> knowledge of such a site or can tell me everything there is to know
> about the ports and interrupts on the chip. I need to know what the
> ports are, how they work, what they are used for. For the interrupts I
> need to know what causes them, what are they used for, how the
> standard timer is involved in port communication. Any links or
> information is greatly appreciated. Thanks. >
> >. >
>


Thanks for all the help but I'm still missing answers (or rather detailed
answers) to the questions I have to answer in this paper. For example one of
the sources goes through a couple of ports like

4.2 Port T
This port is associated with the Enhanced Capture Timer module.
In all modes, port T pins PT[7:0] can be used for either general-purpose
I/O, or with the channels of the
Enhanced Capture Timer.
During reset, port T pins are configured as high-impedance inputs.

and in the book this is just listed as

Port T is used with the timing system and as a general-purpose I/O port.

What I need is something that explains what this timing system is, how this
port is used with it and the Enhanced Capture Timer, why this is done, and
for what purpose. The ideal site would have each port listed and all this
information underneath each one's name. Then it would talk about, for
example, how ports A and B work together with the timing interrupts, and
also what it means that ports A and B can be used to hold external address
line (which I don't know what that even means but I think it to have
something to do with accessing maybe an additional attached piece of RAM or
something that would be attached to A and B). It just seems like all these
web sites are a collection of links that only go to very general information
if to any useful information at all. I've been through countless pdf files
on freescale.com and still all I can find are basic descriptions and maybe a
memory map deep within these 400+ page files. Is there any where that takes
a paragraph approach to this topic and in detail explains what these ports
and interrupts do and what they are used for? Thanks so much for all your
help already.

- A ----- Original Message -----
From: "Steve Russell" <stever@stev...>
To: <68HC12@68HC...>
Sent: Sunday, October 16, 2005 9:13 PM
Subject: Re: [68HC12] Ports and interupts overview >
>
> Aaron,
>
> You have a wide choice available.
>
> For a lot of general information try Googling "HCS-12"
>
> The parts are manufactures by Freescale Semiconductor, formerly the
> Motorola Semiconductor Products Division.
>
> You said "68HC12 microcontroller" but there are 3 major product families
> that you might consider. They are currently called "HC-12", "HCS-12" and
> "S12X" series.
>
> The HC-12 parts begin with "MC68HC812" "MC68HC912" and go on to detail the
> individual part.
>
> The "HCS-12" parts begin with "MC9S12" and go on to detail the individual
> part.
>
> The "S12X" parts begin with MC9S12X" and go on to detail the individual
> part.
>
> For a simple, more or less typical HCS-12 part see:
> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12C32&nodeId62468636K100
>
> For a general overview of all the HC-12 families see:
> http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId62468636&tid=tmhb
>
> For the fanciest member of the family, see:
> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12XDP512&nodeId62468636K100
>
> Be warned, there are 1500 pages of documentation on the MC9S12XDP512. To
> find out something about ports and interrupts, you don't need to read all
> of them, but you'll have to read some of them.
>
> To get detailed information on ports and interrupts, you will need to read
> parts of the "datasheet" or the "device user's guide" and the "cpu
> manual".
>
> Hope this helps,
> Steve Russell
> Nohau Emulators
>
> At 01:44 PM 10/16/2005, "Aaron Rosenberg" <Aaron.Rosenberg@Aaro...>
> wrote:
>>I have to write a report on the ports and interrupts of the 68HC12
>>microcontroller and I'm fairly new to it. The book I have does not have
>>enough detail for this report and I have tried for hours to find the
>>information on the internet but cannot come up with a search phrase that
>>brings me to the one website that has all this information in great
>>detail. I was wondering if any members of this group have knowledge of
>>such a site or can tell me everything there is to know about the ports and
>>interrupts on the chip. I need to know what the ports are, how they work,
>>what they are used for. For the interrupts I need to know what causes
>>them, what are they used for, how the standard timer is involved in port
>>communication. Any links or information is greatly appreciated. Thanks.
>>
>>
>>
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
> > *************************************************************************
> Steve Russell mailto:stever@stev...
> Senior Software Design Engineer http://www.nohau.com
> Nohau phone: (408)866-1820 ext. 1873
> fax: (408)378-7869
> NEW mailing address:
>
> 275 E. Hacienda Ave.
> Campbell, CA 95008
> ************************************************************************* >
> Yahoo! Groups Links




I just found out which version of the chip the book, which is almost free of any in-depth detail, uses. It is the MC68HC812A4 if that helps.



Hi Aaron,

The only document that can address your needs is a general book on
microcontrollers in combination
with these specific documents. My starting point many years ago was
this book:

Single- and Multiple-Chip Microcomputer Interfacing
- G.J. Lipovski
- Copyright 1988
- 478 pages
- ISBN 0-13-810557-X (Prentice-Hall Edition
ISBN 0-13-810573-1 (Motorola Edition)

This book was based on the HC11 which is the direct predecessor of the HC12
(almost identical architecture). I'm sure that since 1988 there have been other
good introductory texts published. I don't believe there are many shortcuts
available to someone who needs to understand what a port is and does without
some hard slogging throught the requisite basic readings.

Rob Milne
Aaron Rosenberg wrote:

> Thanks for all the help but I'm still missing answers (or rather detailed
> answers) to the questions I have to answer in this paper. For example
> one of
> the sources goes through a couple of ports like
>
> 4.2 Port T
> This port is associated with the Enhanced Capture Timer module.
> In all modes, port T pins PT[7:0] can be used for either general-purpose
> I/O, or with the channels of the
> Enhanced Capture Timer.
> During reset, port T pins are configured as high-impedance inputs.
>
> and in the book this is just listed as
>
> Port T is used with the timing system and as a general-purpose I/O port.
>
> What I need is something that explains what this timing system is, how
> this
> port is used with it and the Enhanced Capture Timer, why this is done,
> and
> for what purpose. The ideal site would have each port listed and all this
> information underneath each one's name. Then it would talk about, for
> example, how ports A and B work together with the timing interrupts, and
> also what it means that ports A and B can be used to hold external
> address
> line (which I don't know what that even means but I think it to have
> something to do with accessing maybe an additional attached piece of
> RAM or
> something that would be attached to A and B). It just seems like all
> these
> web sites are a collection of links that only go to very general
> information
> if to any useful information at all. I've been through countless pdf
> files
> on freescale.com and still all I can find are basic descriptions and
> maybe a
> memory map deep within these 400+ page files. Is there any where that
> takes
> a paragraph approach to this topic and in detail explains what these
> ports
> and interrupts do and what they are used for? Thanks so much for all your
> help already.
>
> - A > ----- Original Message -----
> From: "Steve Russell" <stever@stev...>
> To: <68HC12@68HC...>
> Sent: Sunday, October 16, 2005 9:13 PM
> Subject: Re: [68HC12] Ports and interupts overview > >
> >
> > Aaron,
> >
> > You have a wide choice available.
> >
> > For a lot of general information try Googling "HCS-12"
> >
> > The parts are manufactures by Freescale Semiconductor, formerly the
> > Motorola Semiconductor Products Division.
> >
> > You said "68HC12 microcontroller" but there are 3 major product families
> > that you might consider. They are currently called "HC-12",
> "HCS-12" and
> > "S12X" series.
> >
> > The HC-12 parts begin with "MC68HC812" "MC68HC912" and go on to
> detail the
> > individual part.
> >
> > The "HCS-12" parts begin with "MC9S12" and go on to detail the
> individual
> > part.
> >
> > The "S12X" parts begin with MC9S12X" and go on to detail the individual
> > part.
> >
> > For a simple, more or less typical HCS-12 part see:
> >
> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12C32&nodeId62468636K100
> <http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12C32&nodeId62468636K100>
> >
> > For a general overview of all the HC-12 families see:
> >
> http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId62468636&tid=tmhb
> <http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId62468636&tid=tmhb>
> >
> > For the fanciest member of the family, see:
> >
> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12XDP512&nodeId62468636K100
> <http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12XDP512&nodeId62468636K100>
> >
> > Be warned, there are 1500 pages of documentation on the
> MC9S12XDP512. To
> > find out something about ports and interrupts, you don't need to
> read all
> > of them, but you'll have to read some of them.
> >
> > To get detailed information on ports and interrupts, you will need
> to read
> > parts of the "datasheet" or the "device user's guide" and the "cpu
> > manual".
> >
> > Hope this helps,
> > Steve Russell
> > Nohau Emulators
> >
> > At 01:44 PM 10/16/2005, "Aaron Rosenberg" <Aaron.Rosenberg@Aaro...>
> > wrote:
> >>I have to write a report on the ports and interrupts of the 68HC12
> >>microcontroller and I'm fairly new to it. The book I have does not have
> >>enough detail for this report and I have tried for hours to find the
> >>information on the internet but cannot come up with a search phrase that
> >>brings me to the one website that has all this information in great
> >>detail. I was wondering if any members of this group have knowledge of
> >>such a site or can tell me everything there is to know about the
> ports and
> >>interrupts on the chip. I need to know what the ports are, how they
> work,
> >>what they are used for. For the interrupts I need to know what causes
> >>them, what are they used for, how the standard timer is involved in port
> >>communication. Any links or information is greatly appreciated. Thanks.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>>. >
>


I can only speak for HCS12, sence I haven't used the other derivates.
However, they should be rather similar:

First of all, someone posted a link to the "Port Integration Module"
(PIM), which is only one part of the HC12 general purpose I/O. Ports
A, B, E and K are found in the "Multiplexed External Bus Interface"
(MEBI). These ports don't have interrupt/keyboard wakeup
functionality, and there are other differences as well.

More or less every pin on the MCU has got more than one function,
depending on what you activate. If you for example activate the timer,
it will have precedence over the GPIO functionality of port T, and if
you wish, it will take over the control of the pin. Sence the timer
has got higher priority than the GPIO, all settings in the PORTT
registers will be ignored, as explained in the PIM-manual. So the port
T pins will either be controlled by the timer or by the GPIO, but not
by both at once.

You should clarify if you are going to write a paper about the general
purpose I/O ports, or about every possible pin functionality of the
MCU.

For a good overview over the MCU ports, check figure 1.1 in the Device
User Guide for HCS12. --- In 68HC12@68HC..., "Aaron Rosenberg" <Aaron.Rosenberg@t...
> wrote:
>
> Thanks for all the help but I'm still missing answers (or rather
detailed
> answers) to the questions I have to answer in this paper. For
example one of
> the sources goes through a couple of ports like
>
> 4.2 Port T
> This port is associated with the Enhanced Capture Timer module.
> In all modes, port T pins PT[7:0] can be used for either general-
purpose
> I/O, or with the channels of the
> Enhanced Capture Timer.
> During reset, port T pins are configured as high-impedance inputs.
>
> and in the book this is just listed as
>
> Port T is used with the timing system and as a general-purpose I/O
port.
>
> What I need is something that explains what this timing system is,
how this
> port is used with it and the Enhanced Capture Timer, why this is
done, and
> for what purpose. The ideal site would have each port listed and all
this
> information underneath each one's name. Then it would talk about,
for
> example, how ports A and B work together with the timing interrupts,
and
> also what it means that ports A and B can be used to hold external
address
> line (which I don't know what that even means but I think it to have
> something to do with accessing maybe an additional attached piece of
RAM or
> something that would be attached to A and B). It just seems like all
these
> web sites are a collection of links that only go to very general
information
> if to any useful information at all. I've been through countless pdf
files
> on freescale.com and still all I can find are basic descriptions and
maybe a
> memory map deep within these 400+ page files. Is there any where
that takes
> a paragraph approach to this topic and in detail explains what these
ports
> and interrupts do and what they are used for? Thanks so much for all
your
> help already.
>
> - A > ----- Original Message -----
> From: "Steve Russell" <stever@n...>
> To: <68HC12@68HC...>
> Sent: Sunday, October 16, 2005 9:13 PM
> Subject: Re: [68HC12] Ports and interupts overview > >
> >
> > Aaron,
> >
> > You have a wide choice available.
> >
> > For a lot of general information try Googling "HCS-12"
> >
> > The parts are manufactures by Freescale Semiconductor, formerly
the
> > Motorola Semiconductor Products Division.
> >
> > You said "68HC12 microcontroller" but there are 3 major product
families
> > that you might consider. They are currently called "HC-12", "HCS-
12" and
> > "S12X" series.
> >
> > The HC-12 parts begin with "MC68HC812" "MC68HC912" and go on to
detail the
> > individual part.
> >
> > The "HCS-12" parts begin with "MC9S12" and go on to detail the
individual
> > part.
> >
> > The "S12X" parts begin with MC9S12X" and go on to detail the
individual
> > part.
> >
> > For a simple, more or less typical HCS-12 part see:
> > http://www.freescale.com/webapp/sps/site/prod_summary.jsp?
code=MC9S12C32&nodeId62468636K100
> >
> > For a general overview of all the HC-12 families see:
> > http://www.freescale.com/webapp/sps/site/homepage.jsp?
nodeId62468636&tid=tmhb
> >
> > For the fanciest member of the family, see:
> > http://www.freescale.com/webapp/sps/site/prod_summary.jsp?
code=MC9S12XDP512&nodeId62468636K100
> >
> > Be warned, there are 1500 pages of documentation on the
MC9S12XDP512. To
> > find out something about ports and interrupts, you don't need to
read all
> > of them, but you'll have to read some of them.
> >
> > To get detailed information on ports and interrupts, you will need
to read
> > parts of the "datasheet" or the "device user's guide" and the "cpu
> > manual".
> >
> > Hope this helps,
> > Steve Russell
> > Nohau Emulators
> >
> > At 01:44 PM 10/16/2005, "Aaron Rosenberg" <Aaron.Rosenberg@t...>
> > wrote:
> >>I have to write a report on the ports and interrupts of the 68HC12
> >>microcontroller and I'm fairly new to it. The book I have does not
have
> >>enough detail for this report and I have tried for hours to find
the
> >>information on the internet but cannot come up with a search
phrase that
> >>brings me to the one website that has all this information in
great
> >>detail. I was wondering if any members of this group have
knowledge of
> >>such a site or can tell me everything there is to know about the
ports and
> >>interrupts on the chip. I need to know what the ports are, how
they work,
> >>what they are used for. For the interrupts I need to know what
causes
> >>them, what are they used for, how the standard timer is involved
in port
> >>communication. Any links or information is greatly appreciated.
Thanks.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >
> >
> >
**********************************************************************
***
> > Steve Russell mailto:stever@n.
..
> > Senior Software Design Engineer http://www.
nohau.com
> > Nohau phone: (408)866-1820
ext. 1873
> > fax: (408)
378-7869
> > NEW mailing address:
> >
> > 275 E. Hacienda Ave.
> > Campbell, CA 95008
> >
**********************************************************************
***
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>




Aaron:

The "Data Sheet" for the 68HC812A4 is at:
http://www.freescale.com/files/microcontrollers/doc/data_sheet/MC68HC812A4.pdf

You will need to read the first 4 sections, and probably the subsections on
registers for the individual modules.

The timer referred to is likely the "Standard Timer Module".

Steve Russell
Nohau Emulators At 07:37 PM 10/16/2005, "Aaron Rosenberg" <Aaron.Rosenberg@Aaro...> wrote:
>I just found out which version of the chip the book, which is almost free
>of any in-depth detail, uses. It is the MC68HC812A4 if that helps. >
>
>Yahoo! Groups Links >
>