Samsung Ht As700 User Manual
Here you can view all the pages of manual Samsung Ht As700 User Manual. The Samsung manuals for Home Theater System are available online for free. You can easily download all the documents as PDF.
Page 111
111 Structure of Communication Frames The function code is explained with the example of Query and Response frame based on the 2-step communication. Query (Q) and Response (R) frame Query Acknowledge (QA) frame Response Request (RR) frame Response (R) frame for an errorDA SA Function code Length Information CRC L CRC H Length of information area (byte) 1 to 255: 1 to 255 bytes 0: 256 bytes Function code Sender ID Receiver ID DA SA $80 01 00 CRC L CRC H DA SA $00 01 00 CRC L CRC H DA SA $8X 01 Error No...
Page 112
112 Read the content of the bits (R, L, M, K, F, or TC) assigned to the absolute address. Can read n consecutive bits (On/Off). Query (Q) frame Response (R) frameDA SA $21 $03BAS L HNCRC L H DA SA $A1 NBase + 0 bit valueBase + 1 bit value-Base + N-1 bit valueCRC L H Length of information (byte) Peripheral device ID (PC ID) Bits that are On are represented by the one byte value $FF. Bits that are Off have a value of $00. Absolute bit address (address of first bit to read) Refer to 3.3...
Page 113
113 Modify the contents of the bits stored in the absolute address (R, L, M, K, F, or TC). Change the bit state between On/Off. Can change multiple consecutive bytes. Query (Q) frame Response (R) frame Read the content of the words (R, L, M, K, F, or W) assigned to the absolute address. Can read n consecutive words. Query (Q) frame Response (R) frameDA SA $22 N Base L HBase+0 bit valueBase+N+1 bit value-Base+N-3bit valueCRC L H DA SA $A2 &01 &00CRC L H DA SA $23 $30Base L...
Page 114
114 Change the content of the words (R, L, M, K, F, or W) assigned to the absolute address. Can read n consecutive words. Query (Q) frame Response (R) frame Read the bits and/or word contents of the assigned absolute addresses. Can read bits and words regardless of their order and location in memory. Query (Q) frame Response (R) frameDA SA $24 L Base L HBase+0word L H-Base+1word L HCRC L H DA SA $A2 $01 &00CRC L H DA SA $25 LAO L HA1 L H-An L HCRC L...
Page 115
115 Read the bits and/or word contents of the assigned absolute addresses. Can read bits and words regardless of their order and location in memory. Query (Q) frame If Ax denotes a bit address, the Dx data is 1 byte (On=$FF, Off=$00), and if Ax denotes a word address, the Dx is 1 word (2 bytes). Response (R) frameDA SA $26 L AO L HDOA1 L H-CRC L H DA SA $A2 $01 $00CRC L H Method of assigning bit/word absolute address 15 14 13 0 0...
Page 116
116 Communication Program Examples Users can write a communication program by using the following example. For more information, contact the sales or technical department. ProgramNotes #include #include #include #define PC_ID 0xE2 #define time_limit 28 #define retrial_limit 2 #define TRUE 1 #define FALSE 0 #define lower_byte(x) (unsigned int) ((x)& 0x00FF) #define upper_byte (x) (unsigned int) (((x)& 0xFF00)>>8) typedef int BOOL; unsigned int PORTADD,DIVISOR,sending_delay, receiving_delay; unsigned...
Page 117
117 ProgramNotes * Initialization of GPC card */ if(port_number == 1) PORTADD=0x3F0; if(port_number == 2) PORTADD=0x2F0; if ((port_number >= 3) && (port_number 1)^0xA001; /* 0x0001 : multi-nominal expression */ else Crc=Crc>>1; } }GPC-300 card Setting (8255chip setting) Uses the communication card that is connected, and sets the environment according to the PLC communication specifications, so that communication is possible. CPU-ID: Input PLC ID (0 to 255) Reads the register value...
Page 118
118 ProgramNotes void Job(void) { /* JobID=0 : Change to sending-mode for serial port */ /* JobID=1 : Transmit sending-frame */ /* JobID=2 : Change to receiving-mode for serial port */ /* JobID=3 : Address polling of ACK from CPU */ /* JobID=4 : Receive ACK from CPU */ /* JobID=5 : Change to sending-mode for serial port */ /* JobID=6 : Transmit RR-Frame */ /* JobID=7 : Change to receiving-mode for serial port */...
Page 119
119 ProgramNotes break; case 4: case 9:if(receiving_occuring()) { if(indexTime_limit) { watchdog=0; retrialC--; JobID=(JobID & 0x05); } if(!(((Old^New) & 0x02)==0)) { watchdog=watchdog+1; Old=New; } }while((retrialC!=0) && (Success==FALSE)); if(retrialC==0) ret=1; else ret=0; return(ret); } void Mword_reading(void) { /* Example of Read-Register */ int i; receiving_frame[2]=3;/* EXAMPLE READ WORD(M000-M0127) */...
Page 120
120 ProgramNotes if(communication() == 0) printf(WRITE K0000-K0063 OK\n); else printf(communication error\n); receiving_frame[2]=4; /* EXAMPLE write WORD(K064-K0127) */ receiving_frame[3]=130; /* Number Of Byte For Information */ receiving_frame[4]=0x80; /* BASE(K000=$0180) LOW */ receiving_frame[5]=1; /* BASE HIGH */ for(i=0;i