: Need help writing a delay routine to turn on port b pin one at a 15 KHz rate. Any Ideas : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks :
I need to measure a very short pulse width(5 us). Can anyone do that??
: : Need help writing a delay routine to turn on port b pin one at a 15 KHz rate. Any Ideas : : : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks : : : : I need to measure a very short pulse width(5 us). Can : anyone do that?? : : Yes, the same to me. Only it has to be a pulse width of 8us.
: : : Need help writing a delay routine to turn on port b pin one at a 15 KHz rate. Any Ideas : : : : : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks : : : : : : : I need to measure a very short pulse width(5 us). Can : : anyone do that?? : : : : Yes, the same to me. Only it has to be a pulse width of 8us. : : i am trying to use 2 ic(1 for rise, 1 for fall)
: : : : Need help writing a delay routine to turn on port b pin one at a 15 KHz rate. Any Ideas : : : : : : : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks : : : : : : : : : : I need to measure a very short pulse width(5 us). Can : : : anyone do that?? : : : : : : Yes, the same to me. Only it has to be a pulse width of 8us. : : : : i am trying to use 2 ic(1 for rise, 1 for fall) : : I think we cant make a pulse of 5us or 8us! My 68hc11 drives on a 8Mhz crystal so the 68hc11 use one-fourht of that the crystal supplied. Thus the clock speed is 2 Mhz. So you cant make a pulse of a 5us(=5Mhz) or 8us(=8Mhz).
;Test. ;ACCA = $FF ;ACCB = $00
START: STAA #$1004,$FF ;Make port C high. STAB #$1004,$00 ;Then make port C low. JMP START ;Again. END.
STAA takes 3 cycles. STAB takes 3 cycles. This are 6 cycles so if you see you cant make that pulse with the 68HC11 if im right.!!!
: : : : : Need help writing a delay routine to turn on port b pin one at a 15 KHz rate. Any Ideas : : : : : : : : : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks : : : : : : : : : : : : : I need to measure a very short pulse width(5 us). Can : : : : anyone do that?? : : : : : : : : Yes, the same to me. Only it has to be a pulse width of 8us. : : : : : : i am trying to use 2 ic(1 for rise, 1 for fall) : : : : : I think we cant make a pulse of 5us or 8us! : My 68hc11 drives on a 8Mhz crystal so the 68hc11 use one-fourht of that the crystal supplied. Thus the clock speed is 2 Mhz. : So you cant make a pulse of a 5us(=5Mhz) or 8us(=8Mhz). : : ;Test. : ;ACCA = $FF : ;ACCB = $00 : : START: : STAA #$1004,$FF ;Make port C high. : STAB #$1004,$00 ;Then make port C low. : JMP START ;Again. : END. : : STAA takes 3 cycles. : STAB takes 3 cycles. This are 6 cycles so if you see you cant make that pulse with the 68HC11 if im right.!!! : : Maybe we can overclock the 68hc11????!!!! : : : I dont want to make a pulse, I want to measure a pulse using input capture. On a 2mhz processor, each clock cycle is .5us. So, 6 cycles should equal 3us.
Comments
:
: How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks
:
I need to measure a very short pulse width(5 us). Can
anyone do that??
: :
: : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks
: :
:
: I need to measure a very short pulse width(5 us). Can
: anyone do that??
:
: Yes, the same to me. Only it has to be a pulse width of 8us.
I found something in a book!!! It makes a delay of 10ms. ;-)
===================================
;Subroutine DLY10
;Time delay of approx. 10ms
;really loops 3400 times for a delay of 6*3400*E
;No calling registers
;No return registers
;CCR affected, rest unaffected
DLY10
PSHX ;preserve IX
LDX #3400 ;init loop
LDLDY10 ;run loop
DEX
BNE
PULX ;restore IX
RTS
===================================
So i think if you want a delay of 1ms you init. the loop whit #340.
I will testing this with my scope, if i have some free time. I hope it work.
: : :
: : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks
: : :
: :
: : I need to measure a very short pulse width(5 us). Can
: : anyone do that??
: :
: : Yes, the same to me. Only it has to be a pulse width of 8us.
:
: i am trying to use 2 ic(1 for rise, 1 for fall)
: : : :
: : : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks
: : : :
: : :
: : : I need to measure a very short pulse width(5 us). Can
: : : anyone do that??
: : :
: : : Yes, the same to me. Only it has to be a pulse width of 8us.
: :
: : i am trying to use 2 ic(1 for rise, 1 for fall)
:
:
I think we cant make a pulse of 5us or 8us!
My 68hc11 drives on a 8Mhz crystal so the 68hc11 use one-fourht of that the crystal supplied. Thus the clock speed is 2 Mhz.
So you cant make a pulse of a 5us(=5Mhz) or 8us(=8Mhz).
;Test.
;ACCA = $FF
;ACCB = $00
START:
STAA #$1004,$FF ;Make port C high.
STAB #$1004,$00 ;Then make port C low.
JMP START ;Again.
END.
STAA takes 3 cycles.
STAB takes 3 cycles. This are 6 cycles so if you see you cant make that pulse with the 68HC11 if im right.!!!
Maybe we can overclock the 68hc11????!!!!
: : : : :
: : : : : How do I count the cpu cycles to develop a loop to turn the pin on nad off? Any ideas would be helpful. Thanks
: : : : :
: : : :
: : : : I need to measure a very short pulse width(5 us). Can
: : : : anyone do that??
: : : :
: : : : Yes, the same to me. Only it has to be a pulse width of 8us.
: : :
: : : i am trying to use 2 ic(1 for rise, 1 for fall)
: :
: :
: I think we cant make a pulse of 5us or 8us!
: My 68hc11 drives on a 8Mhz crystal so the 68hc11 use one-fourht of that the crystal supplied. Thus the clock speed is 2 Mhz.
: So you cant make a pulse of a 5us(=5Mhz) or 8us(=8Mhz).
:
: ;Test.
: ;ACCA = $FF
: ;ACCB = $00
:
: START:
: STAA #$1004,$FF ;Make port C high.
: STAB #$1004,$00 ;Then make port C low.
: JMP START ;Again.
: END.
:
: STAA takes 3 cycles.
: STAB takes 3 cycles. This are 6 cycles so if you see you cant make that pulse with the 68HC11 if im right.!!!
:
: Maybe we can overclock the 68hc11????!!!!
:
:
: I dont want to make a pulse, I want to measure a pulse
using input capture. On a 2mhz processor, each clock cycle
is .5us. So, 6 cycles should equal 3us.