Greenhouse

43 views
Skip to first unread message

jos smans

unread,
Apr 9, 2024, 10:56:10 AM4/9/24
to jallib
Good day, i have a problem with a program to make   automatic my greenhouse. With pic 18f4455,  it  works fine, but not with pic 18f4431.I think its a adc fault but i am not sure.
Can someone help me? thanks
serre4431a.jal

Rob CJ

unread,
Apr 9, 2024, 1:48:03 PM4/9/24
to jallib
Hi Jos,

The problem is in the ADC library. Apparently the 18F4431 has a different way of selecting the ADC channel that I have never seen before.

I made a quick fix and added the channel selection for your PIC but to the attached ADC library did not test this so you should give it a try. The code I added could be simplified but that is something that could be done later.

So place the attached ADC library in the directory of your program recompile it and let me know if it works.

Thanks.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens jos smans <sman...@gmail.com>
Verzonden: dinsdag 9 april 2024 16:56
Aan: jallib <jal...@googlegroups.com>
Onderwerp: [jallib] Greenhouse
 
Good day, i have a problem with a program to make   automatic my greenhouse. With pic 18f4455,  it  works fine, but not with pic 18f4431.I think its a adc fault but i am not sure.
Can someone help me? thanks
--
You received this message because you are subscribed to the Google Groups "jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallib+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/eaae0d75-efe1-4bdc-b6ce-ca87db6dd560n%40googlegroups.com.
adc.jal

jos smans

unread,
Apr 9, 2024, 3:10:00 PM4/9/24
to jal...@googlegroups.com
Hi Rob,
Thank you very much for your support. It works excellent.
Kind regards
Jos

Op di 9 apr 2024 om 19:48 schreef Rob CJ <rob...@hotmail.com>:

jos smans

unread,
Apr 9, 2024, 3:45:44 PM4/9/24
to jal...@googlegroups.com
hi Rob,
I have compiled  the 18f4431 and a hex file was made, but after programming  the pic with pickit 3, the error occurred "programming failed at program memory address 0x000000".Maybe the adc library must, as you said before, changed.
kind regards
Jos

Op di 9 apr 2024 om 21:09 schreef jos smans <sman...@gmail.com>:

vsurducan

unread,
Apr 10, 2024, 1:20:25 AM4/10/24
to jal...@googlegroups.com
That is a programming issue not a library issue. Check hardware, supply, cable length, wires with cold solder or even not connected, programmer speed, programmer software malfunction. I guess you need pickit3 plus or pickit3 minus to program that pic. With a correct definition file.

jos smans

unread,
Apr 10, 2024, 3:43:34 AM4/10/24
to jal...@googlegroups.com
hi Vsurcan,
I think not it is a hardware issue because i reprogrammed  the pic but also pic 18f4455 which programmed perfectly, so i think not it is a power connection ,programmer speed or something else.
Anywhere thanks for suggestions.
kind regards
Jos

Op wo 10 apr 2024 om 07:20 schreef vsurducan <vsur...@gmail.com>:

Hans van Veldhuizen

unread,
Apr 10, 2024, 5:57:42 AM4/10/24
to jallib
Hello Jos,
I have the same problem every now and then. I use Pckit3 plus. then use the following tricks.
   Read, Erase and then check if it is empty.
Remove from the circuit and erase directly and check with a regular 5 volt charger. Usually it's fine again.
Hans

Op woensdag 10 april 2024 om 09:43:34 UTC+2 schreef jos smans:

Rob CJ

unread,
Apr 10, 2024, 12:32:35 PM4/10/24
to jallib
Hi Jos,

Good to hear that it works. Will add it later to GitHub so it becomes part of the latest bee-package (after the release is done).

About the programming issue. I also have it sometimes and it depends on the PICKit3 I am using. I have two - different - Chinese copies and one of them is more sensitive to this problem than the other.

It may help to add sufficient decoupling capacitors close to the PIC. 

Enjoy your Greenhouse 🙂.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens Hans van Veldhuizen <hanz...@zeelandnet.nl>
Verzonden: woensdag 10 april 2024 11:57
Aan: jallib <jal...@googlegroups.com>
Onderwerp: Re: [jallib] Greenhouse
 

jos smans

unread,
Apr 10, 2024, 4:00:17 PM4/10/24
to jal...@googlegroups.com
Hi Rob, Thank you for your support. After programming, it's time to make a printing board, place components and so on .
kind regards
Jos


Op wo 10 apr 2024 om 18:32 schreef Rob CJ <rob...@hotmail.com>:
Reply all
Reply to author
Forward
0 new messages