Page 4 of 5
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Tue Aug 27, 2024 6:33 pm
by chipfryer27
Hi
Sorry, I'm a bit out of the loop due to travel. A couple of months ago I was playing with one of these and got good repeatable results (all hail Martin) with a PIC. I think Martin also assisted with an ESP32 too.
Not had a chance to get back into my evil lab yet, but I think I still have my test setup that supported the sensor still assembled. I have both Uno and ESP32 so can try them when I get a chance. Not sure when that will be though but hopefully soon.
Regards
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Tue Aug 27, 2024 6:59 pm
by daddytims_tims
Hi
lain and Jorgen
I am having problem with the Map Function, it's not working, but before the summer it uses to work.
May be its the type of Chip am using
I only use my laptop just for FC v10 ONLY
I don't want to think this way.
but I am starting to wonder if something is wrong with my new win 11, I DONT USE FLASH DRIVE IN IT. wondering if it contracts some sort of virus Sunday gone. it was showing values in the morning. Then it just Stop.
I went back to my old program it works. but not working with the Latest one.
AM going to try back the esp32 and the wats the result.
regards
ryan
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Tue Aug 27, 2024 7:11 pm
by chipfryer27
Hi Ryan
Many free Anti-Virus solutions out there including Windows Defender so it is worth installing something.
Unlikely that the FC issues are related though.
You can test the Map functionality by just assigning variables in a calculation and viewing the results in Simulation Debugger or on a display.
Regards
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Tue Aug 27, 2024 9:14 pm
by daddytims_tims
Hi
I did Scan it with Win Defender, there's nothing there. it shouldn't be any virus thou.
>>I had no luck with the esp32
I simulated the OLD Project with the "MAP FUNCTION" and it work using the Pic16F877A.
I had an old example with the Map function using PWM as well and it responded too
Just confirm to I created a NEW Project with the HC-SR04, and Pic16f877a It work, showing its value, IMPRESSIVE READINGs
>> Still not showing values with the smaller uC "Pic18f1320" anymore Not sure why thou.
>> also trying using the "Map function" with the new project I just created. Map function Didn't response.
regards
Re: HC-SR04 Return 9999
Posted: Fri Oct 04, 2024 5:02 pm
by daddytims_tims
Hi
Can anyone check and tell me if the Sr04 components Is Working?
Mine is returning 9999 Now.
Thanks again.
regards
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Fri Oct 04, 2024 5:25 pm
by chipfryer27
Hi
A few months back I did some experimentation with these with good results.
Not sure if anything changed component wise since then.
If you could share your chart we can look and see if anything is astray.
Sorry, can't access hardware to check things but can maybe assist otherwise.
Regards
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Fri Oct 04, 2024 5:32 pm
by daddytims_tims
Hi
It's the same one. That I have been using earlier when it used to work.
Now am back to it and its returns 9999
regards
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Fri Oct 04, 2024 5:45 pm
by chipfryer27
Hi
Will download at weekend and have a look.
Regards
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Mon Oct 07, 2024 2:17 am
by 17712885438
There is a problem. The HC-SR04 is completely problem-free in V8. There have been problems with the V10. Does not work in proteus simulation.
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Mon Oct 07, 2024 3:06 am
by chipfryer27
Hi
The component seems to work OK in hardware on many different chips, as per forum posts with FCv10 creating the code. If Proteus has an issue would it not be better to ask Proteus why they cannot handle the code? Perhaps send them the C/Hex files you created for them to analyse why they can't simulate?
Regards