| Electronic Components Datasheet Search |
|
CS18101X Datasheet(PDF) 36 Page - Cirrus Logic |
|
|
|||||||||||||||||||||||||||||
CS18101X Datasheet(HTML) 36 Page - Cirrus Logic |
|
36 / 54 page ![]() 36 ©Copyright 2005 Cirrus Logic, Inc. DS651UM23 Version 2.3 CobraNet Hardware User’s Manual HMI Reference Code 8.3 CM-1, CM-2 Auto-detection The following function is useful for systems that support both the CM-1 and CM-2 or where a CobraNet interface is an optional add-in. Detect() returns 0 if no CobraNet interface module is detected, 1 for CM-1 and 2 for CM-2. int Detect( void ) { /* check for presence of CM-1 */ MSG_B = 0x55; /* write to CM-1 CVR register */ DATA_A = 0xaa; /* write to unused CM-1 register to flip data bus */ if( MSG_B == 0x55 ) { /* read back CVR */ /* redo same detection with different data */ MSG_B = 0x3c; DATA_A = 0xc3; if( MSG_B == 0x3c ) { return 1; /* CM-1 detected */ } } /* check for presence of CM-2 */ /* issue identify command */ MSG_C = MOP_IDENTIFY; MSG_D = CVR_MULTIPLEX_OP; int msgack = MSG_D; /* clean pipeline */ msgack = MSG_D; /* wait for togglebit to flip in response to command */ int tm0 = gettimeofday(); while( !( ( MSG_D ^ toggle ) & ( 1 << MSG_TOGGLE_BO ) ) ) { int tm1 = gettimeofday(); if( ( tm1 - tm0 ) > time_out ) { return 0; /* command timed out, no CobraNet interface present */ } } int garbage = MSG_D; /* clean pipeline */ /* verify identify results */ if( DATA_A == 'C' ) if( DATA_B == 'S' ) if( DATA_C == ( 18101 >> 8 ) ) if( DATA_D == ( 18101&0xff ) { return 2; /* CM-2 detected */ } return 0; /* no interface or non-supported interface */ } |
|
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 |