Recent update of HCSR04

Any bugs you encounter with Flowcode should be discussed here.
ELECTRONICA67
Posts: 83
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 20 times
Been thanked: 6 times

Flowcode v10 Recent update of HCSR04

Post by ELECTRONICA67 »

Hello,

I received an update for the HCSR04 sensor, but from that update the sensor sends a reading of 0, I am using the PIC16F1847, I tested the sensor with another program and if it works, I think there is something wrong with the update of the file component HCSR04. :(

Enrique
Thanks

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Recent update of HCSR04

Post by medelec35 »

Hello.
Have you got the Use Timer interrupt to yes and set the timer for timer 0 and pre and post scaler both at 1:1?
Martin

ELECTRONICA67
Posts: 83
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 20 times
Been thanked: 6 times

Flowcode v10 Re: Recent update of HCSR04

Post by ELECTRONICA67 »

I tested it using a PIC16f887 and it worked :o

ELECTRONICA67
Posts: 83
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 20 times
Been thanked: 6 times

Re: Recent update of HCSR04

Post by ELECTRONICA67 »

I tested it using a PIC16f819 and PIC16f1847 and it not worked
( Use Timer interrupt to yes and set the timer for timer 0 and pre and post scaler both at 1:1 )

ELECTRONICA67
Posts: 83
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 20 times
Been thanked: 6 times

Flowcode v10 Re: Recent update of HCSR04

Post by ELECTRONICA67 »

I can connecting echo B6 and trigger B7, timmer0 1:1 1:1 work ? :?: or B0 and B1

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Recent update of HCSR04

Post by medelec35 »

Have you tried the one second flasher test to check your target device is running at the correct speed?
Martin

ELECTRONICA67
Posts: 83
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 20 times
Been thanked: 6 times

Re: Recent update of HCSR04

Post by ELECTRONICA67 »

Hi Martin;

Yes, in fact it is working with a program that you made in Flowcode 5, but the process is simpler in flowcode 10; use the same PCBs in the process you designed in V5 if it works; Even a few months ago you fixed that component in V10, it only multiplied the reading by 1.65 and the distance was almost exact.
The problem restarted. with an update from a few days ago; now the reading is 0 zero, in V10. For now I am preferably using PIC16F1847 and PIC16F819, I did a test in V10 with the PIC16F887 and if I perform the measurements correctly.

ELECTRONICA67
Posts: 83
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 20 times
Been thanked: 6 times

Re: Recent update of HCSR04

Post by ELECTRONICA67 »

Hello Martin,

I sent the readings with a file from the sensor that you designed in flowcode 5 with its reading and physical measurement and included the measurement with the flowcode 10 component on display and physically as well as the configuration. I use the PIC16F1847 or the PIC16F819, I send the readings using RF NRF24L01.
I have sent the data in BYTE, STRING, FLOAT, but in all cases the data sent is 0 zero.

Enrique
Attachments
LECTold.jpg
LECTold.jpg (87.76 KiB) Viewed 194 times
CONFIG.jpg
CONFIG.jpg (42.03 KiB) Viewed 194 times
TXtest_1847v10.fcfx
(13.8 KiB) Downloaded 7 times

ELECTRONICA67
Posts: 83
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 20 times
Been thanked: 6 times

Re: Recent update of HCSR04

Post by ELECTRONICA67 »

the rest of the photographs
Attachments
LECTv10.jpg
LECTv10.jpg (45.7 KiB) Viewed 194 times
medicREAL.jpg
medicREAL.jpg (33.25 KiB) Viewed 194 times

jgu1
Posts: 615
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 507 times
Been thanked: 132 times

Re: Recent update of HCSR04

Post by jgu1 »

Hi Enrique!

I see on your picture you use the waterproff device. For this you have to choose the AJ-SR04M type in properties and you have to play with the
Timer, Prescaler and Postscaler, maybe this could help you ;)

Br Jorgen

Post Reply