| Electronic Components Datasheet Search |
|
LS7166 Datasheet(PDF) 18 Page - LSI Computer Systems |
|
|
|||||||||||||||||||||||||||||
LS7166 Datasheet(HTML) 18 Page - LSI Computer Systems |
|
18 / 19 page ![]() /* QR (Quadrature Register) */ /* Select QR */ #define QR(arg) (arg | 0xC0) /* Enable x4 Quadrature Mode */ #define En_x4QM 0x03 /* Enable x2 Quadrature Mode */ #define En_x2QM 0x02 /* Enable x1 Quadrature Mode */ #define En_x1QM 0x01 /* Disable Quadrature Mode */ #define Dis_QM 0x00 /************************************************************************/ /* Initialize 7166 */ void Init_7166(int Addr) /* Initialize 7166 as follows Do a Master Reset Set ICR as follows Set Input A = Up Count Set Input B = Down Count Disable Inputs A/B Enable Reset_CNTR input Enable Load_CNTR input Set OCCR – Normal Count Mode Disable QM Enable A and B Inputs */ void Init_7166(int Addr){ /* Master Reset */ outp(CTRLMODE(Addr), MCR(Rst_Master)); /* Set ICR */ outp(CTRLMODE(Addr), ICR(AUP_BDN + DisAB + RCNTR + LCNTR)); /* Set OCCR */ outp(CTRLMODE(Addr), OCCR(Nrml_Cnt)); /* Set QR */ outp(CTRLMODE(Addr), QR( Dis_QM)); /*Enable A and B inputs */ outp(CTRLMODE(Addr), ICR(EnAB)); } 7166-081507-18 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |