I highly appreciate the work you did for me.
I am not expert as you are but I would like to put some point with you may agree or not.
1. There should not be any suspicion of this document as I put same material as mention in document.
2. You are talking about specification and no text, so, I think command all says that Read version request(send command- 25 52 02 01 DE) - this command we need to send and response command from microcontroller(25 52 0C 01 UHD-4k.02.10.09 C2).
This command just only to see version in the system.
3. I mentioned before that there is 6 keys on the keypad. Key_WB is one of the key. There is command given for the this key:-
Send command to microcontroller- %W 0x03 0x02 0xF3 LRC
Response command from microntroller to PC - % W 0x02 ACK LRC (this command should with ACK byte)
For LRC, LRC value is calculated only for this command , for other keys, I think I have to calculate to put in command.
I did not get the point that you are calculating the response command(%R 0x0C 0x01 UHD-4K 02.10.09 0xC2) instead of input command(0x25 0x52 0x02 0x01 0xDE). The microcontroller is predefined with these commands and when we will send these commands to microcontroller, so, microcontroller should respond as protocol.
Now my question here is that, We need response from microcontroller with ACK byte and for this purpose, how we can write programm in visual studio with c# to send command with GUI and get reposne from microcontroller.
I am sharing again important information to check.
Request „Read“ :
« %R NUM CMD LRC »
Ex- 0x25 0x52 0x02 0x01 0xDE
« %R NUM CMD DATA LRC »
Ex- %R 0x0C 0x01 UHD-4K 02.10.09 0xC2
Request „Write“ (Send Command to microcontroller)
« %W NUM CMD Data LRC »
Ex- %W 0x03 0x02 0xF3 LRC (Send Command to microcontroller)
« %W NUM STAT LRC »
Ex- % W 0x02 ACK LRC (Response command from microcontroller)
% = Start of message
R/W = Read/Write
CMD = Command
NUM = length of message (all bytes excluding „% R/W NUM“)
DATA = real data
LRC = XOR complete message
STAT = ACK (0x06) = OK
NAK (0x15) = not OK
BUSY (0x07) = in process
In case of negative answer (NACK) the request must be repeated until a positive answer
(ACK) has been received. The delay time for a new request has a minimum of 100ms.
In case of answer (BUSY) the sender has to wait until the answer (ACK) has been
In every case; each request must be answered with an response. The host has to wait on
I think I have given enough information to understand the logic. I just need advise to write a program for serial communication with c# and get response from microcontroller with ACK byte.