Author Topic: Burst Code?  (Read 2246 times)

Offline Oglesan

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +1/-0
  • Gender: Male
  • Acidmods User
Burst Code?
« on: April 17, 2011, 08:08:52 AM »
Can someone help me make a simple 3 shot burst code from scratch?

Offline whitetop

  • E = MC² Mad Scientist
  • *
  • Posts: 1910
  • Post quality +39/-12
  • Gender: Male
  • im not in the ass kissing team
Re: Burst Code?
« Reply #1 on: April 17, 2011, 09:23:11 AM »
would help on what you want it for 360/ps3? plus wrong place to post requests
come to the rite place if you kiss admins as they promote you to admin.

Offline Oglesan

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +1/-0
  • Gender: Male
  • Acidmods User
Re: Burst Code?
« Reply #2 on: April 17, 2011, 04:14:06 PM »
360. and i didnt know bout the requests and MFH section

Offline whitetop

  • E = MC² Mad Scientist
  • *
  • Posts: 1910
  • Post quality +39/-12
  • Gender: Male
  • im not in the ass kissing team
Re: Burst Code?
« Reply #3 on: April 17, 2011, 04:20:17 PM »
its ok will move this to right place hope you get some help
come to the rite place if you kiss admins as they promote you to admin.

Offline Modded Matt

  • Site Owner
  • Administrator
  • Around the block
  • *
  • Posts: 4649
  • Post quality +65/-3
  • Gender: Male
Re: Burst Code?
« Reply #4 on: April 17, 2011, 04:29:48 PM »
how much reading and studying are you willing to put into this? if you dont care to spend say, 100 hours min to start from knowing nothin to posibly writing the first bit of code, then you should use one of our premade codes, some of which have burst

Offline Oglesan

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +1/-0
  • Gender: Male
  • Acidmods User
Re: Burst Code?
« Reply #5 on: April 17, 2011, 04:41:14 PM »
i know a bit about assembly, the commands and what they do but putting it together is what i have trouble with.

this is what i came up with after an hour last night, sorry if its hard to follow.

   list    p=12F683
   #include <p12F683.inc>

   errorlevel  -302

   __CONFIG   _FCMEN_OFF & _IESO_OFF & _CP_OFF & _CPD_OFF & _BOD_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTOSCIO

;***Variables***
STATUS      equ      03h
GPIO      equ                    05h
TRISIO      equ      85h
;***********************
   goto Start

Start
   bsf   STATUS,5
   movlw      b'100001'
   movwf     TRISIO
   bcf           STATUS,5

Main
   btfss     GPIO,5
   goto      Main
   goto      LED

LED
   movlw     01h
   movwf     GPIO,4
   decfsz     2Bh,f
   goto       State

State
   btfss     GPIO,0
   goto     Continue
   goto     Burst

Continue
   btfss     GPIO,5
   goto     State
   goto     Main

Burst
   bsf           STATUS,5
   movlw     b'100000'
   movwf     TRISIO
   bcf           STATUS,5
   movlw     01h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     00h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     01h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     00h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     01h
   movwf     GPIO,0
   goto        State
   
   end
« Last Edit: April 18, 2011, 12:44:23 PM by Oglesan »

Offline Dcofer

  • Ω Allumnist Ω
  • *
  • Posts: 118
  • Post quality +1/-1
  • Gender: Male
  • Acidmods User
Re: Burst Code?
« Reply #6 on: April 18, 2011, 01:52:57 PM »
It always surprises me that all of the rapid fire codes I have viewed the code of that they are all written in assembly, why doesn't anyone write them in C utilizing the timers or pwm control (forgot pwm can only drop to 62.125hz so that would be too fast for some and no burst).  I would think that the code could be condensed and easier to write, maybe when I have some free time I will attempt to create a basic rf using C.  I guess I just dun like writing assembly so I don't see the advantage of it so my curiosity may be uninformed.
« Last Edit: April 18, 2011, 01:58:00 PM by Dcofer »


Xbox 360 gamertag: EMERGENCY DODO
PS3 gamertag: Emergency_Dodo

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Burst Code?
« Reply #7 on: April 18, 2011, 02:19:26 PM »
It always surprises me that all of the rapid fire codes I have viewed the code of that they are all written in assembly, why doesn't anyone write them in C utilizing the timers or pwm control (forgot pwm can only drop to 62.125hz so that would be too fast for some and no burst).  I would think that the code could be condensed and easier to write, maybe when I have some free time I will attempt to create a basic rf using C.  I guess I just dun like writing assembly so I don't see the advantage of it so my curiosity may be uninformed.

i tried in C once but i just hate it, i feel as though i no idea what the program is doing i like being able to step through assembly line by line and know exactly what the PIC is doing. but all the codes here use a timer for rf....

Offline Oglesan

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +1/-0
  • Gender: Male
  • Acidmods User
Re: Burst Code?
« Reply #8 on: April 18, 2011, 02:22:53 PM »
can u guys help me revise it to work for a 360 controller?

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Burst Code?
« Reply #9 on: April 18, 2011, 02:37:08 PM »
i know a bit about assembly, the commands and what they do but putting it together is what i have trouble with.

this is what i came up with after an hour last night, sorry if its hard to follow.

   list    p=12F683
   #include <p12F683.inc>

   errorlevel  -302

   __CONFIG   _FCMEN_OFF & _IESO_OFF & _CP_OFF & _CPD_OFF & _BOD_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTOSCIO

;***Variables***
STATUS      equ      03h
GPIO      equ                    05h
TRISIO      equ      85h
;***********************
   goto Start

Start
   bsf   STATUS,5
   movlw      b'100001'
   movwf     TRISIO
   bcf           STATUS,5

Main
   btfss     GPIO,5
   goto      Main
   goto      LED

LED
   movlw     01h
   movwf     GPIO,4
   decfsz     2Bh,f
   goto       State

State
   btfss     GPIO,0
   goto     Continue
   goto     Burst

Continue
   btfss     GPIO,5
   goto     State
   goto     Main

Burst
   bsf           STATUS,5
   movlw     b'100000'
   movwf     TRISIO
   bcf           STATUS,5
   movlw     01h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     00h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     01h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     00h
   movwf     GPIO,0
   decfsz     2Bh,f
   movlw     01h
   movwf     GPIO,0
   goto        State
   
   end

heres a few tips,
-you should start with the template file for the 12f683 as you haven't got the reset and interrupt vectors
-use timer2 interupt for the actual rf, it will give more accurate timing and make the multitasking easier
-define your file registers instead of using a hex value it will make your code easier to follow

Offline Oglesan

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +1/-0
  • Gender: Male
  • Acidmods User
Re: Burst Code?
« Reply #10 on: April 18, 2011, 02:46:12 PM »
ok thanks and where do i get a template? is there one with microchips programs?

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Burst Code?
« Reply #11 on: April 18, 2011, 02:50:36 PM »
They come with MPLAB

C:\Program Files (x86)\Microchip\MPASM Suite\Template\Code

if you used the default install location for MPLAB

Offline Oglesan

  • Chief squatting Hard
  • *
  • Posts: 13
  • Post quality +1/-0
  • Gender: Male
  • Acidmods User
Re: Burst Code?
« Reply #12 on: April 18, 2011, 02:56:15 PM »
ok thanks. ill post what i come up with after a few days.

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Burst Code?
« Reply #13 on: April 18, 2011, 03:05:06 PM »
be sure to read the datasheet for the 12f683 really really well

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal