Question about FT5x06 controller (NHD-7.0-800480EF-ATXL-CTP)

Comments

5 comments

  • DominusDRR

    I have read some similar thread and tried to initialize the PCAP controller, but it is still not working.

    I share the code that manages the PCAP controller:


     LAT_RESET_PACP = 1;//digitalWrite(WAKE, HIGH);
     DelayMs(100);//delay(100);
     
     LAT_RESET_PACP = 0;//digitalWrite(WAKE, LOW);
     DelayMs(200);//delay(200);
     LAT_RESET_PACP = 1;//digitalWrite(WAKE, HIGH);
     DelayMs(200);//delay(200);//delay(200);


    ...

    // PACP_ADDRESS = 0x70
    I2C_FORMAT_7_BIT_ADDRESS(SlaveAddress, (unsigned char) PACP_ADDRESS, I2C_WRITE);

    ...

    TxOK = 1;

    DataSz = 2;

    i2cData[0] = SlaveAddress.byte;

    if(!SendStar(0))//Send a START
    {
         while(1);
    }

    Index = 0;
           
    while(TxOK && (Index < DataSz))
     {
                // Send a byte
                if (Send_A_Byte(i2cData[Index]))
                {
                    Index++;
                    if(!I2CByteWasAcknowledged(PCAP_I2C_BUS))
                    {
                        DBPRINTF("Error: Sent byte was not acknowledged\n"); [b]// Here comes the program counter.[/b]
                     
                       TxOKa = 0x00;
                    }

    ...
    0
  • Paul_B

    Hello,

    Regarding your first post, can you please tell me if your MCU has built-in pull up resistors?

    If so it is possible that it could be causing a weak pull-up.

    Finally, I recommend you use 10k Ohm resistors. If you get no response we will continue to debug  

    Thanks!

    0
  • DominusDRR

    Hi.

    Thanks for answering.

    The pull-up resistors are external.

    Tomorrow I will replace 2.2k resistors for 10k.

    I will also check if there are these internal resistors within MCU and if they are enabled in some way.

    Also the touch panel connector is connected to a long cable (approximately 15 cm) to the PCB.

    Do you think that you think could be the problem?

    0
  • Paul_B

    Hello,

    To answer your question yes, it is definitely possible. If you have some shorter jumper wires on hand it wouldn't hurt to swap them out.

    However, I do not believe this is the culprit

    0
  • DominusDRR

    Hi.

    I analyzed the data sheets of the MCU and there are no internal pull-up resistors

    I also put 10k resistors , but the microcontroller generates the Start , but fails to leave that state

    do
        {
            Status = I2CGetStatus(PCAP_I2C_BUS); // Never leaves this infinite loop
        } while (!(Status & I2C_START));

    where:


    *******************************************************************************
      Function:
        I2C_STATUS I2CGetStatus ( I2C_MODULE id )

      Summary:
        This is a routine to provide the current status of the I2C module.

      Description:
        This routine provides a bitmask of the current status flags for the I2C
        module.

      Precondition:
        None.

      Parameters:
        id      - Identifies the desired I2C module.

      Returns:
        The return value is a bitmask generated by a bit-wise OR of the I2C_STATUS
        flags that are currently set.

      Example:
        <code>
        status = I2CGetStatus(I2C1);
        if(I2C_ARBITRATION_LOSS & status)
        {
            // Handle arbitration loss
            //...
            I2CClearStatus(I2C1, I2C_ARBITRATION_LOSS);
        }
        </code>

      Remarks:
      *****************************************************************************/

    I put resistance of 5 k , and returns to the initial problem , similar to the resistance of 2.2 k


    My next step will be to reduce the length of the cable.

    0

Please sign in to leave a comment.