Page 1 of 1

PI16F324 PortA

Posted: Mon Jun 20, 2022 8:42 pm
by dz2869
Hello,

I am having some trouble with PortA inputs on the PIC16F15324 part.
Attached is a simple program that turns an LED on when the push button is pressed.
The LED turns off when the button is released. This program simulates fine inside of flowcode.
However the program does not run in real hardware. After some playing around a bit I found that the problem was PortA.
When the button is connected to PortA,5 the program simulates fine but does not run in hardware.
When the button is connected to PortC,5 everything works fine.

Any thoughts are appreciated.
Thanks

Re: PI16F324 PortA

Posted: Mon Jun 20, 2022 10:42 pm
by chipfryer27
Hi

In configurations (Build > Project Options) you have Port A5 set as "External Clock In". That's probably your problem.

Regards

Re: PI16F324 PortA

Posted: Mon Jun 20, 2022 11:16 pm
by dz2869
Thanks for the Reply
I believe I have that disabled.

Thanks

Re: PI16F324 PortA

Posted: Mon Jun 20, 2022 11:26 pm
by dz2869
OK
Cancel that.
I had the CLK out Disabled.
I diabled the Clk in and it works fine.

Thanks for pointing me in the right direction.

Re: PI16F324 PortA

Posted: Mon Jun 20, 2022 11:54 pm
by chipfryer27
Hi

Glad it's working. I've often overlooked things myself :)