EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Interrupts

Started by nathan_b_a July 7, 2005
Gordon Couger wrote:

>Mike,
>
>I gave him all the options I could think of including loading the the
>assembly code in the 512 bytes of EEPROM on the chip with HCLOAD. Which
>is more than anyone else I have seen thought of. >
I don't want to get into a flame war, but my point is that you *haven't*
seen very
much. I'm not trying to sound like anyone is ungrateful for your attempt
to help.
I am suggesting that you try to get more context next time.

I pointed out to him that he could put his program into the on-board
EEPROM at $B600, myself.

>New Micros has shipped boards all over the world for me. The cost of
>shipping to OZ is not that much.
I think that his project is already over-designed. All he really needs is a
debounce circuit, a counter, a decoder, and some transistors to drive
the relays. An $80 USD (what I paid for my New Micros NMIY020)
uController board is, IMO, way over the top. I'm sure there are firms
in Australia which supply small '11 boards.

In any case, I think his project has some problems. He wants to connect
a microswitch to an interrupt. A dry contact to an interrupt. How well
do you think this will work?

Mike

--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!



On Jul 8, 2005, at 1:36 PM, Mike McCarty wrote:

> In any case, I think his project has some problems. He wants to
> connect
> a microswitch to an interrupt. A dry contact to an interrupt. How well
> do you think this will work?

The first closure and a couple of bounces will work great! He only
has to be aware of the prospect of bounces and handle them
appropriately.

An hourly interrupt on a CPU which doesn't have anything else to do
isn't quite standard practice. But if the CPU powers itself down
between inputs then the input needs to be on an IRQ to wake the
sleepy head.

--
David Kelly N4HHE, dkelly@dkel...
========================================================================
Whom computers would destroy, they must first drive mad.



On Jul 8, 2005, at 8:33 AM, Mike McCarty wrote:

>> So, because I am reasonable familiar with the 68HC11 and its
>> assembly language, I thought I would use it.
>
> This project doesn't even seem like it needs a uController, just a
> counter and a decoder.

Sounds a lot to me as if Nathan doesn't have any hardware at all
yet. Based on his brief description of the task I suspect acquiring
hardware will be by far the hardest task he is facing.

I second others' suggestion that you rethink your CPU selection.
Rather than use one you are briefly familiar with you could learn
enough to use something different with less effort than you can
acquire an HC11 and load your code into it.

Contact your nearest Freescale distributor. Tell them you are a
student and this is a non-class project that you are motivated to
undertake. As if they have anything cheap and/or free that you
could use. I'm guessing one of the $50 to $100 HC08 demo boards is
laying around slightly used that you could have for the asking.
Most of these only require an RS-232 serial cable to upload your
code, run, and debug on real hardware. Assembly is very similar to
the HC11. The free Metrowerks C compiler is more than enough for
your project. Would need Metrowerks even for assembly. Load your
code and test, pull the cable and you have real running hardware.

Microchip has similar offerings. Assembly on the PIC is unlike
anything you've seen before.

Atmel has a "Butterfly" board which is $19.95 from Digikey. Has an
LCD display and interesting assortment of prewired I/O.

It needs an external JTAG ICE (or ISP) to load/debug code. $40 for
"ICE-cube" from http://ecrostech.com/ . The $3 "10-way Ribbon
Cable, 12 in." really helps connect the ICE-Cube in tight places.

Also because the Butterfly is quite minimal you need something to
hold it to make connections:
http://ecrostech.com/Products/Butterfly/Intro.htm, $9 for bare PCB
or $19 for complete parts kit.

WinAVR is a packaged bundle of GNU tools for the AVR on Windows.
Highly recommended for the AVR if you are running Windows.

--
David Kelly N4HHE, dkelly@dkel...
========================================================================
Whom computers would destroy, they must first drive mad.


David Kelly wrote:

>On Jul 8, 2005, at 1:36 PM, Mike McCarty wrote: >
>>In any case, I think his project has some problems. He wants to
>>connect
>>a microswitch to an interrupt. A dry contact to an interrupt. How well
>>do you think this will work?
>>
>>
>
>The first closure and a couple of bounces will work great! He only
>has to be aware of the prospect of bounces and handle them
>appropriately.
I think this guy is pretty naive, actually. I made some remarks about
needing
debounce either in hardware or software, and he hasn't responded.

>An hourly interrupt on a CPU which doesn't have anything else to do
>isn't quite standard practice. But if the CPU powers itself down
>between inputs then the input needs to be on an IRQ to wake the
>sleepy head.
Yes, he could use WAI. Of course, some mask sets have prolems with
that instruction. Or even STOP, which is lower power.

Mike

--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!


On Fri, 2005-07-08 at 13:36 -0500, Mike McCarty wrote:
> I think that his project is already over-designed. All he really needs is a
> debounce circuit, a counter, a decoder, and some transistors to drive
> the relays. An $80 USD (what I paid for my New Micros NMIY020)
> uController board is, IMO, way over the top. I'm sure there are firms
> in Australia which supply small '11 boards.

I tend to agree. Unless he wishes to actually keep time with the
board, for which he basically needs a RTC chip and 32,768 crystal (and -
even if he does), I would suggest a (fairly) local phone call to
Microzed about a PICAXE dev board (i.e., totally unrelated to 68HC11),
and either a little drive up to the Entrance (Wyong), or a mail order,
and easy-to-use hardware with no shortage of support will be on hand
pretty cheap!

http://www.microzed.com.au/MICROZED/ORDERING.htm --
Cheers,
Paul B.


On Fri, 2005-07-08 at 02:00 -0700, nathan apps wrote:

> The only reason I wanted to use the 68HC11 was because I just spent a semester
> at university learning about computer hardware.

Uni? HC11? Not perchance NSW, or UTS?

--
Cheers,
Paul B.


Hi Paul

I just had a look at the PICAXE site, I think this would be perfect. Have any of the other members used the PICAXE microcontrollers?

Macquarie University

Nathan

"Paul B. Webster VK2BZC" <paulb@paul...> wrote:
On Fri, 2005-07-08 at 13:36 -0500, Mike McCarty wrote:
> I think that his project is already over-designed. All he really needs is a
> debounce circuit, a counter, a decoder, and some transistors to drive
> the relays. An $80 USD (what I paid for my New Micros NMIY020)
> uController board is, IMO, way over the top. I'm sure there are firms
> in Australia which supply small '11 boards.

I tend to agree. Unless he wishes to actually keep time with the
board, for which he basically needs a RTC chip and 32,768 crystal (and -
even if he does), I would suggest a (fairly) local phone call to
Microzed about a PICAXE dev board (i.e., totally unrelated to 68HC11),
and either a little drive up to the Entrance (Wyong), or a mail order,
and easy-to-use hardware with no shortage of support will be on hand
pretty cheap!

http://www.microzed.com.au/MICROZED/ORDERING.htm --
Cheers,
Paul B.
---------------------------------
YAHOO! GROUPS LINKS ---------------------------------

---------------------------------
Sell on Yahoo! Auctions - No fees. Bid on great items.



Mike,

I was a bit short and I am sorry for that. I went to a lot of
trouble to track down the sources for HCLOAD and the various
board and resources. I didn't see your mention of using the
EEPROM at B600 and my mention of it wasn't very clear in the
first post. I went to the trouble to down load HCLOAD to see if
ran on Windows XT it does but that's no warentee it will
function with a 68HC11.

I use New Micros as an example because they have been around for
ever and I expect they will be there in the future. They still
make boards with a socket for the port replacement unit though
they can't get them because they will emulate about any 68HC11
left on the market if you can find a PPU chip from them. They
don't obsolete boards very often and they will work with you on
custom designs, prototypes and manufacturing or provide you art
to do it some where else. I had them do it once and I thought
the price was quite reasonable including the rework that was my
mistake. Building a board for a one off is senseless unless one
need the experience or a 8 pin PIC or other simple board.

I am sure there are other broad makers out there with equally
good boards and track records. I just haven't used them.

If I were starting today I would get something like the ARM that
had good tools available free and didn't require a ROM emulator
and EPROM burner. In a sense I am starting over and thats why I
mentioned the ARM. I don't know if the fellow only want to do
one project in his life or if he serious about embedded programming.

If he wants to go in it seriously I don't think the 68CH11 is
the palace to start. It is used a lot in teaching because they
have them, it is a nice clean CPU with a rich set of features
and it serves the use of teaching very well.

But the quick way is to HCLOD to write the assembly he already
has on a single chip board such as
http://www.newmicros.com/cgi-bin/store/order.cgi?form=prod_detail&part=NMIN-0021A-
if he is failure with the Buffalo monitor as there is a lot
documentation on how to do it.

Best Regards
Gordon

Mike McCarty wrote:
> Gordon Couger wrote: >>Mike,
>>
>>I gave him all the options I could think of including loading the the
>>assembly code in the 512 bytes of EEPROM on the chip with HCLOAD. Which
>>is more than anyone else I have seen thought of.
>>
>>
>>
>
> I don't want to get into a flame war, but my point is that you *haven't*
> seen very
> much. I'm not trying to sound like anyone is ungrateful for your attempt
> to help.
> I am suggesting that you try to get more context next time.
>
> I pointed out to him that he could put his program into the on-board
> EEPROM at $B600, myself. >>New Micros has shipped boards all over the world for me. The cost of
>>shipping to OZ is not that much.
>>
>>
>
> I think that his project is already over-designed. All he really needs is a
> debounce circuit, a counter, a decoder, and some transistors to drive
> the relays. An $80 USD (what I paid for my New Micros NMIY020)
> uController board is, IMO, way over the top. I'm sure there are firms
> in Australia which supply small '11 boards.
>
> In any case, I think his project has some problems. He wants to connect
> a microswitch to an interrupt. A dry contact to an interrupt. How well
> do you think this will work?
>
> Mike
>




Gordon Couger wrote:

>Mike,
>
>I was a bit short and I am sorry for that. I went to a lot of
>trouble to track down the sources for HCLOAD and the various
>board and resources. I didn't see your mention of using the
No problem. I'm sure you went to a lot of work.

[snip]

>I use New Micros as an example because they have been around for
>ever and I expect they will be there in the future. They still
>make boards with a socket for the port replacement unit though
I agree New Micros is great.

[snip]

>But the quick way is to HCLOD to write the assembly he already
>has on a single chip board such as
>http://www.newmicros.com/cgi-bin/store/order.cgi?form=prod_detail&part=NMIN-0021A-
>if he is failure with the Buffalo monitor as there is a lot
>documentation on how to do it. >
Certainly an SBC would do the job.

I wonder where the original poster went in all the dust?

Mike

--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!



On Jul 8, 2005, at 6:36 PM, Gordon Couger wrote:

> If he wants to go in it seriously I don't think the 68CH11 is
> the palace to start. It is used a lot in teaching because they
> have them, it is a nice clean CPU with a rich set of features
> and it serves the use of teaching very well.

Its so refreshing to see others share the same opinion as myself,
"... it serves the use of teaching..." That the purpose of education
is not to drill repetitive skills but to teach one how to solve
problems and learn to self-teach. That too many schools "teach"
Microsoft Word version 3.14159 and graduates think they have "learned
computers" when they haven't learned anything but rote drill using a
specific application.

About 8 years ago I got placed on the interview list to grill
potential new hires. Was shocked to find so-called CS graduates had
not operated a raw C compiler or written a Makefile. Graduated with a
B.C.S. and never ventured outside of Microsoft Visual Suite. All got
solid F's on my report. The opening was for a Unix System
Administrator. I had to try to explain some facts of life to
Personnel that those candidates should not have received invitations.

Had any candidate indicated they understood the whole world was not
Microsoft Visual Suite, then they could have earned a "C" on their
interview from me.

Agree the HC11 is a good platform to introduce students to
microcontrollers. Its not so good for ease of using the hardware. The
famous Pink book is an exceptionally excellent reference.

Have been using Atmel Atmega64 lately. Its features make the hardware
much easier to construct and cheaper than the HC11. Its documentation
lacks the clarity and organization found in the Pink book.

--
David Kelly N4HHE, dkelly@dkel...
========================================================================
Whom computers would destroy, they must first drive mad.



Memfault Beyond the Launch