Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:45 30 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CPU SLEEP question

     Page 2 of 2    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 01:39pm 10 May 2015
Copy link to clipboard 
Print this post

  WhiteWizzard said  I would use a MM.INTPIN value to determine which actual pin caused an interrupt when using very short 'pulse' interrupts. As Rob highlights, if the interrupt pin has already changed state before the Int Service Routine processes things then it is impossible to find out which pin actually caused the interrupt

On reflection, this would not work for catching fast interrupt pulses.

Remember that interrupts in MMBasic are software generated and only are detected at the end of each command, they are not hardware interrupts which can occur at any time and are recognised within 50nS.

So, the interrupt detecting routine (which runs at the end of each command) would check if a pin had changed state, set MM.INTPIN and immediately jump to the interrupt routine. There would be very little difference in time between setting MM.INTPIN and running the interrupt code - so nothing much would be achieved.

However, I have an idea for turning interrupts into genuine hardware interrupts. It is based on a feature of the PIC32 called change notification. This was buggy and did not work correctly on the MX150 but they might have fixed it in the MX170. I will investigate.

Geoff
Geoff Graham - http://geoffg.net
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024