Help around RS232 panel with MAX232

382 views
Skip to first unread message

johntk...@gmail.com

unread,
Apr 4, 2024, 8:23:31 PM4/4/24
to PiDP-10
Hi -

I'm a little unclear as to what is required to hook up the two 9pin serial ports to the MAX232 circuit and how the MAX232 connects to the Pi.

Has anyone done this and can share some images and wiring?

thanks!

-John

Mitchell Wolrich

unread,
Apr 5, 2024, 1:40:11 AM4/5/24
to PiDP-10

I don't have the PiDP10 yet, but from the looks of what Oscar has done, you will have to wire the RS232 RX & TX to either the DB9 or DB25 (whatever you choose), and connect the TTL inputs of the MAX232 to the TTL Serial port header that comes from the RPI header..  you also likely have to wire up 3.3VCC and ground as well.  Note that the Raspberry Pi 5 has 2 serial ports built in, the standard one one the 40 pin header that Oscar brings out to a pin header next to the I2C interface, and the diagnostic serial port on a tiny 3 pin header between the 2 micro HDMI connectors.. I have both working, Amazon had the 1.0mm JST 3-pin header males in a 20 pack for $7.99 ..  one serial port is TTYAMA0, the other is TTYAMA10


I would make a suggestion to Oscar on the next run of the PCB's, to wire up the DB9 & DB25 ports as DCE (you have to pick one, either DCE or DTE), and just run those traces, or provide pin headers on the DB9 and DB25 locations to run jumpers to wire it up to the MAX232, will have to be done now with point to point wiring, such as wirewrap wire..    also making provisions for the 1.0mm RPI 5 serial as well would be great, as that would cover the 2 serial ports the MAX232 can handle.

Mitch

Bob Eager

unread,
Apr 5, 2024, 6:01:06 AM4/5/24
to PiDP-10
I'm also unsure what variant of connector can be attached (e.g. for the DE-9). It appears to need a straight PCB mounting DE-9 (male) but the ones I see will not sit with the mounting plate flush to the PCB.

johntk...@gmail.com

unread,
Apr 5, 2024, 10:43:27 AM4/5/24
to PiDP-10
warp - these ones from Amazon seem to fit. 


I only needed two, so I've several left if you would like I could send some.

Kristen Robins

unread,
Apr 9, 2024, 11:02:54 AM4/9/24
to PiDP-10
I've wired up the console (3 pin header next to the I2C header) to the MAX232.  Does the serial port need to be enabled before using it?  What are the correct baud rate settings, and do those need to be configured as well?   What's the best/easiest way to test?

Thanks,
  Kristen

Paul J. Schneider

unread,
Apr 9, 2024, 2:28:49 PM4/9/24
to PiDP-10
Another choice for connectors with solder cups for easier soldering. 

Cannot speak to the quality of this particular supplier but these are generally a commodity.



--
You received this message because you are subscribed to the Google Groups "PiDP-10" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-10+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-10/52ef2b02-0b37-422e-8427-1d4a362b1dbbn%40googlegroups.com.

Kristen Robins

unread,
Apr 9, 2024, 2:31:04 PM4/9/24
to PiDP-10
Found some good documentation online.  Simple enough... use the Raspberry Pi configurator to turn on the serial port (UART0 = true serial via GPIO pins 14/15), then disable console output to serial so it can be used without the login process tied to it.  /dev/ttyAMA0 magically appears after a reboot.  stty provides current speed settings, which are defaulted to 9600 baud.  Haven't gotten to setting the default baud rate at boot-up yet, it's probably somewhere.  :)

Kristen Robins

unread,
Apr 14, 2024, 4:58:07 AM4/14/24
to PiDP-10
For the RS-232 (DB-9) serial ports, I used these DB9 connectors I found at Digikey:  K85X-ED-9P-BRJ (Kycon).  This is the male variety, there is also a female variety (9S), and the versions without the J at the end do not have the jackscrews.  Very helpful to have the side boardlocks which provide more support, easily soldered in with the rest of the pins.  Male DB-9s are usually wired DTE (pin 2 RX, pin 3 TX).

There's a video here showing the two different serial ports on the Raspberry Pi 5:
https://www.youtube.com/watch?v=27p4XHE3iyw

SERIAL PORT #1:  True UART (GPIO 14/15)

The true UART (GPIO 14/15) needs to be enabled in the Raspberry Pi configurator, and appears after a reboot.  
This device is accessed through /dev/ttyAMA0.  During normal system operation, baud rate is 9600 baud (probably configurable somewhere).

(J1) TTL Console pin 1 (GND) -> (J6) RS-232 #1 TTL-level LEFT SIDE pin 5 (GND)
(J1) TTL Console pin 2 (RX) -> (J6) RS-232 #1 TTL-level LEFT SIDE pin 3 (RX Out)
(J1) TTL Console pin 3 (TX) -> (J6) RS-232 #1 TTL-level LEFT SIDE pin 1 (TX In)

(J11) RS-232 #1 RS-232-level LEFT SIDE pin 1 (TX Out) -> (J9 Top) DB-9 Male pin 3 (TX) - DTE wiring
(J11) RS-232 #1 RS-232-level LEFT SIDE pin 3 (RX In) -> (J9 Top) DB-9 pin 2 (RX) - DTE wiring
(J11) RS-232 #1 RS-232-level LEFT SIDE pin 5 (GND) -> (J9 Top) DB-9 pin 5 (GND)

SERIAL PORT #2:  Debug UART (Raspberry Pi 5 only,  located between the two DisplayPort connectors)

I also connected the debug UART using the 1mm JST-SH connector mentioned previously in this post:
https://www.amazon.com/dp/B09GP9S1W7
This device is accessed through /dev/ttyAMA10. 
At boot-up, there is some diagnostic output at 115200 baud.  During normal system operation, baud rate is 9600 baud.  Probably configurable somewhere for other defaults.

(JST-SH) RED/LEFT (TX) -> (J6) RS-232 #2 TTL-level RIGHT SIDE pin 2 (TX In)
(JST-SH) BLACK/MIDDLE (GND) -> (J6) RS-232 #2 TTL-level RIGHT SIDE pin 6 (GND)
(JST-SH) YELLOW/RIGHT (RX) -> (J6) RS-232 #2 TTL-level RIGHT SIDE pin 4 (RX Out)

(J11) RS-232 #2 RS-232-level RIGHT SIDE pin 2 (TX Out) -> (J9 Bottom) DB-9 Male pin 3 (TX) - DTE wiring
(J11) RS-232 #2 RS-232-level RIGHT SIDE pin 4 (RX In) -> (J9 Bottom) DB-9 pin 2 (RX) - DTE wiring
(J11) RS-232 #2 RS-232-level RIGHT SIDE pin 6 (GND) -> (J9 Bottom) DB-9 pin 5 (GND)

Caveat:  I haven't tried connecting to ITS or TOPS-10 or TOPS-20 through these ports yet, though everything works through the Raspberry Pi OS (Bookworm).  If there's something that needs to be configured, would love to know about it!

--Kristen


Bob Eager

unread,
Apr 17, 2024, 7:43:49 AM4/17/24
to PiDP-10
It's OK, thanks. I got a 10 pack from eBay!

Bob Eager

unread,
Apr 17, 2024, 7:44:37 AM4/17/24
to PiDP-10
I have some with solder cups, but they don't fir the holes. I got PCB mounting ones.

johntk...@gmail.com

unread,
Apr 20, 2024, 10:32:49 PM4/20/24
to PiDP-10
On either of my Raspberry Pi 5 devices there is no  /dev/ttyAMA0 device, only  /dev/ttyAMA10
There is a /dev/ttySerial0 device - is that the same as /dev/ttyAMA0?

Kristen Robins

unread,
Apr 20, 2024, 11:49:53 PM4/20/24
to PiDP-10
Hi John, you need to turn on the serial port before it will show up, as mentioned previously:

"... use the Raspberry Pi configurator to turn on the serial port (UART0 = true serial via GPIO pins 14/15), then disable console output to serial ... /dev/ttyAMA0 magically appears after a reboot."  

--Kristen

John Kennedy

unread,
Apr 20, 2024, 11:55:57 PM4/20/24
to Kristen Robins, PiDP-10
Should have mentioned that I’ve done that: I’ve turned on Serial support from Raspi-config and tried editing /boot/firmware/.txt and /boot/firmware/config 

Anything else to try?

On Apr 20, 2024, at 8:49 PM, Kristen Robins <k...@elitemail.org> wrote:

Hi John, you need to turn on the serial port before it will show up, as mentioned previously:
--
You received this message because you are subscribed to the Google Groups "PiDP-10" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-10+u...@googlegroups.com.

Kristen Robins

unread,
Apr 21, 2024, 12:11:59 AM4/21/24
to PiDP-10
Turn ON the Serial Port, turn OFF the Serial Console, then reboot.  That worked for me.  Do you have the latest version of Bookworm?

Afterwards, I tested by hooking up an RS-232 serial cable to a PC serial port, ensured that the RX/TX were correct.  To do that, I  highly recommend a simple RS232 tester like this one at Amazon ( https://www.amazon.com/CableMax-RS-232-link-Tester-Female/dp/B004OT995U ) to make sure all of the RX/TX lights light up correctly.  Connect one side by itself first, then the other side by itself - one side should light up RX and the other side should light up TX.  After that, you can connect both sides and try some traffic.   You can do a simple "echo xyz > /dev/ttyAMA0" and "echo xyz > /dev/tty/AMA10" from the RasPi terminal command line.  Need to match baud rates, I think it's set to 9600 baud by default on the RasPi side.

enable-serial.jpg

johntk...@gmail.com

unread,
Apr 21, 2024, 2:28:10 PM4/21/24
to PiDP-10
I tried everything and ttyAMA0 simply would not appear. So I blew it away with a new install, and it appeared - hurray!

So far it's mostly working: it's sending but not receiving, but at least the software side is sorted. Thanks!

Reply all
Reply to author
Forward
0 new messages