This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reading Bits of the ICE SN65HVS882 Only Bits 0, 1 , 3 Can Be Read

Other Parts Discussed in Thread: SN65HVS882

Folks,

I have an AM335X_BOARD_TYPE_ICE, and I am trying to read the digital pins from the SN65HVS882 (8 digital input serializer). I can read bits 0, 1, and 3 successfully, but when I try to ready the rest of the pins I can't do it. There are 8 inputs/bits in the SN65HVS882. There is a variable in the Texas Instruments SDK called "rx_data_hvs" that stores the entire byte of the data coming from the serializer, but I only see the aforementioned 3 bits changing, while the rest are always zero. I also checked my hardware output, and the output is correct. My hardware has 8 outputs, and I can change all 8 outputs between 0V and 24V, which is what I want.

I there anything that I have to enable so that the rest of the bits can change as they are manipulated so that it can work?

  • Hi,

    Which version of the ICE board do you have, and what is the version of the Industrial SDK that you use? Can you check the LP pin of the SN65HVS882? It should be held high during the entire time the byte is shifted out of the serializer.
  • I have v1 of the ICE board. I am using version v01.01.00.10  and v01.01.00.08 of the SDK

    The code seems fine. Here is a snippet of how I am reading from the chip:

    unsigned short UTILsReadHVS(void)
    {
        unsigned char tx_data[10];					// Spi Tx Data Struct
        volatile unsigned int loop = 0;
        if (AM335X_BOARD_TYPE_ICE == am335x_board_type )
        {
    	/* Toggle GPIO for HVS882 input load pulse (low active)*/
            GPIOPinWrite(SOC_GPIO_3_REGS, 18,0);
            for(loop = 0; loop < 500; loop++);
            GPIOPinWrite(SOC_GPIO_3_REGS, 18,1);
    
    	tx_data[0] = 0;

    // (SPI_ID, buffer, length, channel_number) McSPICycle(MCSPI_INST_HVS882_ICE, tx_data, 1, MCSPI_HVS882_CH_ICE);// 1 word read from HVS input
    rx_data_hvs = tx_data[0]; } }

  • I believe you meant "LD" pin
  • Hi,

    I quickly tried the EtherCAT application from 1.1.0.10(This uses Digital inputs internally). I am able to read values upto 0x80 in the application on an ICEv1. Is this a custom hardware/software?

    Regards,
    Vinesh
  • I just learned that the minimum input voltage for the HVS digital pins is 9V. So even though my external hardware was outputting 24V, by the time the signal gets to the serializer it would drop down to 3V. I changed some resistors on the external hardware, and now 12V reach the digital pins. The system is working now.