Page 2 of 7

Re: HB100 radar!

Posted: Fri Sep 17, 2021 8:57 pm
by jgu1
Ok Martin, but still no in display. Also not with signal generator, only 0

Re: HB100 radar!

Posted: Fri Sep 17, 2021 9:20 pm
by medelec35
I have just downloaded the flowchart I have posted & the Timer 2 properties looks like they have changed.
These should be the correct settings:
Timer2 interrupt settings.png
Timer2 interrupt settings.png (22.95 KiB) Viewed 3385 times

Re: HB100 radar!

Posted: Sat Sep 18, 2021 7:03 am
by jgu1
Thank´s Martin. I see now, to fast the old timer. I test later today /afternoon and you hear. I have send you a PM :D

Re: HB100 radar!

Posted: Sat Sep 18, 2021 1:12 pm
by medelec35
Hi, Jorgen.
If it still does not work, can you try injecting a CMOS compatible frequency directly into pin 11.
Make sure there is a good connection between GNDs of CMOS signal and MCU.
I have just tested on a 16F18877 and that is showing the correct frequency.
Thank you for the PM, I have sent you a reply. :)

I hope it does work for you.

Re: HB100 radar!

Posted: Sat Sep 18, 2021 4:26 pm
by jgu1
Hi again!

Strange it work for you and not for me.

I have change the timer2 . I try send frequency from 0 to 100hz 5V from my generator in on pin 11, Check my hardware many time, but no luck.

I suppose the input should have a very high impedance, so if I touch the input it should at least count something?

will you please check I have done it correct. Any idea Martin.

Re: HB100 radar!

Posted: Sat Sep 18, 2021 4:43 pm
by medelec35
Flowchart looks correct.
Do you have a scope or logic analyser you can connect directly between pin11 and GND?

Re: HB100 radar!

Posted: Sat Sep 18, 2021 4:49 pm
by jgu1
Yes, I have a scope (old analog). And when I look at this I have fine square 4,5V signal on the input.

Re: HB100 radar!

Posted: Sat Sep 18, 2021 5:18 pm
by jgu1
I have no try to add a flasher. at upstart I see the flash one time and after that it stop and the display is "running" with zero?

I seemed if I add something it stop. I also try to change the device. Could it be a bug with the interrupt in 16f876? I try to shift to a 16f88 tomorrow :D

Re: HB100 radar!

Posted: Tue Sep 21, 2021 7:49 pm
by jgu1
Hi Martin!

Finally get some more time to play :D

The 16f876 I see data in the display, but nothing count when I trig the input 4,7V square wave.

Now I perform some test with the Pic16f1937. To be sure the program is running I let B7 flash 5 time before continue, but nothing in the display.
When I test with my scope I don´t see anything on the display pin on the 1937, so no data.
Ok I will buy a 16F18877 as yours but anyway I suppose the 876 and the 1937 also should be able to do the same as your device?
Thank´s in advance.

Br Jorgen

Re: HB100 radar!

Posted: Tue Sep 21, 2021 7:54 pm
by medelec35
Hi Jorgen,
I have a 16F1937 so I can make sure it works with that target device.
I will get back to you after testing is complete.