augustinetez
Active Member
Been pulling the hair out trying to sort either a coding or register configuration problem for the last couple of days.
A simple toggle of a pin (16F886, PORTC,4) to change some data displayed on the LCD wouldn't work.
Initially couldn't figure out why a pin was sitting at 5V with nothing connected to it and it's TRIS register set to an input.![Confused :confused: :confused:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Then after correcting that problem and using a new PIC, it still wouldn't work.![facepalm :facepalm: :facepalm:](/styles/default/xenforo/smilies/facepalm.png)
Turns out I should have taken a week off from any sort of electronics stuff - in order of stupidity:-
1/ I managed to connect said pin on PIC #1 to the incoming unregulated supply - input pin fried.![Oops! :oops: :oops:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
2/ Somehow, there occurred a short on the test jig and the PIC was being fed 9.95 V instead of 5V.![arghh :arghh: :arghh:](/styles/default/xenforo/smilies/arghh.png)
So, after giving myself a good smack around the ears and fixing those problems, I confidently sat down and plugged a new PIC in, expecting to see the correct operation of the program - not to be.
3/ I had managed to bend the pin over, so it wasn't actually plugged in to the socket.![banghead :banghead: :banghead:](/styles/default/xenforo/smilies/banghead.png)
Result - 3 PIC's all fed 9.95V - one with a fried input but otherwise still working and two others both working fine - for now - I suspect they will drop dead sooner rather than later.![Mad :mad: :mad:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
![Mad :mad: :mad:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
![Mad :mad: :mad:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
A simple toggle of a pin (16F886, PORTC,4) to change some data displayed on the LCD wouldn't work.
Initially couldn't figure out why a pin was sitting at 5V with nothing connected to it and it's TRIS register set to an input.
Then after correcting that problem and using a new PIC, it still wouldn't work.
![facepalm :facepalm: :facepalm:](/styles/default/xenforo/smilies/facepalm.png)
Turns out I should have taken a week off from any sort of electronics stuff - in order of stupidity:-
1/ I managed to connect said pin on PIC #1 to the incoming unregulated supply - input pin fried.
2/ Somehow, there occurred a short on the test jig and the PIC was being fed 9.95 V instead of 5V.
![arghh :arghh: :arghh:](/styles/default/xenforo/smilies/arghh.png)
So, after giving myself a good smack around the ears and fixing those problems, I confidently sat down and plugged a new PIC in, expecting to see the correct operation of the program - not to be.
3/ I had managed to bend the pin over, so it wasn't actually plugged in to the socket.
![banghead :banghead: :banghead:](/styles/default/xenforo/smilies/banghead.png)
Result - 3 PIC's all fed 9.95V - one with a fried input but otherwise still working and two others both working fine - for now - I suspect they will drop dead sooner rather than later.