What PIC are you using? Also what specific pin are you using?
What PIC are you using? Also what specific pin are you using?
Shawn
Nothing specific to that pin that should cause an issue. Have you measured voltage at that pin? It sounds like it is floating, possibly due to a broken trace or a bad connection.
Shawn
When measuring the voltage at the pin with the LED illuminated the presence of the meter causes the input to behave as expected and the voltage is around 300-400mv. With the LED off the voltage is ~5.4V. I have three boards that are all exhibiting the same problem so don't think it is broken trace or bad connection.
If you haven't disabled LVP mode, it may acts funny. It may also act funny if you
- haven't connect ALL Vss AND Vdd pins.
- have left MCLR pin floating
- haven't properly set all ADC register properly
- have a noisy PSU, lacking of decoupling cap
- etc
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
LVP mode is disabled.
- ALL Vss AND Vdd pins are connected
- MCLR pin isn't floating
- Believe ADC register properly set
- Using 7805 and capacitors which are the same on the board that works and the ones that don't
The other discovery is it appears to be more to do with that particular LED in the circuit I'm monitoring. As I mentioned, I'm monitoring 6 LEDs and 5 are working perfectly. If I swap the pin being used to monitor the problem LED the unreliability follows the LED. So swapping RB4 and RB3 the problem moves to RB3 and the LED then being monitored by RB4 works flawlessly.
The strange thing is with an identical circuit the monitor of all 6 is fine (the components are all the same values but from different supplier). It looks like I must be on the edge of some tolerances or something and going to wait until I have access to a scope on Wednesday to see if that helps me see what is going on.
Looks like you're on to something with the tolerances.
How about comparing datasheets between manufacturers in the meantime? It would serve as a good exercise.
Robert
![]()
Bookmarks