I am using a pic 24FJ256GB106, and am experiencing problems reading a discrete input on pin 23 (RB10). No matter what level the input is, I always ready the pin as a logic low. I have attached a simplified test project that exhibits the problem for your review. And suggestions are welcome. Thank you.
csouter
Problems reading discrete on PIC24FJ256GB106
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Problems reading discrete on PIC24FJ256GB106
Does this code work OK with a different pin input then, such as RB11?
I've done a review of the FCD setup, such as turning off ADC for this pin, and all looks OK to me.
All other features for this pin seem to be off by default/reset, according to the datasheet,
but I've no experience with this family of devices, so that's as much as I can do to help.
I've done a review of the FCD setup, such as turning off ADC for this pin, and all looks OK to me.
All other features for this pin seem to be off by default/reset, according to the datasheet,
but I've no experience with this family of devices, so that's as much as I can do to help.
-
- Posts: 21
- Joined: Fri Jul 28, 2017 10:58 pm
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Problems reading discrete on PIC24FJ256GB106
This problem is persistent. I can write a program for MpLab, and it reads the B10 discrete without any problem. I try to read it in FlowCode, and I always get a logic low. I import the C code from my MpLab project, and it doesn't work (imported as a c code block). I want to use the FlowCode development environment, but I need to be able to get this pin to work. What is double puzzling is that I can read the other pins on the chip without any problem.
Thank you for any suggestions you may have.
Thank you for any suggestions you may have.