Hi
I'm doing a quadrature encoder interface (for 12 encoders) using the N2HET on the TMS570LS1115. I wanted to know which instruction on the IDLE I have to use to send the data to the CPU every sampling period of the motor controller (PI)
I have already see some posts about the code for the counting but I'm not sure about something... I need to make the counting and depending which channel rises first, the count can go up or can go down... which condition would be the if??
I have this code for one encoder:
A1_edge_detect ECNT { prv=ON,pin=0,event=RISE,reg=A,irq=OFF,data=0};
A1_count CNT { reg=A,comp=EQ,irq=OFF,max=360,data=0};
B1_edge_detect ECNT { prv=ON,pin=0,event=RISE,reg=A,irq=OFF,data=0};
B1_count CNT { reg=A,comp=EQ,irq=OFF,max=360,data=0};
I'm not sure if it is ok...
But, as you can see on the CNT, I dont have an irq, because I need the data to be send to the CPU every X time...
I hope you can help me...
Best regards!
Mike