Hot!PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering

Author
wsuraiders67
New Member
  • Total Posts : 30
  • Reward points : 0
  • Joined: 2016/11/10 08:01:54
  • Location: 0
  • Status: offline
2018/01/11 12:32:56 (permalink)
0

PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering

Hello,
 
I have developed a project using the PCAP touch demo board and when I have a I2C bus setup on I2C3 everything works fine and my display is displaying things perfectly. However, once I move my communication bus to I2C2 the LCD display starts to randomly flicker. I have not changed any of my display settings and as far as I can tell I do not see any noise being generated on the LCD lines when the I2C2 communication bus is running. Has anyone else seen this or have any suggestions for me to look at?
#1

11 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5217
    • Reward points : 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/11 15:26:56 (permalink)
    0
    Hi,
     
    Which Harmony version do you use ?
    did you derive your project from an existing example in Harmony ?
    Do you use your own board or a Microchip board ?
     
    Regards
    #2
    wsuraiders67
    New Member
    • Total Posts : 30
    • Reward points : 0
    • Joined: 2016/11/10 08:01:54
    • Location: 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/12 07:00:28 (permalink)
    0
    • I currently use harmony version 1.09.
    • I guess you could say that I derived my project from the demo that came on this board, but that was mainly just to get the LCD display settings correctly through harmony and the LCC driver settings, so essential just the backbone of the project. My project has developed quite far and is very different from the demo.
    • I am still using this demo board (P/N DM320015) currently for my project.
    Thanks for the response!
     
    #3
    RISC
    Super Member
    • Total Posts : 5217
    • Reward points : 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/12 07:30:40 (permalink)
    0
    Hi,
    The graphics LCC library was updated several times and the current version you use is a couple of years old...
    There is an errata on I2C3 which was resolved in later versions of the silicon.
    Please check the Rev ID of your prototype to make sure you do not use an old silicon
    Regards
     
    #4
    wsuraiders67
    New Member
    • Total Posts : 30
    • Reward points : 0
    • Joined: 2016/11/10 08:01:54
    • Location: 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/12 12:12:08 (permalink)
    0
    When I use I2C3 everything with my project works perfectly, it is when I use I2C2 that I have problems.
    #5
    RISC
    Super Member
    • Total Posts : 5217
    • Reward points : 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/12 15:47:08 (permalink)
    0
    Hi,
    Is your project using HW or SW (bitbang) I2C ?
    (Check Harmony setup) 
    Regards
     
    #6
    NKurzman
    A Guy on the Net
    • Total Posts : 16015
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/12 16:46:13 (permalink)
    0
    I am not seeing the I2C2 errata
     
    http://ww1.microchip.com/...eviceDoc/80000480P.pdf
    #7
    RISC
    Super Member
    • Total Posts : 5217
    • Reward points : 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/12 16:48:35 (permalink)
    0
    Errata is on I2C3 so I2C2 should be OK
    Regards
     
    #8
    wsuraiders67
    New Member
    • Total Posts : 30
    • Reward points : 0
    • Joined: 2016/11/10 08:01:54
    • Location: 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/15 07:46:02 (permalink)
    0
    I am not using the I2C driver provided through Harmony, I am using a custom driver.
    #9
    RISC
    Super Member
    • Total Posts : 5217
    • Reward points : 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/15 08:32:19 (permalink)
    0
    Hi,
    LCC library is very sensitive because it is SW driven...Any blocking SW or interrupt which take place during LCC refresh will create flickering...
    I would recommend to check your I2C driver handler interrupt ?  priority ?
    Also check the pins with an oscilloscope to make sure they are initialized as expected. 
    If this works with one I2C channel and not with another one it should have something to see with initialization
    Regards
    #10
    wsuraiders67
    New Member
    • Total Posts : 30
    • Reward points : 0
    • Joined: 2016/11/10 08:01:54
    • Location: 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/01/15 09:15:43 (permalink)
    0
    I used the same interrupt handler and priority for the I2C2 that I was using with I2C3 when all was working without flickering. I am initializing the pins the same way for I2C2 that I was when using I2C3. Do you believe it could have anything to do with the routing of the board on this demo board? On the demo board the I2C3 lines run over directly to the test connector whereas the I2C2 lines run around the oscillator and to the pads for J6. I2C2 is supposed to be used for the touch controller on this board, but I am not using the touch controller for my project so I went ahead and cut the traces going to the touch controller so that it was completely out of the circuit, but that did not seem to help either.
    #11
    wsuraiders67
    New Member
    • Total Posts : 30
    • Reward points : 0
    • Joined: 2016/11/10 08:01:54
    • Location: 0
    • Status: offline
    Re: PIC32MX795F512L PCAP demo board I2C2 usage causing random screen flickering 2018/02/20 12:21:43 (permalink)
    0
    I wanted to post an update on this because I have found the solution to the problem I was having. Using the I2C Slave Interrupt on I2C3 I was able to clear the interrupt flag at the end of the interrupt with a simple IFS1bits.I2C3SIF =1;. However, doing this with I2C2 caused the screen flickering I described in my initial post. Using the IFS1CLR register (i.e. IFS1CLR = 0x1000; for I2C2)  instead of writing IFS1bits.I2C2SIF =1; solved my problem.  
    #12
    Jump to:
    © 2018 APG vNext Trial Version 4.5