Serial TTY not working

78 views
Skip to first unread message

Noël Martin

unread,
Dec 23, 2024, 2:16:12 AM12/23/24
to PAL 6502 computer

Good evening everyone,

I apologize for starting yet another discussion on this topic. Over the weekend, I finished assembling my PAL-1, which is fully functional—except for the TTY.

I carefully read the messages about pinning, null-modem configurations, and even changing resistor 41. But despite all that, I can’t get it to work.

For context, here are my configurations:

  • Minicom set to 1200 baud 8N1 with a USB Serial interface like this one: link
  • A Minitel set to 1200 baud 8N1 (a very popular French terminal from the 80s) capable of handling VT100 terminals.

Using a small oscilloscope, I can see a signal of around 3V (relative to ground) when typing on either terminal, at pin 2 of the RS232. However, there is no signal at the voltage divider node between R35 and R36. I find it strange that there’s no voltage variation at this point. I checked the circuit: between pin 2 and ground, I measure 400 ohms, so the circuit is closed.

Additionally, I tried to trace the outgoing signal near resistor 41. Here, whether it’s before or after the resistor, there’s no activity at all.

I also noticed some voltage between pins 2, 3, and ground when the connector is open: 5V on pin 2 and 0.7V on pin 3. I’m not an expert on the expected behavior of transistors Q7 and Q9, but this seems sufficient to light up the Rx diode (as if the DCE is sending data).

I have verified all the contacts (up to PA7, PB0, PB5, PA7) as described in the schematic, and everything checks out. I’ve also verified the capacitor, resistor, and diode values.

Despite all those investigations, I cannot understand why the TTY remains quiet. Thank you for the help!

Noël F4JJD

Voyageur

unread,
Dec 23, 2024, 3:38:57 AM12/23/24
to PAL 6502 computer
Hi Noel,
I think that your USB Serial interface is not useful with RS232 signals. It's an old USB to TTL  module, not working properly with Win 10 or 11 (unless you got the good drivers).
You could have a look on Hans website about PAL-1. There is a schematics that makes our PAL-1 compatible wit USB TTL function. In that case, you will have to modify a little bit your board.
Hope that can help you.
A+

Hans Otten

unread,
Dec 23, 2024, 5:31:28 AM12/23/24
to PAL 6502 computer
The source of your problems is that you try to interface the RS232 port with a TTL USB serial interface.  The signals are inverted in TTL versus RS232 levels. 0V is  12V o higher and 5V is -12V or lower.
(in the case of the PAL-1 it swings between 0 and 5 V at the RS232 side instead of -12V and +12V , which not all RS232 to USB interfaces like,).
The PAL-1/KIM-1 will never see the Enter key you have to type first to make it see the TTY active and do the autobaud detection because the signal is inverted.
 And will never send any character to your serial.
The KIM-1 will echo in hardware any character typed in, you should see these even if the KIM-1/PAL-1 does not see the TTY active.  

First to check if your TTLL interface works. Disconnect from the PAL-1 , short TX and RX and check with minicom if characters typed are echoed.

Get a proper RS232 to serial cable like the Green one.  With a gender changer.

Or like voyager said, pick up the TTL level in the PAL-1.
PAL-1 – Retro Computing

Minitel may work, are you sure TX and Rx are not mixed up? And you may have the out of specifications RS232 level of the PAL-1 output,  preventing the minitel to see the output of the PAL-1.
Also here check with disconnected cables and Tx and RX shorted on the minitel that it works. 
 
Hans

Noël Martin

unread,
Dec 23, 2024, 4:22:09 PM12/23/24
to PAL 6502 computer

Thank you all for your responses!

Hans, you were absolutely right, the voltages are opposite in polarity and significantly lower with my TTL dongle, around 4V in absolute value. Today, I purchased a proper RS232 adapter and wired it using breadboard jumpers, treating my RS232 adapter as the DTE.

I also adjusted the timing to 20ms between characters and 500ms between lines when operating at 1200 baud. Everything works perfectly now! I successfully uploaded multiple files using Minicom.

One final note: although the Minitel provides an 80x25 terminal, but the interface communicates using 7E1 instead of 8N1. Its designer appears kept the Videotex parity rules for the ASCII standard as well. I suspect it would be relatively simple to convert between these two standards with basic electronics, that's another funny challenge — making two 70s-designed electronic devices communicating.

Tonight, I’m coding a small algorithm in TinyBASIC to find prime numbers.

Best regards,
Noël

Jim McClanahan

unread,
Dec 23, 2024, 5:53:49 PM12/23/24
to Noël Martin, PAL 6502 computer
The bits in a character are sent least significant bit first. After the first 7 bits are received the KIM monitor does some processing. I did the math years ago, but don't remember the numbers. But at higher speeds (seems like it was 1200 or 2400 baud), 8 bits and 2 stop bits ran their course before the monitor was back and waiting for the start bit of the next character. 

Long story short, 8 bit characters work fine sending to the KIM. On the return side you usually just get one of the stop bits as the 8th bit and it works out fine also.

I've seen heated arguments about 7 or 8 bits (not with the PAL though). Usually it works with either which causes confusion. (How many things just work?)

Thanks,
Jim W4JBM

--
You received this message because you are subscribed to the Google Groups "PAL 6502 computer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pal6502+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pal6502/3420665f-b9c6-40c3-b004-2db6b069f884n%40googlegroups.com.

Hans Otten

unread,
Dec 24, 2024, 6:51:47 AM12/24/24
to PAL 6502 computer
The KIM-1 itself is only interested in 7 bits ASCII.  
Since the KIM-1 monitor is in EPROM and sources are available you can modify it to work with 7E1. Sources are available.

GETCH at $1e5A  is already safe for 7E1 since it receives 8 bit and maks off the last bit received (it even calls this parity!) Any stop bits are ignored.
OUTCH does sends 8 bits data and two stop bits.
That has to be changed to 7 bits, the parity bit and 1 stop bit to make the Minitel happy. 
Make sure you keep every location in the monitor exactly the same. Just JMP to the free space in $1A96 and add there the 7E1 send subroutine. 
The major change will be send only 7 databits, calculating the parity bit and sending that as 8th bit.

And that will only be required if the Minitel really needs the parity bit. 

Hans

Noël Martin

unread,
Dec 28, 2024, 4:49:22 AM12/28/24
to PAL 6502 computer

Thank you very much for all the contributions!

 

I deep dove into the KIM-1's ROM code and I found everything I need. I do not have an EPROM programmer yet, so I'll start by programming a simple echo function with replicas of OUTCH and GETCH for the 7E1.

 

By the way, this device is so cool for hacking! My first time on a 6502 and configuring an assembly tool chain.

 

Noël

Reply all
Reply to author
Forward
0 new messages