PC to 18M2 serial communication

Dermotx

Member
Hi. I need some advice please on connecting an 18M2 to my PC so that I can send serial commands to it to set certain output pins high or low.

I don’t need the 18M2 to reply to the PC.
I do not need to be able to program the 18M2. I do that off board.

I have actually done this type of thing before with the 08M2 using the serial in pin C.5 or leg 2. This entailed using the DISCONNECT command in the code. I want to avoid this using the 18M2 as it is not recommended in the manual.

My question is how do I wire the various legs of the 18M2?
Firstly, the serin pin C.4, leg 3. As I will not be using this pin, I presume I connect it to ground with a 10k resistor?

Secondly, pin C.5, leg 4. I want to use this pin as my serial in pin. I presume I connect this to the Tx pin coming from the PC using a 22k resistor and ground the Tx wire using a 10k resistor.

Thirdly, I presume I connect the serout pin C.3, leg 2 to the Rx pin from the PC.

Finally, in the software, I set all other pins low to make them outputs, except of course the V and GND.
Thank you.
Dermot
 

hippy

Ex-Staff (retired)
Basically as you describe; duplicate the 10K/20K download interface but going to leg 4 (C.5).

Because leg 4 (C.5) is an input only and has no internal diode clamp to the +V, for use with RS232 voltages, an external diode should be added with anode to leg 4 (C.5) and cathode (striped, pointy-end ) to +V.

Leg 3 (C.4 / Serial In ) to 0V via 10K.

Leg 2 (C.3 / Serial out ) to PC RX in pin.
 

grim_reaper

Senior Member
First of all, it depends on the type of serial connection to the PC. Are you planning on using a standard COM (9 pin D) port? If so, you'll need to protect/convert the higher voltage levels that may be present. [EDIT - as per Hippy's reply!]
The other alternative is a USB to serial converter - the same as the programming cable - in which case the connections are slightly simpler.
I'm not familiar with the 18M2 off the top of my head, but the SerIn pin should always be connected using the 'standard' 22k + 10k pair that is presented in the manuals - whether you're using the pin or not. [EDIT - as above!]
 
Last edited:

Dermotx

Member
First of all, it depends on the type of serial connection to the PC. Are you planning on using a standard COM (9 pin D) port? If so, you'll need to protect/convert the higher voltage levels that may be present. [EDIT - as per Hippy's reply!]
The other alternative is a USB to serial converter - the same as the programming cable - in which case the connections are slightly simpler.
I'm not familiar with the 18M2 off the top of my head, but the SerIn pin should always be connected using the 'standard' 22k + 10k pair that is presented in the manuals - whether you're using the pin or not. [EDIT - as above!]
Thank you Hippy and grim_reaper for such a quick reply. This forum really provides a great service. I should have said that I am using the USB to serial converter cable. Sorry about that.

Hippy, I presume a 1N4148 signal diode will do for the diode you mentioned.

grim_reaper, are you saying that even though I am not using pin C.4, the serin programming pin, that I still have to use the "standard" 22k + 10k pair. I thought I would just have to clamp it to GND using a 10k resistor.

Thanks again guys.
 
Top