![]() |
Forum Index : Microcontroller and PC projects : CPU SLEEP question
![]() ![]() |
|||||
Author | Message | ||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
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 |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |