yes.. the DM4 that is what im trying to program if it helps the chip it PIC16F628A. The gun has "Break beam eyes" meaing the gun will not fire unless a ball is in the breach and the beam is broken.
My loader will feed 35 balls per second (Bps)

I need the Dwell, the time the solenoid stays open, to be 19 milliseconds.

In my code :
T_ON=19
T_OFF=10 ;wich will gives you your Dwell time + max 35 Bps


so basicly once i hit 8 Bps, with 1 shot per pull, the gun jumps to shooting 3 shots per pull with nodelay what so ever between shots.
just to be sure to understand exactly your need. Once you've reach the 8 balls per second with the detent, you want the gun switch from 1 ball per shot to 3 balls/shot. Right?

And i assume then if you leave shot for a few secondes or you're below 8 shot/secondes the gun return to 1 ball/shot. Right??

if all above are right code will really be different.

lastly what would i need for the debounce to be set to 1 millisecond
I assume you mean debouce time for detent button??? if it's, to the previous code add PAUSE 1 after the second WEND statement.


thank you so much you don't understand how important this is to me
as i see in eyes of those guys... paintball is often more interesting than their whole life