Thank you once again. It works a treat. I put the first part of the routine above my main program as: ' ============================================= ' Enable Interrupts sor Sleep Function ' ============================================= // Both edges (most common for buttons/encoders) IOCBP6 = 1 ;Required IOCBN6 = 1 ;Required On Interrupt PORTABChange Call Handle_IOC ' Link IOC interrupt to subroutine Main: ;----- start main******* and a Sub called Handle_IOC .... Calling up that Sub routine when...
Yes, that is a problem. it goesn't go to sleep. It becomes Comatosed!. I need it come back to life on pressing the encoder switch on PortB.6 The code is below - Thank you
So I don't use any of the code instructions as befpre with the 10F202 and 12F508 ? Thats magic - Thank you.
So I don't use any of the code instructions as befpre with the 10F202 and 12F408 ? Thats magic - Thank you.
Many moons ago you helped with some code you wrote for me to send a PIC29F202 into sleep. The code you wrote was: SysBYTETempA = On_signal 'Clear the port change reset flag Set GPWUF off movlw B'01001111' 'This is assembler. :-) option 'Return to sleep wait 3 S sleep nop The code has been recycled many times by simply changing the £On_signal " line. the PIC16F18346 I'm using in this latest project doesn't want to know this and spits it out as if it were a nasty taste. Having resolved all the project...
Now for today's aggravation. The problem I'm having is reading the Pulsein signal output very occasionally throws 0 (zero) This can be seen in screenshot, Capture4 below. I'm driving the input wit a 1kHz signal from a signal generator The input is preconditioned with two gates of a 74HC14 Hex Inverter Schmitt Trigger. I need to be able to pick up the lack of coolant flow when the Pump and Spindle Motor VFD is on. This is the code I have so far. I think I need something that ignores the missing pulses...
Now for today's aggravation. The problem I'm having is reading the Pulsein signal output very occasionally throws 0 (zero) This can be seen in screenshot, Capture4 below. I'm driving the input wit a 1kHz signal from a signal generator The input is preconditioned with two gates of a 74HC14 Hex Inverter Schmitt Trigger. I need to be able to pick up the lack of coolant flow when the Pump and Spindle Motor VFD is on. This is the code I have so far. I think I need something that ignores the missing pulses...
This has me really baffled ! it's working fine now - I don't understand... Don't believe in Code Gremlins and fairy's