Click here to Skip to main content
15,513,354 members
Home / Discussions / C#
   

C#

 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617513-Jan-22 2:14
Member 1549617513-Jan-22 2:14 
AnswerRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn11-Jan-22 17:11
sitebuilderLuc Pattyn11-Jan-22 17:11 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
jeron112-Jan-22 8:34
jeron112-Jan-22 8:34 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617513-Jan-22 1:56
Member 1549617513-Jan-22 1:56 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn13-Jan-22 6:17
sitebuilderLuc Pattyn13-Jan-22 6:17 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617516-Jan-22 22:19
Member 1549617516-Jan-22 22:19 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 3:48
sitebuilderLuc Pattyn17-Jan-22 3:48 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617517-Jan-22 5:04
Member 1549617517-Jan-22 5:04 
Hello Luc Pattyn,

First of all, thank you very much for your attention on this topic.
Iwill try to give you information as much as I can which is following:-

1. This is not publicaly available anywhere as i found and researched about it. I am working on a project as my thesis topic.
In this one, I have a manufactured system which is having 6 keys on main keypad which is controllable by some other 4 keys. Now I need to get control of 6 keys through serial interface PC. To get this, i need to communicate the system to PC. The company gave me protocol and in this protocol mentioned that I need to connect the system and PC through serial communication and every key has command which I need to send these commands to the system which includes microcontroller LPC2132.

I mention 1 example here which is mentioned in protocol and need to follow the procedure:-

1.
Write "Key – KEY_WB" request
    
   « %W 0x03 0x02 0xF3 LRC »
____________________________________________
Write "Key – KEY_WB" response
  
   %W 0x02 ACK LRC

Remaining keys command I need to prepare on my own according to this.

% = 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
received.
In every case; each request must be answered with an response. The host has to wait on
an response.

Yes, I have commands for LED as well but first I want to write the commands for above key then I think remaining work can be done.

As per protocol, I have connected both system and serial interface PC through DB9- RJ45 cable which also prepared by manufacturer of system. After this, I have uploaded firmware version through Flashmagic software tool. Now I created GUI for implementing these commands but is not working as I expect becuase of some lacking in knowledge about these specific ack response commands. Now I would like to know about the command in which I can get response with ack byte from microcontroller side.

I think I tried to give you enough information to understand the project. If still need, I can give more information. Please advise me on this for further progress.

Thanks & regards,

GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 5:16
sitebuilderLuc Pattyn17-Jan-22 5:16 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 5:46
Sanjay Siwach17-Jan-22 5:46 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 6:02
sitebuilderLuc Pattyn17-Jan-22 6:02 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 6:15
Sanjay Siwach17-Jan-22 6:15 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 6:23
Sanjay Siwach17-Jan-22 6:23 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 10:46
Sanjay Siwach17-Jan-22 10:46 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 12:40
sitebuilderLuc Pattyn17-Jan-22 12:40 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617517-Jan-22 22:51
Member 1549617517-Jan-22 22:51 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn18-Jan-22 3:29
sitebuilderLuc Pattyn18-Jan-22 3:29 
QuestionEasy way programmatically select step by step button. Pin
Member 154938239-Jan-22 3:20
Member 154938239-Jan-22 3:20 
AnswerRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 3:24
mveOriginalGriff9-Jan-22 3:24 
GeneralRe: Easy way programmatically select step by step button. Pin
Member 154938239-Jan-22 3:37
Member 154938239-Jan-22 3:37 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 4:09
mveOriginalGriff9-Jan-22 4:09 
AnswerRe: Easy way programmatically select step by step button. Pin
#realJSOP9-Jan-22 4:15
mva#realJSOP9-Jan-22 4:15 
AnswerRe: Easy way programmatically select step by step button. Pin
Gerry Schmitz9-Jan-22 8:17
mveGerry Schmitz9-Jan-22 8:17 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 10:38
mveOriginalGriff9-Jan-22 10:38 
GeneralRe: Easy way programmatically select step by step button. Pin
Gerry Schmitz9-Jan-22 22:11
mveGerry Schmitz9-Jan-22 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.