Part Number: TM4C123GH6PZ
Hello,
I'm looking to implement the BiSS-C protocol to interface with an absolute encoder. I have 2 pins of my micro connected to an RS-422 transceiver to produce the required differential output. I was thinking of using a timer in PWM mode to produce the clock signal on my MA line. I start producing the clock signal at 500 kHz every 1 second. Then using edge capture on that same pin, generate a timer interrupt and read the state of the SLO line, reading in the bits this way. Based on the value of that bit, I run through a state machine. Once I have obtained my data and the timeout has passed, I stop generating the clock.
It seems as though I'm experiencing issues with my ISR. Adding debug statements in the ISR (simple count++) seems to completely change the data. Changing from positive edge capture to negative edge capture also completely changes the resulting data. I'm guessing I'm trying to accomplish too much in the ISR.
Has anyone done anything similar? I've scavenged the web and these forums. There's quite a few old posts and an application note for a BiSS-C hardware interface. Most people suggest using the SPI interface. Unfortunately, this board is already designed and the SPI peripheral isn't connected to a transceiver to create differential signals. Are there any other better suggestions or examples?
Regards,
CamK