3.0 Software question: Shot buffering = bps increase?!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yagrmiestr
    Eternal Tinkerer
    • Feb 2003
    • 212

    #16
    I've got something I've been playing with that uses counters and interrupts to control the firing sequence while still being able to continuously poll the trigger. It's part of something larger I am experimenting with.

    Edit: A little more info....
    Basically how it works in "psuedo code"

    If trigger pull then
    energize solenoid
    start Son time counter
    go back to main loop (watch trigger/input loop)
    End if

    when the counter reaches what ever Son time you want it will set an interrupt, then you shut off the solenoid and reset the counter for the valve recharge time. when that counter triggers the interrupt flag you can fire another shot. The two counter times are based on what bps you have set. this way you can keep polling the trigger during the complete cycle and just store number of pulls in a variable.

    FYI I don't have this running on a stock board, I'm using a little larger micro that I'm trying some different stuff on.
    Last edited by yagrmiestr; 09-18-2003, 12:27 AM.

    Comment

    • DiRTyBuNNy
      Registered User
      • Sep 2001
      • 4854

      #17
      SWEET!
      Dirty Clothes for Dirty Ballers!

      Comment

      • nippinout
        FUSP
        • Jan 2002
        • 1231

        #18
        Originally posted by yagrmiestr
        I've got something I've been playing with that uses counters and interrupts to control the firing sequence while still being able to continuously poll the trigger. It's part of something larger I am experimenting with.
        Anything that can help drive me in the right direction?
        BAM!
        TNS2K2's Viagra Adventure!

        Comment

        • yagrmiestr
          Eternal Tinkerer
          • Feb 2003
          • 212

          #19
          oh, you don't really have to use interrupts you can just read the counter value and when it exceeds your desired time you jump out of you main loop and set/reset the solenoid, etc. There are a few ways you could do this. Also I would not poll the menu buttons while in a fire or trigger poll loop, writing the display is a long enough event to effect the firing timing enough (at least in my code it is).

          Comment

          • yagrmiestr
            Eternal Tinkerer
            • Feb 2003
            • 212

            #20
            Originally posted by nippinout


            Anything that can help drive me in the right direction?
            I posted more info above... but the actual code is still in progress (when I find time... works been busy of late )

            Comment

            • nippinout
              FUSP
              • Jan 2002
              • 1231

              #21
              Originally posted by yagrmiestr
              oh, you don't really have to use interrupts you can just read the counter value and when it exceeds your desired time you jump out of you main loop and set/reset the solenoid, etc. There are a few ways you could do this. Also I would not poll the menu buttons while in a fire or trigger poll loop, writing the display is a long enough event to effect the firing timing enough (at least in my code it is).
              Let's just say that went way over my head.

              I don't know how to deal with trigger events during the solenoid on time.

              Do I set the pin out to the solenoid to high and run a counter and include a check on the trigger within the count?
              BAM!
              TNS2K2's Viagra Adventure!

              Comment

              • yagrmiestr
                Eternal Tinkerer
                • Feb 2003
                • 212

                #22
                Originally posted by nippinout


                Let's just say that went way over my head.

                I don't know how to deal with trigger events during the solenoid on time.

                Do I set the pin out to the solenoid to high and run a counter and include a check on the trigger within the count?
                solenoid high and start the counter then go back to your main loop, or one that polls the trigger and watches the counter. Make sense? Sounds like you got the general idea. having a large enough counter or setting it up for the right resolution to get the right times and accuracy is what is important. I haven't played with stock micro to see how many bytes deep the counter is.

                Edit: Looking at the datasheet it only has a 16 bit counter. With 1024 prescale you can time about 65ms in 256 steps of ~250us. It might not quite be long enough at 11bps and under this might not quite be long enough for the Soff time, but that could be worked around.
                Last edited by yagrmiestr; 09-18-2003, 01:12 AM.

                Comment

                • Steeratt
                  I meant to...uh, nevermind
                  • May 2003
                  • 5375

                  #23
                  Yagrmeistr-Hey, he even plays paintball pretty well, too.

                  His skills with the emag board are phenomenal. This guy could be the next Jim Drew


                  A site for gay and alternative lifestyles: www.zakvetter.com

                  Comment

                  • nippinout
                    FUSP
                    • Jan 2002
                    • 1231

                    #24
                    I don't have an oscilliscope. :/
                    BAM!
                    TNS2K2's Viagra Adventure!

                    Comment

                    • yagrmiestr
                      Eternal Tinkerer
                      • Feb 2003
                      • 212

                      #25
                      Originally posted by nippinout
                      I don't have an oscilliscope. :/
                      You should have seen the looks I got when I had my emag board hooked up to the scope in the lab, lol. And no I didn't try and get the whole marker past security

                      Comment

                      • speedyfox666
                        Registered User
                        • Jun 2003
                        • 58

                        #26
                        I'm still a little new on the software thing

                        but how can I get the new software on my board ? (when it 's out)

                        you need a data cable, new board,...
                        tequila fade X-mag

                        member of the "Bumper Eater Revolution"

                        Comment

                        • pito189
                          viking
                          • Oct 2001
                          • 2093

                          #27
                          Originally posted by speedyfox666
                          I'm still a little new on the software thing

                          but how can I get the new software on my board ? (when it 's out)

                          you need a data cable, new board,...
                          AGD flashes your board. You can either go to an event where they are at. Our send it to them, and they will do it for you.
                          Old School Baller
                          Have a Viking, still miss my X-Mag

                          Comment

                          • Bolter
                            Hardcore casual
                            • May 2003
                            • 1223

                            #28
                            We have it on our X-mags (it arrived at John Sosta's last Thursday) and my god it is a lot quicker!!! I mean I am pretty fast on the trigger probably 15 ish bps, but this thing is cool as you like. Its like whatever you put the gun on, say 20bps, it will shoot 20bps constant (as long as you walk it) until you let go of the trigger.

                            I have never shot a gun like it. Get it. Get it NOW!!!!!

                            Bolter
                            Storm Uk

                            Comment

                            • Skoad
                              Registered User
                              • Feb 2002
                              • 3265

                              #29
                              i notice mine skipping shots but i just thought it was because my fingers were being retarded.

                              hope it comes out soon.

                              Comment

                              • Jack & Coke
                                TUNAMAX No. 1
                                • Jul 2002
                                • 2644

                                #30
                                Originally posted by Bolter
                                We have it on our X-mags (it arrived at John Sosta's last Thursday) and my god it is a lot quicker!!! I mean I am pretty fast on the trigger probably 15 ish bps, but this thing is cool as you like. Its like whatever you put the gun on, say 20bps, it will shoot 20bps constant (as long as you walk it) until you let go of the trigger.

                                I have never shot a gun like it. Get it. Get it NOW!!!!!

                                Spoooooooon!

                                Comment

                                Working...