-3. Control command for decoder chipImportant: This chapter describes low level command for scanner control function. If you already USI todo scanner programming, you don’t need to care about this chapter. In general, it is not suggested to uselevel command to control scanner, because there are timing issue on serial communication programming ,and it is always need communication expert to do that and it is hard to explain it on document.When Host prepare to send a command to hamster, it must first check CTS, if CTS is high, then Hostmust set the RTS to high then clear RTS to low to wake up the Hamster.Special Command for controlcommand Format CommentControl Esc,80H+SOH(01H) Let Hamster enter slaving status. At thisstatus Hamster just receives commands andexecutes it until it receives Release commandor timeout (about 10s). Otherwise, the timeoutis about 1s as the interval of commands.Release Esc,80H+EOT(04H) Let Hamster exit from slaving status.Execute/Enquiry Esc,80H+ENQ(05H) Let Hamster execute the previous saved commandand check hamster if there is a result ofprevious executed command to send to Host. Ifprevious saved command have already executedand no result to send, hamster do not replyuntil there is a result. If Host receive aresult but the BCC is wrong, it can re-sendENQ to re-send result again.ACK Esc,80H+ACK(06H) It is from Hamster to Host. If Hamster receivea command and this command do not need sendmessage back, Hamster reply the ACK.NAK Esc,80H+NAK(15H) It is from Hamster to Host. Hamster requirethe Host to re-send command again, normallywhen received a wrong BCC, it can send theNAK. The Hamster sends back NAK whenever itreceives a no sense command.COMMAND FROM HOST TO HMASTERCommand format:Esc,Lh,Ll,n,m,S1,...,Si,BCCHere: Esc is Escape code(H'1B)Lh/Ll is command's length when the Lh.b7 is 0, Lh is high byte, Ll is lowbyte, count from n to BCC. When Lh.b7=1 it is a two bytes special command.n is command IDm is operation: Normally for setting commands the 0 means setting, 1default, 2 read current setting, 3 special operation. When m=1 or 2, the S1should be 0 for bits or one character setting. If the setting is a string,like pre_amble, the read or default command should not contain any Si byte.The special meaning in a command please refers the command definition.Si is setting/read data.BCC: it equals to XOR of all the bytes before the BCC.Conventions: S1.bj means the number j bit of byte S1.The expression 1~64:2 means that the number is between 1 and 64, the defaultis 2.Notice: Any interval in a command transmit can not exceed 1 second.Command Format CommentInitial/Warm start Esc,0,2,0,BCC Hamster initializes the ports and flagsaccording to the setting in RAM.Default Esc,0,2,1,BCC Reset setting in RAM and initializeMpu_idle Esc,0,4,2,m,S1,BCC S1 is 0~3:0 is sleep mode,1 is watch mode,2_is standby mode.Beep Esc,0,4,3,m,S1,BCC S1 0 none,1 low,2 medium,3 high,4