This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Capture Qei position and send to usb

Hi
I want to draw graphs of position of 2-phased QEI versus time. so I want to capture QEI position every time period. time gap between to position pulses is at least 7.2 microseconds.
I think I have to choose one of these methods:

1-send position to USB during time overflow interrupt(TIM_INT)

2-send content of the timer when the situation changes. (I don't know if it is possible to sense the changes as an interrupt?)

I think there are some restrictions due to interrupt latancy. so what is the highest resolution for my system. and which method is better? How can I define interrupt for 2nd method?
can i send data to buffer and send batch buffer to USB? Is it help me Reduce interrupt latancy effects? HOW?
Please Help me
Best Regards

Parents
  • >When the buffer holds 512 bytes (sector size) or more, one sector of data is written to the USB drive.

    Thanks Dr Tsuneo Chinzei

    But how can i detect that number of bytes written in QEITIME is 512?
    And how to Empty the buffer after writing data?

    An other Question: Is it correct to write LPC_QEI->FILTER =0xc8; /*200*/ to filter less than 2us when clock is 100mhz?

    Best Regards?

Reply
  • >When the buffer holds 512 bytes (sector size) or more, one sector of data is written to the USB drive.

    Thanks Dr Tsuneo Chinzei

    But how can i detect that number of bytes written in QEITIME is 512?
    And how to Empty the buffer after writing data?

    An other Question: Is it correct to write LPC_QEI->FILTER =0xc8; /*200*/ to filter less than 2us when clock is 100mhz?

    Best Regards?

Children
  • I still haven't got answered my previous questions!
    I don't know how to get access to the buffer that included timer(QEITIME) values?

    another question:
    what is the practical difference between set register & enable register(QEISET & QEIIES)? Can you give me an example please?

    Amir
    hejazi1365[at]gmail[dot]com
    Best regards