View Single Post
Old 13-11-2010, 11:48 PM   #15
wakener_thesun
Nhập môn đệ tử
 
Tham gia ngày: Oct 2009
Bài gửi: 6
:
Trích:
Nguyên văn bởi ngcanh_dtdn View Post
Bản mình đang dùng là v4.107 trong Help có đoạn sau
Code:
setup_qei( )
--------------------------------------------------------------------------------
Syntax: setup_qei( [unit,]options, filter,maxcount );
 
Parameters: Options- The mode of the QEI module. See the devices .h file for all options

Some common options are:

  · QEI_MODE_X2

  · QEI_TIMER_GATED

  · QEI_TIMER_DIV_BY_1

filter- This parameter is optional and the user can specify the digital filter clock divisor.

maxcount- This will specify the value at which to reset the position counter.

unit- Optional unit number, defaults to 1.
 
Returns: void 
 
Function: Configures the Quadrature Encoder Interface. Various settings like modes, direction can be setup. 
 
Availability: Devices that have the QEI module.

Requires: Nothing.
 
Examples: setup_qei(QEI_MODE_X2|QEI_TIMER_INTERNAL,QEI_FILTER_DIV_2,QEI_FORWARD);

Example Files: None 

Also See:  qei_set_count() , qei_get_count() , qei_status().
vậy bạn gửi bộ setup cho mình qua mail được ko? mail mình là daovietkimlong@gmail.com

thanks
wakener_thesun vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn