PIC18F2525 Port C pins made output causes problems in other circuits


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: PIC18F2525 Port C pins made output causes problems in other circuits

    The other PIC does run the LCD but displays everything just fine until this PIC is plugged in. It also displays fine if plug the PIC in but comment out the setting of the TRIS registers for those four pins. I have been through the datasheet 100 times already and can find nothing. I even did the obligatory change everything for the sake of doing it just to see if I can trial and error my way to a solution. This includes the muiltiplex settings. There is one specifically that affects those pins but changing the multiplex settings doesn't change anything that I can see. I was just hoping somebody has had a similar experience and can show me some comment or misprint in the datasheet that I missed and would lead me to the promised land. As I said in my initial post, there are a lot of great people on this forum that would dedicate hours of their own time to helping me find the problem but I don't feel right asking for that because by the time somebody figured out all my "not commented" code and looked at my PCB layout (I didn't do a schematic, I just went straight to the layout) they would be hours into it. Thanks again.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: PIC18F2525 Port C pins made output causes problems in other circuits

    It would have been quicker to post your code of the pic driving the lcd.

  3. #3
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: PIC18F2525 Port C pins made output causes problems in other circuits

    I just found the issue. It is a mystery why this PIC was affecting the LCD but it appears the display is very sensitive to BOR. If the ground is switched off and back on within 15 seconds or so the LCD just displays gibberish. Past that, it is fine. Putting a 470 ohm resistor across the power and ground fixes the issue entirely. I am not sure why the presence or absence of a PIC with only the power circuit common would affect that but it does. Thanks for the suggestions.

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: PIC18F2525 Port C pins made output causes problems in other circuits

    Don't you mean capacitor instead of resistor? I would expect a small 470 ohm resistor across power and ground would do something funky, like magic smoke.

    On the PIC driving the LCD, do you have a short PAUSE to give time for the LCD to initialize?

    Also, when you connect the other PIC, does that also include connecting other devices that consume more current than PICs, LEDs and other low-consumption devices, possibly a motor, stepper, solenoid, etc?

    Adding a capacitor would stabilize the voltage on the circuit. Most circuits have capacitors right after the incoming power connection. It would seem as if you are adding a considerable load along with the other PIC, the voltage drops momentarily and the LCD doesn't like it.

    Of course this is all guesswork from a novice without any schematic or code.

    Robert

  5. #5
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: PIC18F2525 Port C pins made output causes problems in other circuits

    I just typed for 15 minutes explaining everything and pressed "Reply to Thread" instead of the button on the bottom "Post Quick Reply" which wiped out everything I typed. This might be something that could be fixed on the forum because I am sure I am not the only one and after this week, the last thing I needed was that.

    At 5v the 470 ohm draws a little less than 11 mA and less than 1/16 of a watt. No smoke and I wouldn't expect any.

    There are pauses to account for the LCD and I tried several different baud rates.

    Power consumption is not an issue. During regular operation everything draws 10% of the regulator's maximum capacity.

    During troubleshooting I went from cutting all the capacitors out to giving the ones normally in place other capacitors to hang out with so they wouldn't be lonely. None of it made a difference. Normally there are capacitors on both the supplied and supply side of all regulators as is the case here.

    The resistor is the only thing that has worked. It was done on a hunch based on "time" fixing the problem and an assumption that there was some stored charge somewhere causing the issue. I don't know exactly why it works but for now it does and that is what I needed.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: PIC18F2525 Port C pins made output causes problems in other circuits

    Try running the system from batteries and see what happens. I had a similar problem once and it was fixed by building a really good power supply.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: PIC18F2525 Port C pins made output causes problems in other circuits

    The system does run on batteries. That doesn't mean there aren't other sources of noise on the board but during troubleshooting I reduced or removed all of them to the maximum extent possible. I still think that has something to do with it but it is beyond my understanding and despite my curiosity in finding the cut and dry reason for everything, I just don't have time right now. It might be a retirement project of mine.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts