Please help support the site by donating at the link below.https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8ZRU34U47BESW
OffstateR decfsz DWELLTIMER, f ;count down dwell time to next pulse goto LeftTrigger bsf FLAGS, PULSEONR ;if dwell is done turn on outputs btfss FLAGS, TRIGOUT ;if matrix, have to test if trigger is pressed goto ContinueOffstateR ;no need to test on CG controller btfsc GPIO, TRIGGERR ;test trigger goto ContinueOffstateR ;if trigger released, leave output off bsf STATUS, RP0 ;bank 1 bcf TRISIO, TRIGGERR ;and reset pulse time bcf STATUS, RP0 ;bank 0 ContinueOffstateR movf FREQR, w ;from frequency value movwf DWELLTIMER btfss FLAGS, COD5MODE ;test COD5 mode goto LeftTrigger bcf STATUS, C rrf DWELLTIMER, f addwf DWELLTIMER, f ;75% dutycycle for pull
I got my PK2 Tuesday, and I love it. I haven't done a whole lot with it yet, because I just finished my code and I am debugging it now. I found a whole bunch of little errors (storing to W instead of f) that messed everything up, but now that I fixed them I am getting closer. I am using MPLAB SIM to step through the code, and I think I pretty much have it working now. I still have to program the chip and check the output voltage for the LEDs to make sure the duty cycle is working. Speaking of duty cycle, I was wondering something about the COD5 mode in GameplayRF2 (and I think BMU3). The code uses a 25% duty cycle to make it compatible with COD:WAW, but I am wondering would having a 25% cycle all the time affect the code working with other games? Could we just make the code 25% duty cycle all the time and it work on all the games, including WAW? Barring of course the sps cap, I am strictly talking about the duty cycle.
Cool, thanks again Hyper, you have been very helpful throughout this thread. I am curious, considering you are on the R&D team, are you an EE by trade?