Yahoo Groups archive

68300

Index last updated: 2026-04-29 00:01 UTC

Message

RE: [68300] Can I user the Interrupt of MC68376

2003-04-11 by shaoan li

Hello,Sir:
     Thamk you for your help, I think so. but I need  use a mechanical switch control to MCU and iI have append a debounce circuit in my ECU.tell me how do it, please 
 Steve Russell <stever@...> wrote:Shaoan,

If you are using a mechanical switch or relay to generate the interrupt, 
you will likely get many interrupts per switch operation due to "contact 
bounce".

Contact bounce occurs on conventional switches and relays because when the 
moving contact hits the fixed contact it bounces away for short 
periods.  The bounces can range from hundreds of microseconds to 
milliseconds.  This normally happens only when the contact closes, not when 
it opens.  However, this will be a problem if you use a contact to drive an 
interrupt as the switch has to close at some point in the full operating cycle.

If the switch is operated by a human being, a response time of 10 
milliseconds or longer is normally good enough, and you can just sample the 
contact every 10 milliseconds in a timer interrupt, and use that 
value.  The bouncing seldom lasts longer than 20 milliseconds, so the 
effect of the bounce is just a 10 millisecond jitter in reacting to the 
contact closure.

If you need really good response, as for an action computer game with fast, 
skilled players, sampling at 1 millisecond intervals and more complicated 
code that reacts to the first closure of the contact but ignores the 
bounces may be required.

     Steve

At 06:26 PM 4/10/2003, you wrote:

>Hello,Mr. Charlie:
>     this is a controller for car, I have programming same interrupt 
> service program in my code and I believe any interrupt request have been 
> a corresponding program. I hope that when a switch is turn on, a low 
> level is  appearing in IRQ pin of MCU. in this time, MCU is call my 
> program and does same work, for example, a lamp is lighting. I think the 
> low level is vrey long for the switch, MCU is get a repeat of the 
> interrupt service routine, so HALTED is generated is from a double bus fault.
>     In MC68HC11 et al, I can set-up the interrupt service routine is 
> generated by  level edgt , but I can't it in MC683xx, I don't find it's 
> Register.
>     I have use a debugger to see if the ISR is even getting run by 
> placing a breakpoint in the ISR, an access to an address is not 
> terminated properly.
>     in EB265.PDF from motorola, it recommend is "For the general-purpose 
> timer (GPT), an input capture pin or pulse accumulator input pin can be 
> used." I don't know how do it(I have not TPU residual channels). give me 
> same example, please.
>    I can't write english letter, if it is error, I am very sorry!
>best regards
>shaoan
>Melear Charles-rdph40 <charles.melear@...> wrote:Hello,
>
>Please give some more details on your problem.  I am simply guessing on 
>this but if your program is simply halting (or appears to halt) when an 
>interrupt is asserted, my best guess is that you have not set up properly 
>for an Interrupt Acknowledgement Cycle.
>
>You can do this by programming a Chip Select Base Address and Chip Select 
>Option register.  Set up the Base Address Register with the value 
>$FFF8.  Then, in the Chip Select Option Register code the fields as 
>follows:  Mode = Async, Field = Both Read and Write, Strobe = AS, DSACK = 
>0000, Space = CPU Space, IPL = 000 for all interrupts and AVEC = 1.
>
>If you have the Bus Monitor turned on in the SYPCR register and you have 
>not properly set up for the interrupt acknowledgement cycle, the machine 
>will take a Spurious Interrupt.
>
>Let me know if any of this works.
>
>Charlie
>
>-----Original Message-----
>From: wflsa [mailto:wflsa@...]
>Sent: Sunday, April 06, 2003 11:18 PM
>To: 68300@yahoogroups.com; 68300@yahoogroups.com; 68300@yahoogroups.com
>Subject: [68300] Can I user the Interrupt of MC68376
>
>
>I hope use  Interrupt server program in IRQ pin of the MC68376. when
>a low level is generated, MCU is call my specify server program. Now,
>I generate a low level is IRQx Pin, then MCU is Halted(can't work). I
>don't know Why? please help me! thanks.
>
>
>
>
>
>
>Yahoo! Groups Sponsor
><<http://rd.yahoo.com/M=249981.3083817.4456279.1728375/D=egroupweb/S=1706554205:HM/A=1524435/R=0/*http://webmllc.tempdomainname.com/ais_lp/ais_index_yacan.php?bann=get300x250&area=CLUBEDIR&site=YaCan&camp=atestNtest>http://rd.yahoo.com/M=249981.3083817.4456279.1728375/D=egroupweb/S=1706554205:HM/A=1524435/R=0/*http://webmllc.tempdomainname.com/ais_lp/ais_index_yacan.php?bann=get300x250&area=CLUBEDIR&site=YaCan&camp=atestNtest> 
>
> 
><http://us.adserver.yahoo.com/l?M=249981.3083817.4456279.1728375/D=egroupmail/S=:HM/A=1524435/rand=558925153> 
>
>
>---------------------------------------------------
>To unsubscribe from this group, send an email to:
>68300-unsubscribe@yahoogroups.com
>
>To learn more about Motorola Microcontrollers, please visit
><http://www.motorola.com/mcu>http://www.motorola.com/mcu 
><http://www.motorola.com/mcu>
>
>
>
>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service 
><<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/> .
>
>
>
>
>[Non-text portions of this message have been removed]
>
>
>Yahoo! Groups Sponsor
>---------------------------------------------------
>To unsubscribe from this group, send an email to:
>68300-unsubscribe@yahoogroups.com
>
>To learn more about Motorola Microcontrollers, please visit
><http://www.motorola.com/mcu>http://www.motorola.com/mcu
>
>
>
>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>---------------------------------
>Do You Yahoo!?
>"雅虎通网络KTV, 随时随地免费卡拉OK~~"
>
>[Non-text portions of this message have been removed]
>
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
><http://rd.yahoo.com/M=245454.3115308.4434529.1728375/D=egroupweb/S=1706554205:HM/A=1457554/R=0/*http://ipunda.com/clk/beibunmaisuiyuiwabei>1c226ca.jpg
>1c2272e.jpg
>
>---------------------------------------------------
>To unsubscribe from this group, send an email to:
>68300-unsubscribe@yahoogroups.com
>
>To learn more about Motorola Microcontrollers, please visit
><http://www.motorola.com/mcu>http://www.motorola.com/mcu
>
>
>
>Your use of Yahoo! Groups is subject to the 
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.


*************************************************************************
Steve Russell                                     mailto:stever@...
Senior Software Design Engineer                      http://www.nohau.com
Nohau Corporation                                    phone: (408)866-1820
51 East Campbell Avenue                                fax: (408)378-7869
Campbell, CA 95008
*************************************************************************

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


Yahoo! Groups Sponsor
---------------------------------------------------
To unsubscribe from this group, send an email to:
68300-unsubscribe@yahoogroups.com

To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



---------------------------------
Do You Yahoo!?
"雅虎通网络KTV, 随时随地免费卡拉OK~~"

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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.