Hi mackrackitI am really missing something or there is something else in your code...
I reloaded your code and the rfpic worked exactly as before, namely:
The RFEN led lit for five seconds immediately either button was pressed but nothing was transmitted.
Mm, I thought (hoped) the PIC would go to SLEEP then IOC would wake it and the program would run from where it went to SLEEP, so the next thing it would do was run the delay loop...? ON INTERRUPT is on hold right now until we get the delay loop to work with the rfpic tx-ing after the delay. I'm not using ON INTERRUPT RIGHT now.I do not see why you had to move the delay. Your way the delay should be jumped over when a button is pressed...
DaveCode:IF (GPIO.3=1) AND (GPIO.4=1) THEN ' pins will be 0 only when buttons are pressed E_OUT=0 ' Disable transmitter INTCON.0 = 0 ' No buttons down, so clear int on change flag @ SLEEP ' and start snoozin..zzzzzzzzzzz @ NOP ' Do nothing for 1st instruction on wake-up FOR I = 1 TO 5 PAUSe 1000 NEXT I ENDIF E_OUT=1 ' Enable transmitter (+ lights RFEN LED on demo board) PAUSEUS 25 ' Allow RF stage to stabilize 'Then check the buttons again IF (GPIO.3=1) AND (GPIO.4=1) THEN Main 'Button not pressed or pressed then released if (GPIO.3=0) OR (GPIO.4=0) THEN 'Carry on to ENDIF & Tx DATA





Bookmarks