Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Disable INT0 is not compiled. Compiler version: 2.0.14.0 De

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-8051
View previous topic :: View next topic  
Author Message
JohnBoman

Bascom Member



Joined: 30 Aug 2013
Posts: 3

sweden.gif
PostPosted: Sat Jan 25, 2014 11:30 pm    Post subject: Disable INT0 is not compiled. Compiler version: 2.0.14.0 De Reply with quote

Please see the attached code in "Testice.bas".

The external interrupt INT0 is still enabled in spite of the instruction in the line after "Waitmse 690". No error message after compilation.
Can anyone explain why?
Best Regards
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5069
Location: Holland

blank.gif
PostPosted: Wed Jan 29, 2014 11:45 am    Post subject: Reply with quote

disable INT0 will disable the interrupt enable bit in the IE register. but ... if a flag was still pending, the interrupt will still be called once.
so clear the flag in TCON.1 to prevent that the isr is called.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-8051 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum