Page 1 of 1

Help

Posted: Wed Feb 16, 2011 3:00 pm
by wayne millard
Hi Team,

Can anybody please see what im doing wrong.
if you enter a baselenth of 1m press enter.
Then select velocity of 1000m/s then press enter. then press fire it should generate a 1ms start stop time/

Thanks
Wayne M

Re: Help

Posted: Thu Feb 17, 2011 9:22 am
by Dan81
Hello Wayne

Can you tell us what you are getting as pulse duration ?

Do you test it in "real" life or is it a simulation ?

Daniel

Re: Help

Posted: Thu Feb 17, 2011 9:49 am
by wayne millard
Hi,
The simulation seems to work but not when programmed in to the pic and using a oscilloscope both the start and the stop happen at the same time.

Thanks
wayne m

Re: Help

Posted: Thu Feb 17, 2011 8:33 pm
by medelec35
wayne millard wrote:Hi,
The simulation seems to work but not when programmed in to the pic and using a oscilloscope both the start and the stop happen at the same time.
On both simulation and real hardware, both stop and start will occur at the same time.
The reason it happens is because just before stop_flag decision icon, you have port c set at 1 since this is masked it will only affect bit 0.
then if stop_flag = 1 then you have got port c1 set at 2, this is also masked, so will not change the state of bit0 to 0 so both C0 and C1 will be at logic 1
For each shot count, do you want start led to go form on to off, then when goes off you want the stop led to go on for a brief time, then back off etc?
If you can explain step by step what events you want to occur e.g. Start led on, after 1ms start led off , stop led on for 500 us etc.
Then debugging will be easier.
In the mean time, see if this one is any better. Not tested on hardware.

Re: Help

Posted: Thu Feb 17, 2011 9:29 pm
by wayne millard
Hi medelec35,

Thanks for getting back to me. i will try it in the morning.

Wayne