You are viewing our Forum Archives. To view or take place in current topics click here.
#51. Posted:
Frosty-Modz
  • TTG Senior
Status: Offline
Joined: May 28, 201014Year Member
Posts: 1,219
Reputation Power: 47
Status: Offline
Joined: May 28, 201014Year Member
Posts: 1,219
Reputation Power: 47
Hazer wrote
basicaly what a quickscope is where you scope in on the sniper like in CoD
but not to where you hold it down where it zooms in completly


Yeah, I am still not getting it. I need more descriptive sequence of events like this:

Press tact button
-chip presses and holds L trigger for zoom for just the right amount of time.
-chip presses R trigger to fire round at right time.
-chip releases both R trigger and L trigger.

or would you want this to happen when you press the L trigger?

Please remember I have never even played the newest COD games.

i want to use it on mw2
and what i can tell
-chip needs to press L trigger for 258 ms
-chip needs to press R trigger at 258 ms
- chip needs to release L&R trigger at 259 ms
at least i think this is right. I am pretty sure
#52. Posted:
Smersh
  • TTG Senior
Status: Offline
Joined: Apr 24, 201113Year Member
Posts: 1,134
Reputation Power: 53
Status: Offline
Joined: Apr 24, 201113Year Member
Posts: 1,134
Reputation Power: 53
I like them all, nice work!
#53. Posted:
DinoRawrss
  • Ladder Climber
Status: Offline
Joined: Jul 26, 201014Year Member
Posts: 382
Reputation Power: 15
Status: Offline
Joined: Jul 26, 201014Year Member
Posts: 382
Reputation Power: 15
There all nice.
8/10
#54. Posted:
Austin_Powers
  • TTG Fanatic
Status: Offline
Joined: Jul 07, 201113Year Member
Posts: 4,218
Reputation Power: 211
Status: Offline
Joined: Jul 07, 201113Year Member
Posts: 4,218
Reputation Power: 211
9/10 reminds me of promodz controllers with out the smexy paint
#55. Posted:
TPW
  • TTG Fanatic
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 4,832
Reputation Power: 215
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 4,832
Reputation Power: 215
Lol fail on the first one, You have the X on the controller upside down
But good work anyways, Keep it up!
#56. Posted:
Frosty-Modz
  • TTG Senior
Status: Offline
Joined: May 28, 201014Year Member
Posts: 1,219
Reputation Power: 47
Status: Offline
Joined: May 28, 201014Year Member
Posts: 1,219
Reputation Power: 47
Hazer wrote
basicaly what a quickscope is where you scope in on the sniper like in CoD
but not to where you hold it down where it zooms in completly


Yeah, I am still not getting it. I need more descriptive sequence of events like this:

Press tact button
-chip presses and holds L trigger for zoom for just the right amount of time.
-chip presses R trigger to fire round at right time.
-chip releases both R trigger and L trigger.

or would you want this to happen when you press the L trigger?

Please remember I have never even played the newest COD games.

Hazer could i edit bmu 2
like this
;**********************************************************************
ORG 0x000 ; processor reset vector
goto main ; go to beginning of program


ORG 0x004 ; interrupt vector location
movwf w_temp ; save off current W register contents
movf STATUS,w ; move status register into W register
movwf status_temp ; save off contents of STATUS register

;Take a good note here. OSC is left at default 4MHz.
; We are running at 1MHz instruction cycle, or 1 micro second
;Timer 2 is prescaled 1:4 and compared (PR2) to 250.
; we now have hardware interupt that falls every 1ms exactly
;within limitation of osctune. Main code is inconsequential.
;PULSE and DWELL values control the signals precisely.
;All pulse logic is switched within the few microseconds to
;service the interupt routine. DO NOT modify the ISR
;with any kind of 'wait' or 'loop'. If you want to trigger
; timed events do so by setting an open FLAG bit and have the
;event done in the main loop.


btfss PIR1, TMR2IF ;timer 2 int happened
retfie

;**************** LED blinking *********************************************
;Our main routine will turn the flag bit
;LEDON on or off. The 10ms pulse is a duty cycle
;for the code to work with both CG and
;matrix controllers.

btfsc FLAGS, LEDON ;LED off
goto BlinkLed
bsf STATUS, RP0 ;bank 1
bsf TRISIO, LEDR ;tristate LED
bcf STATUS, RP0 ;bank 0
goto RightTrigger

BlinkLed
bsf STATUS, RP0 ;bank 1
bcf TRISIO, LEDR ;turn output on
bcf STATUS, RP0 ;bank 0
btfss GPIO, LEDR
goto LedLow
decfsz LEDBLINK, f ;if pulse is active, count down 10ms
goto RightTrigger
bcf GPIO, LEDR
movlw 0x0A
movwf LEDBLINK

LedLow
decfsz LEDBLINK, f ;if pulse is active, count down 10ms
goto RightTrigger
bsf GPIO, LEDR
movlw 0x0A
movwf LEDBLINK

;**************** Right trigger logic***************************************
RightTrigger
movf STATER, f ;this will trigger the zero flag
btfss STATUS, Z ;if STATER is zero, output is off.
goto ActiveR
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERR
bsf TRISIO, TRIGGERL
bcf STATUS, RP0 ;bank 0

goto EndInterupt

ActiveR
btfss FLAGS, TRIGOUT
bcf GPIO, TRIGGERR
btfsc FLAGS, TRIGOUT
bsf GPIO, TRIGGERR

btfss FLAGS, PULSEONR ;is pulse active?
goto OffstateR
decfsz PULSER, f ;if pulse is active, count down 258ms
goto ActiveL

bcf FLAGS, PULSEONR ;258m over, clear flags and output
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERR ;and reset pulse time.
bcf STATUS, RP0 ;bank 0
movf FREQR, w
movwf PULSER
goto ActiveL

OffstateR
decfsz DWELLTIMER, f ;count down dwell time to next pulse
goto ActiveL
bsf FLAGS, PULSEONR ;if dwell is done turn on outputs
bsf STATUS, RP0 ;bank 1
bcf TRISIO, TRIGGERR ;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQR, w ;from frequency value
movwf DWELLTIMER

ActiveL
movlw 0x40
subwf STATER, w ;test if state 1
btfsc STATUS, Z
goto Continue02
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERL
bcf STATUS, RP0 ;bank 0
goto EndInterupt
Continue02
btfss FLAGS, TRIGOUT
bcf GPIO, TRIGGERL
btfsc FLAGS, TRIGOUT
bsf GPIO, TRIGGERL

btfss FLAGS, PULSEONL ;is pulse active?
goto OffstateL
decfsz PULSEL, f ;if pulse is active, count down 10ms
goto EndInterupt

bcf FLAGS, PULSEONL ;10ms is over, clear flags and output
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERL ;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQR, w
movwf PULSEL
goto EndInterupt

OffstateL
decfsz DWELLTIMEL, f ;count down dwell time to next pulse
goto EndInterupt
bsf FLAGS, PULSEONL ;if dwell is done turn on outputs
bsf STATUS, RP0 ;bank 1
bcf TRISIO, TRIGGERL ;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQR, w ;from frequency value
movwf DWELLTIMEL

EndInterupt
bcf PIR1, TMR2IF

movf status_temp,w ; retrieve copy of STATUS register
movwf STATUS ; restore pre-isr STATUS register contents
swapf w_temp,f
swapf w_temp,w ; restore pre-isr W register contents
retfie ; return from interrupt


;*************************************SUBROUTINES**********************************

Wait10ms
clrf TEMP2
movlw 0x0D
movwf TEMP1 ;rough 10ms timer for button debounce.

Loop1
decfsz TEMP2, f ;count down 256*3=768 cycles
goto Loop1
decfsz TEMP1, f ;count down 768*13=9986 cycles
goto Loop1
return

;*************************************************************
ReadEE
bsf STATUS , RP0 ;Bank1
movlw 0x04
movwf EEADR
bsf EECON1 , RD ;start read
movf EEDAT , W
bcf STATUS , RP0 ;Bank0
return
;*************************************************************

WriteEE
bsf STATUS , RP0
movwf EEDAT
movlw 0x04
movwf EEADR
bsf EECON1,WREN ;Enable write
bcf INTCON, GIE ;Disable INTs
btfsc INTCON, GIE ;See AN576
goto $-2
movlw 0x55 ;Unlock write
movwf EECON2
movlw 0xAA
movwf EECON2
bsf EECON1, WR ;Start the write
WaitForEEWrite
btfsc EECON1, WR ;wait for hardware to clear (done writing)
goto WaitForEEWrite
bcf STATUS , RP0 ;Bank0
bsf INTCON, GIE ;Enable INTS
return

;**********************************************************************************
;**********************************************************************************
;**********************************************************************************
main

clrf GPIO
clrf FLAGS
movlw 0x07
movwf CMCON0 ;comparators off
bsf STATUS, RP0 ;bank 1
movlw 0x1C
movwf TRISIO ;pin 0 & 1 & 5 out, all other inputs
clrf ANSEL ;all digital pins
movlw 0x14
movwf WPU ;enable week pullups
bcf OPTION_REG, 7 ;enable all week pullups
bcf STATUS, RP0 ;bank 0

movlw 0x01
movwf T2CON ;timer 2, prescale 1:4, no postscale
bsf STATUS, RP0 ;bank 1
movlw 0xFA
movwf PR2 ;setup 1ms hardware interupt
bsf PIE1, TMR2IE ;enable timer2 interupt
bcf STATUS, RP0 ;bank 0
bsf T2CON, TMR2ON ;turn on timer2
movlw 0xC0
movwf INTCON ;turn on interupts globally
movlw 0x0A ;start with 10ms pulse width
movwf LEDBLINK
movlw FIRERATE3 ;40ms dwell for 50ms freq
movwf PULSER
movwf PULSEL
movwf DWELLTIMER
movwf DWELLTIMEL
btfsc GPIO, CONTROLTYPE ;if pin 4 is pulled lo
bsf FLAGS, TRIGOUT ;leave output lo
call ReadEE ;get state value
movwf STATER
movf STATER, f
btfsc STATUS, Z
bsf FLAGS, LEDON ;get LED status


;******MAIN LOOP***************
Start
btfsc GPIO, PROGSTATE
goto Start ;wait for the fun to begin
call Wait10ms
btfsc GPIO, PROGSTATE ;button is down for 10ms
goto Start
Release
btfss GPIO, PROGSTATE ;wait for button release
goto Release
call Wait10ms
btfss GPIO, PROGSTATE ;wait for button release
goto Release

movlw 0x40
addwf STATER, f ;cyclic change in state manipulates
;last 2 bits in STATER.
movf STATER, w
call WriteEE ;store state

btfsc STATER, 7 ;state 1 or 2
goto Continue01
btfsc STATER, 6
goto State2
movlw FIRERATE1 ;state 1, off
movwf FREQR
bcf FLAGS, LEDON ;turn off LED
goto Start
State2
movlw FIRERATE1 ;state 2, 42ms cycle
movwf FREQR
bsf FLAGS, LEDON ;turn on LED
goto Start
Continue01
btfsc STATER, 6
goto State4
movlw FIRERATE2 ;state 3, 30 ms cycle
movwf FREQR
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop01
call Wait10ms
decfsz TEMP3, f
goto Loop01
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop02
call Wait10ms
decfsz TEMP3, f
goto Loop02
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop04
call Wait10ms
decfsz TEMP3, f
goto Loop04
bsf FLAGS, LEDON ;turn on LED
goto Start

State4
movlw FIRERATE3 ;state 4, 22ms cycle
movwf FREQR
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop05
call Wait10ms
decfsz TEMP3, f
goto Loop05
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop06
call Wait10ms
decfsz TEMP3, f
goto Loop06
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop07
call Wait10ms
decfsz TEMP3, f
goto Loop07
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop08
call Wait10ms
decfsz TEMP3, f
goto Loop08
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop09
call Wait10ms
decfsz TEMP3, f
goto Loop09
bsf FLAGS, LEDON ;turn on LED
goto Start






; initialize eeprom locations

ORG 0x2100
DE 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07


END ; directive 'end of program'


so just change the 40ms on right and left to 258ms or what would that do to it
#57. Posted:
crazy-modder
  • Powerhouse
Status: Offline
Joined: Sep 09, 201014Year Member
Posts: 464
Reputation Power: 25
Status: Offline
Joined: Sep 09, 201014Year Member
Posts: 464
Reputation Power: 25
Wal_marts__FaNboY wrote
Hazer wrote
basicaly what a quickscope is where you scope in on the sniper like in CoD
but not to where you hold it down where it zooms in completly


Yeah, I am still not getting it. I need more descriptive sequence of events like this:

Press tact button
-chip presses and holds L trigger for zoom for just the right amount of time.
-chip presses R trigger to fire round at right time.
-chip releases both R trigger and L trigger.

or would you want this to happen when you press the L trigger?

Please remember I have never even played the newest COD games.

i want to use it on mw2
and what i can tell
-chip needs to press L trigger for 258 ms
-chip needs to press R trigger at 258 ms
- chip needs to release L&R trigger at 259 ms
at least i think this is right. I am pretty sure



uhhh are you guys thread jacking????
#58. Posted:
KiNeBuD
  • TTG Senior
Status: Offline
Joined: Jun 24, 201113Year Member
Posts: 1,567
Reputation Power: 62
Status: Offline
Joined: Jun 24, 201113Year Member
Posts: 1,567
Reputation Power: 62
11/10
this is **** dope as hell.
#59. Posted:
Ylem
  • TTG Senior
Status: Offline
Joined: Nov 02, 201014Year Member
Posts: 1,878
Reputation Power: 21
Status: Offline
Joined: Nov 02, 201014Year Member
Posts: 1,878
Reputation Power: 21
Those are beast man! You should start a shop/store.

Are they real bullets in em? and Btw, Please don't ask for rep! Its against the rules :S
#60. Posted:
Ylem
  • TTG Senior
Status: Offline
Joined: Nov 02, 201014Year Member
Posts: 1,878
Reputation Power: 21
Status: Offline
Joined: Nov 02, 201014Year Member
Posts: 1,878
Reputation Power: 21
Wal_marts__FaNboY wrote
Hazer wrote
basicaly what a quickscope is where you scope in on the sniper like in CoD
but not to where you hold it down where it zooms in completly


Yeah, I am still not getting it. I need more descriptive sequence of events like this:

Press tact button
-chip presses and holds L trigger for zoom for just the right amount of time.
-chip presses R trigger to fire round at right time.
-chip releases both R trigger and L trigger.

or would you want this to happen when you press the L trigger?

Please remember I have never even played the newest COD games.

Hazer could i edit bmu 2
like this
;**********************************************************************
ORG 0x000 ; processor reset vector
goto main ; go to beginning of program


ORG 0x004 ; interrupt vector location
movwf w_temp ; save off current W register contents
movf STATUS,w ; move status register into W register
movwf status_temp ; save off contents of STATUS register

;Take a good note here. OSC is left at default 4MHz.
; We are running at 1MHz instruction cycle, or 1 micro second
;Timer 2 is prescaled 1:4 and compared (PR2) to 250.
; we now have hardware interupt that falls every 1ms exactly
;within limitation of osctune. Main code is inconsequential.
;PULSE and DWELL values control the signals precisely.
;All pulse logic is switched within the few microseconds to
;service the interupt routine. DO NOT modify the ISR
;with any kind of 'wait' or 'loop'. If you want to trigger
; timed events do so by setting an open FLAG bit and have the
;event done in the main loop.


btfss PIR1, TMR2IF ;timer 2 int happened
retfie

;**************** LED blinking *********************************************
;Our main routine will turn the flag bit
;LEDON on or off. The 10ms pulse is a duty cycle
;for the code to work with both CG and
;matrix controllers.

btfsc FLAGS, LEDON ;LED off
goto BlinkLed
bsf STATUS, RP0 ;bank 1
bsf TRISIO, LEDR ;tristate LED
bcf STATUS, RP0 ;bank 0
goto RightTrigger

BlinkLed
bsf STATUS, RP0 ;bank 1
bcf TRISIO, LEDR ;turn output on
bcf STATUS, RP0 ;bank 0
btfss GPIO, LEDR
goto LedLow
decfsz LEDBLINK, f ;if pulse is active, count down 10ms
goto RightTrigger
bcf GPIO, LEDR
movlw 0x0A
movwf LEDBLINK

LedLow
decfsz LEDBLINK, f ;if pulse is active, count down 10ms
goto RightTrigger
bsf GPIO, LEDR
movlw 0x0A
movwf LEDBLINK

;**************** Right trigger logic***************************************
RightTrigger
movf STATER, f ;this will trigger the zero flag
btfss STATUS, Z ;if STATER is zero, output is off.
goto ActiveR
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERR
bsf TRISIO, TRIGGERL
bcf STATUS, RP0 ;bank 0

goto EndInterupt

ActiveR
btfss FLAGS, TRIGOUT
bcf GPIO, TRIGGERR
btfsc FLAGS, TRIGOUT
bsf GPIO, TRIGGERR

btfss FLAGS, PULSEONR ;is pulse active?
goto OffstateR
decfsz PULSER, f ;if pulse is active, count down 258ms
goto ActiveL

bcf FLAGS, PULSEONR ;258m over, clear flags and output
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERR ;and reset pulse time.
bcf STATUS, RP0 ;bank 0
movf FREQR, w
movwf PULSER
goto ActiveL

OffstateR
decfsz DWELLTIMER, f ;count down dwell time to next pulse
goto ActiveL
bsf FLAGS, PULSEONR ;if dwell is done turn on outputs
bsf STATUS, RP0 ;bank 1
bcf TRISIO, TRIGGERR ;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQR, w ;from frequency value
movwf DWELLTIMER

ActiveL
movlw 0x40
subwf STATER, w ;test if state 1
btfsc STATUS, Z
goto Continue02
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERL
bcf STATUS, RP0 ;bank 0
goto EndInterupt
Continue02
btfss FLAGS, TRIGOUT
bcf GPIO, TRIGGERL
btfsc FLAGS, TRIGOUT
bsf GPIO, TRIGGERL

btfss FLAGS, PULSEONL ;is pulse active?
goto OffstateL
decfsz PULSEL, f ;if pulse is active, count down 10ms
goto EndInterupt

bcf FLAGS, PULSEONL ;10ms is over, clear flags and output
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERL ;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQR, w
movwf PULSEL
goto EndInterupt

OffstateL
decfsz DWELLTIMEL, f ;count down dwell time to next pulse
goto EndInterupt
bsf FLAGS, PULSEONL ;if dwell is done turn on outputs
bsf STATUS, RP0 ;bank 1
bcf TRISIO, TRIGGERL ;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQR, w ;from frequency value
movwf DWELLTIMEL

EndInterupt
bcf PIR1, TMR2IF

movf status_temp,w ; retrieve copy of STATUS register
movwf STATUS ; restore pre-isr STATUS register contents
swapf w_temp,f
swapf w_temp,w ; restore pre-isr W register contents
retfie ; return from interrupt


;*************************************SUBROUTINES**********************************

Wait10ms
clrf TEMP2
movlw 0x0D
movwf TEMP1 ;rough 10ms timer for button debounce.

Loop1
decfsz TEMP2, f ;count down 256*3=768 cycles
goto Loop1
decfsz TEMP1, f ;count down 768*13=9986 cycles
goto Loop1
return

;*************************************************************
ReadEE
bsf STATUS , RP0 ;Bank1
movlw 0x04
movwf EEADR
bsf EECON1 , RD ;start read
movf EEDAT , W
bcf STATUS , RP0 ;Bank0
return
;*************************************************************

WriteEE
bsf STATUS , RP0
movwf EEDAT
movlw 0x04
movwf EEADR
bsf EECON1,WREN ;Enable write
bcf INTCON, GIE ;Disable INTs
btfsc INTCON, GIE ;See AN576
goto $-2
movlw 0x55 ;Unlock write
movwf EECON2
movlw 0xAA
movwf EECON2
bsf EECON1, WR ;Start the write
WaitForEEWrite
btfsc EECON1, WR ;wait for hardware to clear (done writing)
goto WaitForEEWrite
bcf STATUS , RP0 ;Bank0
bsf INTCON, GIE ;Enable INTS
return

;**********************************************************************************
;**********************************************************************************
;**********************************************************************************
main

clrf GPIO
clrf FLAGS
movlw 0x07
movwf CMCON0 ;comparators off
bsf STATUS, RP0 ;bank 1
movlw 0x1C
movwf TRISIO ;pin 0 & 1 & 5 out, all other inputs
clrf ANSEL ;all digital pins
movlw 0x14
movwf WPU ;enable week pullups
bcf OPTION_REG, 7 ;enable all week pullups
bcf STATUS, RP0 ;bank 0

movlw 0x01
movwf T2CON ;timer 2, prescale 1:4, no postscale
bsf STATUS, RP0 ;bank 1
movlw 0xFA
movwf PR2 ;setup 1ms hardware interupt
bsf PIE1, TMR2IE ;enable timer2 interupt
bcf STATUS, RP0 ;bank 0
bsf T2CON, TMR2ON ;turn on timer2
movlw 0xC0
movwf INTCON ;turn on interupts globally
movlw 0x0A ;start with 10ms pulse width
movwf LEDBLINK
movlw FIRERATE3 ;40ms dwell for 50ms freq
movwf PULSER
movwf PULSEL
movwf DWELLTIMER
movwf DWELLTIMEL
btfsc GPIO, CONTROLTYPE ;if pin 4 is pulled lo
bsf FLAGS, TRIGOUT ;leave output lo
call ReadEE ;get state value
movwf STATER
movf STATER, f
btfsc STATUS, Z
bsf FLAGS, LEDON ;get LED status


;******MAIN LOOP***************
Start
btfsc GPIO, PROGSTATE
goto Start ;wait for the fun to begin
call Wait10ms
btfsc GPIO, PROGSTATE ;button is down for 10ms
goto Start
Release
btfss GPIO, PROGSTATE ;wait for button release
goto Release
call Wait10ms
btfss GPIO, PROGSTATE ;wait for button release
goto Release

movlw 0x40
addwf STATER, f ;cyclic change in state manipulates
;last 2 bits in STATER.
movf STATER, w
call WriteEE ;store state

btfsc STATER, 7 ;state 1 or 2
goto Continue01
btfsc STATER, 6
goto State2
movlw FIRERATE1 ;state 1, off
movwf FREQR
bcf FLAGS, LEDON ;turn off LED
goto Start
State2
movlw FIRERATE1 ;state 2, 42ms cycle
movwf FREQR
bsf FLAGS, LEDON ;turn on LED
goto Start
Continue01
btfsc STATER, 6
goto State4
movlw FIRERATE2 ;state 3, 30 ms cycle
movwf FREQR
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop01
call Wait10ms
decfsz TEMP3, f
goto Loop01
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop02
call Wait10ms
decfsz TEMP3, f
goto Loop02
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop04
call Wait10ms
decfsz TEMP3, f
goto Loop04
bsf FLAGS, LEDON ;turn on LED
goto Start

State4
movlw FIRERATE3 ;state 4, 22ms cycle
movwf FREQR
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop05
call Wait10ms
decfsz TEMP3, f
goto Loop05
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop06
call Wait10ms
decfsz TEMP3, f
goto Loop06
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop07
call Wait10ms
decfsz TEMP3, f
goto Loop07
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop08
call Wait10ms
decfsz TEMP3, f
goto Loop08
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop09
call Wait10ms
decfsz TEMP3, f
goto Loop09
bsf FLAGS, LEDON ;turn on LED
goto Start






; initialize eeprom locations

ORG 0x2100
DE 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07


END ; directive 'end of program'


so just change the 40ms on right and left to 258ms or what would that do to it


PM That next time! Thats annoying!
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.