TLC1543 (AD converter) on ARPI600

filou
2018-01-25
2018-01-29
  • filou - 2018-01-25

    Hi,

    I'm using the adapter board ARPi600 for Arduino on my RPI3 (https://www.waveshare.com/arpi600.htm).
    On this board, there is an AD converter (TLC1543 with several analog channel).

    I would like to control the TLC1543 (it's like a serial interface but no SPI) by using 3 GPIO (16 for the clock, 20 for the address and 21 for the DataOut).
    The minimum task cycle with Codesys on the RPI3 is 400us.
    I would like to send the command faster (with a highest clock speed), is-there any way?
    Or a suggestion to help me?

    TLC1543: https://www.ti.com/lit/ds/symlink/tlc1543.pdf

    Thank you
    Philippe

     
  • Ingo

    Ingo - 2018-01-25

    Hi Phillipe,

    I don't know this board. But the documentation looks like there is a serial interface (uart) which is intended to be used with the Pi. What's the issue with this port?
    Because if you could use it, your driver would be much less timing critical, as the UART takes care about the bit timings.

    Just in case the UART would do the trick:
    I would recommend you to start with a function block that uses the UART by the library SysCom. If that works, I can help you to make a CODESYS driver out of it if you like.

    BR,
    Ingo

    Gesendet von meinem LG-H870 mit Tapatalk

     
  • filou - 2018-01-26

    Hi Ingo,

    unfortunately the serial interface (uart) is used for other things... (USB to UART for serial debugging but also as Xbee USB adapter).
    The TLC1543 is connected directly to standard GPIO (16, 20 and 21).

    Do you have another idea to send the data faster with these GPIO?

    kind regards,
    Philippe

    ARPI600 Schematic.pdf [368.78 KiB]

     
  • Ingo

    Ingo - 2018-01-26

    What a shame. I guess the Uart Solution would have been of interest and use for some others, too.

    I guess that the only way out for you is a project specific one. You can use the library CmpCharDevice to configure and write to the GPIOs, using the GPIO devices in the linux sysfs.
    Note, that you might have colitions with the GPIO driver if you use that in parallel. But that is just a bad feeling.

    Note, that this might cause a significant overhead, as you issue a linux system with every write operation.

    Gesendet von meinem LG-H870 mit Tapatalk

     
  • filou - 2018-01-29

    Hi Ingo,

    thanks for your advice!
    Could you give me a small example how to manage the library CmpCharDevice using the GPIO devices in the linux sysfs (for example write 1 on the output GPIO16) ?

     

Log in to post a comment.