aegis
Junior Member level 2
running led project using at89c51
Currently i'm doing some chronograph project, i'd like to calculate the speed of bullet ithin some distance between two photodiode sensors, i use 8051 one of the timer mode, to record bullet time travel from first sensor and to the second, after that i simply use velocity calculation to get the speed of the bullet,
i planned that these chronograph will be able to calculate velocity between 90 - 1000 fps (feet per second). i use 12Mhz crystals oscillators so that 1 cycle machine is equal to 1µs , so lets says for the worse case, the maximum time before the timer overflow is
TH * TL * one cycle machine time = 255 * 255 * 1µs = 65025 µs
i set the range between two sensors are about 0,5 feet (15,24 cm)
then i calculate 90 fps , so it takes about 5555,56 µs
for 1000 fps , it takes 500 µs
so that i will never have a timer overflow problem, but i'd like to ask some question :
1.how to write codes on AT89S51 for arimethic math operation in assembly language or maybe BASIC language(i don't understand C language), like multiply or dividing operation ?
2.is there any suggestion for this project, advice, links, comments are welcomed , thx
Currently i'm doing some chronograph project, i'd like to calculate the speed of bullet ithin some distance between two photodiode sensors, i use 8051 one of the timer mode, to record bullet time travel from first sensor and to the second, after that i simply use velocity calculation to get the speed of the bullet,
i planned that these chronograph will be able to calculate velocity between 90 - 1000 fps (feet per second). i use 12Mhz crystals oscillators so that 1 cycle machine is equal to 1µs , so lets says for the worse case, the maximum time before the timer overflow is
TH * TL * one cycle machine time = 255 * 255 * 1µs = 65025 µs
i set the range between two sensors are about 0,5 feet (15,24 cm)
then i calculate 90 fps , so it takes about 5555,56 µs
for 1000 fps , it takes 500 µs
so that i will never have a timer overflow problem, but i'd like to ask some question :
1.how to write codes on AT89S51 for arimethic math operation in assembly language or maybe BASIC language(i don't understand C language), like multiply or dividing operation ?
2.is there any suggestion for this project, advice, links, comments are welcomed , thx