Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Serial IO woes

98 views
Skip to first unread message

Christopher Bock

unread,
Jun 25, 2024, 2:25:21 AM6/25/24
to PAL 6502 computer
Ok. My PAL-1 is still going strong, but I'm unable to get my serial connection to my terminal emulators working. I own 3 USB to serial cables. Two have male 9 pin connectors and one has female a female connection. The first one I tried was my female cable as it would be the easiest to get working. Nothing. Not working with 1200baud 8n1 settings. So I tried wiring up a male cable. Nope. Still not working. I thought maybe my cable wasn't compatible, so I flipped the Tx and Rx connections. Nope.

I tried hooking the serial connections to an oscillscope, but nothing. I tried the following program.

START  LDA 42

LOOP    JSR 1EA0
              JMP 2

A9 2A 20 A0 1E 4C 02

I'm still learning, but I thought this program would continuously dump data to the serial port.

I'm not seeing any signals at the serial port or at anywhere on U6, U2, or U6...

What am I doing wrong. How should I be testing this?

Chris


Hans Otten

unread,
Jun 25, 2024, 2:34:45 AM6/25/24
to PAL 6502 computer
Your JMP 2 should probably be JMP $0200, I assume you enter the program at $0200. It is unknown now where the JMP will go to if you do not fill in the second high byte, which is random on startup.
A9 2A 20 A0 1E 4C 00 02 

Sure the TTY switch is set right? Location 001C contains 0? 

There have been reports some serial USB cables do not work with the PAL-1, due to voltage levels out of standard, especially the negative one being 0V instead of less than -3V. The Ugreen one is reported working.

GN Liu

unread,
Jun 25, 2024, 5:26:56 AM6/25/24
to PAL 6502 computer
Regarding the serial link, if you can't decide whether the cable or connector converter you are using is suitable, you can try connecting the RS232 line directly to the PAL-1 motherboard to check.

Connect the R35 of PAL-1 to the TX (Pin3) of PC serial port (DB9)
Connect the R41 end of PAL-1 to the RX (Pin2) of PC serial port.
from the back side of the PCB, you can see which end of the resistors should be used for the connection.

Also, don’t forget the GND (pin5).

Christopher Bock

unread,
Jun 25, 2024, 7:12:16 PM6/25/24
to PAL 6502 computer
So, my program works as -is in the Kim-1 simulator on my laptop. I enter my program in beginning at 0x0000, so I guess it should be 4C 02 00. I think the reason it worked was because I almost always end my programs in 00 when I'm entering them. I was trying to jump back up to 0x0002.

So, I did never check the TTY switch. I actually didn't know that was a thing. Is that documented in the Kim-1 manual? I really need to read that thing... I made sure that address was set to 00, but that didn't change what's going on.

So, What is going on? Well, my issue is that I'm no getting any detectable signal on the Tx line when this program is running. I started at Pin 3 with my oscilloscope and travelled upstream with it, R41 all the way back to U11. Nothing. No signal. I'm not crazy, right? I should be getting a detectable signal on my oscope, right?

Here's my question. Is there any really good explanation (in the Kim-1 manual or elsewhere) of how the Serial I/O works in the PAL-1? Kind of like a Theory of Operation kind of thing.

Hans Otten

unread,
Jun 26, 2024, 3:53:13 AM6/26/24
to PAL 6502 computer
KIM Hints, The KIM-1 User manual, the PAL-1 manual, many discussions here.

The KIM-1 Simulator zeroes memory, that is why the low byte was 0. A real KIM-1 may have any value here after power on.
 The Simulator also sets the machine in decimal mode and clears location C1. A real KIM-1 does not.

The TTY switch is a jumper on the PAL-1. Required to set right to get the KIM-1 monitor use the TTY serial instead of keypad and hex LED display.
See the PAL-1 manual. 

Hans Otten

unread,
Jun 26, 2024, 3:56:06 AM6/26/24
to PAL 6502 computer
And since your 6532 seems flakey, it is possible the I/O ports for the TTY are not working OK. Wait for the replacement 6532 to continue your experiments!

Christopher Bock

unread,
Jun 26, 2024, 4:23:52 PM6/26/24
to PAL 6502 computer
So these experiments are being done with known working 6532 that I found in my old IC stock  (Well, the last time I had this IC installed in a working Atari 2600 it worked. ). The bad 6532 that I was using only works for 10 minutes and then stops. I have already thrown that in my bad chip bin. ] I also have the spare 6532 from the Second Riot kit that I ordered with my PAL-1. My PAL-1 operates just fine (except for the serial issue) with both RIOT chips.

I didn't realize that's the jumper you were talking about. Yes. The jumper that is part of the TTY circuit, described in in the PAL-1 manual and the Kim-1 manual is closed when I'm doing these tests. I have confirmed continuity across that jumper. 

Christopher Bock

unread,
Jun 27, 2024, 11:50:15 AM6/27/24
to PAL 6502 computer
The Pal-1 really wasn't very helpful for me for getting a deeper understanding of how the serial output was working. But, I was able to sit down yesterday and study the MOS 65XX family datasheet, the 6532 datasheet, the Kim-1 user manual, the 6530=002/003 rom listings, some posts on http://retro.hansotten.nl/, and watching  @AndersNielsenAA's great youtube video on the RIOT I was able to get a much better understanding of how the RIOT works in conjunction with the 6502's memory-mapped I/O and the Kim-1 ROM to create the TTY serial signal. There are still a lot of holes to fill, but I feel like I have a much better understanding...

Now, armed with that understanding I can see that if I'm not seeing a serial signal coming from the 6532 why'd you'd clearly think the 6532 would be the issue. I'd think that too. But what are the odds of all three of the different 6532's I've tried on this machine failing to output this serial signal in the exact same way? Granted, one of those 6532's is clearly flakey and not to be trusted. But the other two are driving the machine just fine, except for the exact same issue with the lack of serial output. One of these chips came from an old banged up 4 switch Atari 2600 that was working until  it was dismantled for parts 10 years ago, so we're not even talking about RIOTs from the same batch. Is the rate of failure on these old chips really that bad?

Chris


GN Liu

unread,
Jul 1, 2024, 1:10:04 AM7/1/24
to PAL 6502 computer
I don't think it's an issue with the 6532 chip. Although these old 6532 chips can sometimes overheat or malfunction, we haven't found any serial communication problems caused by the chip so far.

You've also tried three chips, so I believe the most likely issue is still with the communication wiring being reversed. I saw a post of yours mentioning a connection from Pin3 to R41. I assume the Pin3 you mentioned refers to the DB9 pin. The correct wiring method, as I mentioned before, is that DB9's Pin3 (TX) should be connected to the R35 of the PAL-1, and Pin2 (RX) should be connected to the R41. You might want to double-check this part.

Liu

Christopher Bock

unread,
Jul 2, 2024, 7:32:50 PM7/2/24
to PAL 6502 computer
Ok. I figured it out. I discovered that the 'Enter' signal wasn't getting past R41. I removed R41 and replaced it with a 220ohm resistor and immediately I could get the RIOT and KIM programming to respond. I get the KIM prompt. Thank you all for your help!

GN L

unread,
Jul 6, 2024, 9:54:27 AM7/6/24
to Christopher Bock, PAL 6502 computer
Thank you for the update!

Happy hacking 6502~
Liu
> --
> 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 on the web visit https://groups.google.com/d/msgid/pal6502/0c8845ed-95be-4f10-9185-d1b433a78dabn%40googlegroups.com.


GN L

unread,
Jul 6, 2024, 9:54:28 AM7/6/24
to Christopher Bock, PAL 6502 computer
Thank you for the update!

Happy hacking 6502~
Liu

> On Jul 3, 2024, at 7:32 AM, Christopher Bock <christoph...@gmail.com> wrote:
>
Reply all
Reply to author
Forward
0 new messages