Click here to Skip to main content
15,860,859 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 1:14
Member 1549617513-Jan-22 1:14 
AnswerRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn11-Jan-22 16:11
sitebuilderLuc Pattyn11-Jan-22 16:11 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
jeron112-Jan-22 7:34
jeron112-Jan-22 7:34 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617513-Jan-22 0:56
Member 1549617513-Jan-22 0:56 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn13-Jan-22 5:17
sitebuilderLuc Pattyn13-Jan-22 5:17 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617516-Jan-22 21:19
Member 1549617516-Jan-22 21:19 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 2:48
sitebuilderLuc Pattyn17-Jan-22 2:48 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617517-Jan-22 4:04
Member 1549617517-Jan-22 4: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 4:16
sitebuilderLuc Pattyn17-Jan-22 4:16 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 4:46
Sanjay Siwach17-Jan-22 4:46 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 5:02
sitebuilderLuc Pattyn17-Jan-22 5:02 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 5:15
Sanjay Siwach17-Jan-22 5:15 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 5:23
Sanjay Siwach17-Jan-22 5:23 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 9:46
Sanjay Siwach17-Jan-22 9:46 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 11:40
sitebuilderLuc Pattyn17-Jan-22 11:40 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617517-Jan-22 21:51
Member 1549617517-Jan-22 21:51 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn18-Jan-22 2:29
sitebuilderLuc Pattyn18-Jan-22 2:29 
QuestionEasy way programmatically select step by step button. Pin
Member 154938239-Jan-22 2:20
Member 154938239-Jan-22 2:20 
AnswerRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 2:24
mveOriginalGriff9-Jan-22 2:24 
GeneralRe: Easy way programmatically select step by step button. Pin
Member 154938239-Jan-22 2:37
Member 154938239-Jan-22 2:37 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 3:09
mveOriginalGriff9-Jan-22 3:09 
AnswerRe: Easy way programmatically select step by step button. Pin
#realJSOP9-Jan-22 3:15
mve#realJSOP9-Jan-22 3:15 
AnswerRe: Easy way programmatically select step by step button. Pin
Gerry Schmitz9-Jan-22 7:17
mveGerry Schmitz9-Jan-22 7:17 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 9:38
mveOriginalGriff9-Jan-22 9:38 
GeneralRe: Easy way programmatically select step by step button. Pin
Gerry Schmitz9-Jan-22 21:11
mveGerry Schmitz9-Jan-22 21: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.