Interrupt handling in 8 bit controller

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Interrupt handling in 8 bit controller

ソリューションへジャンプ
463件の閲覧回数
akashpandey
Contributor II

Hi,

I am using 8 bit freescale controller MC9S08AW16. I am getting problem in interrupt handling,if interrupt occurs simultaneously at 4 input pin then controller can't procees it effectively.i want to execute all interrupt one by one at some time delay.please provide me solution.

ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
332件の閲覧回数
eckhard
Contributor V

Hello,

I dont think your idea will work. Interrupts are not designed to be handles delayed. So you should set variables into the ISR and then decide in your Program how to handle this. The KBI only has one Interrupt Vector for all pins so if you use it you have to sample all oins at once ( which I think is effektive ). If you want a seperate Interrupt routine for each pin, you could use the Timer channels . Connect your inputs to the Timer channels and use Input Capture. It will give you an Interrupt on the active edge. But once more you should think about your program design. It doesnt make sense to delay Interrupts.

Interrupts are handled by the CPU as they occure, thats the concept of interrupts. You can switch them of to delay them and switch them on to handle the next one but you might miss some interrupts this way.

Eckhard

元の投稿で解決策を見る

0 件の賞賛
1 返信
333件の閲覧回数
eckhard
Contributor V

Hello,

I dont think your idea will work. Interrupts are not designed to be handles delayed. So you should set variables into the ISR and then decide in your Program how to handle this. The KBI only has one Interrupt Vector for all pins so if you use it you have to sample all oins at once ( which I think is effektive ). If you want a seperate Interrupt routine for each pin, you could use the Timer channels . Connect your inputs to the Timer channels and use Input Capture. It will give you an Interrupt on the active edge. But once more you should think about your program design. It doesnt make sense to delay Interrupts.

Interrupts are handled by the CPU as they occure, thats the concept of interrupts. You can switch them of to delay them and switch them on to handle the next one but you might miss some interrupts this way.

Eckhard

0 件の賞賛