Hi
I am planning to build a coil gun and would like to have a way of meauring the muzzle velocity.
I could do this with multiple IC's, which I don't currently have.
A while ago I bought a programmer and a 16f628 and a 16f877 PIC's
I have a 4MHz ceramic oscilator and appropriate coupling capacitors. and 4 7 segment LED displays
Would it be possible for someone to give me a had writing the assembly code?
The easiers way that I could thing of doing this would be to use the 16f877 with two phototransistors and the 4 7 segment led displays.
The way I though the code would run would be
start
w=0
Is sensor 1 low
if not goto $-1
add 2 to W
is sensor 2 low
if not goto $-2
divide w by 10^6
divide 5x10^-3 by W
convert w into 4 decimal numbers store in temp1, temp2, temp3, temp4
display temp1 on 7 segment display1
display temp1 on 7 segment display1
display temp1 on 7 segment display1
display temp1 on 7 segment display1
is sensor 3 low
if notgoto $-5
goto start
with sensor 3 being a reset switch
sensors 1 and 2 being 5cm apart
would a program like this e pheasable?
I hsve not posted a schematic because I am not sure what ports to use
the speed should be between 0m and 50m per second
I am planning to build a coil gun and would like to have a way of meauring the muzzle velocity.
I could do this with multiple IC's, which I don't currently have.
A while ago I bought a programmer and a 16f628 and a 16f877 PIC's
I have a 4MHz ceramic oscilator and appropriate coupling capacitors. and 4 7 segment LED displays
Would it be possible for someone to give me a had writing the assembly code?
The easiers way that I could thing of doing this would be to use the 16f877 with two phototransistors and the 4 7 segment led displays.
The way I though the code would run would be
start
w=0
Is sensor 1 low
if not goto $-1
add 2 to W
is sensor 2 low
if not goto $-2
divide w by 10^6
divide 5x10^-3 by W
convert w into 4 decimal numbers store in temp1, temp2, temp3, temp4
display temp1 on 7 segment display1
display temp1 on 7 segment display1
display temp1 on 7 segment display1
display temp1 on 7 segment display1
is sensor 3 low
if notgoto $-5
goto start
with sensor 3 being a reset switch
sensors 1 and 2 being 5cm apart
would a program like this e pheasable?
I hsve not posted a schematic because I am not sure what ports to use
the speed should be between 0m and 50m per second
Last edited: