The generator is designed to produce test patterns like these:
I'm intending to use it to be able to more accurately adjust my CRT monitors. The service manual has some internal calibration instructions that make use of a pattern generator so I figured this would help me.
Here's a picture of the finished build (I couldn't find a 90 degree connector however so I used a straight one).
Sadly, it doesn't work for my Commodore 1084S-P1 monitor, the picture keeps running vertically and also the horizontal sync is off. I've tried another of my monitors, with similar results. Please note that while the pictures all seem to have a blue shade, in reality I'm seeing different colors (it's my smartphone's camera that messing up).
Here's another one, I selected pattern 11 I think but I have no idea how each pattern is supposed to look exactly. The example pictures from the site don't mention the corresponding pattern numbers.
The project is like 10 years old and the author hasn't responded to the article's replies so I needed to look elsewhere for a solution.
So I hooked up my scope and measured the horizontal sync and I got 14,881.9 Hz. As the monitor's service manual indicates, the horizontal frequency should be "15,625 Hz (+600 Hz)". Does that mean that the tolerance is 600 Hz but only above and not below the 15,625? Or perhaps -300Hz and +300 Hz?
Anyway, 14.881.9 Hz is obviously too low, even when taking an optimistic 15.625 Hz - 600 Hz = 15.025 Hz as the lower limit.
As some of the replies suggested, the crystal oscillator should be 21 Mhz instead of the 20MHz as listed in schematics. When calculating the resulting frequency, we get (20,000,000 / 14881.9) * 15625 = ~20,998,662.81 so that's very close to the mentioned 21 MHz.
The problem is however, that I haven't been able to find any 21 Mhz crystals online. But I managed to get my hands on a few 21.3 Mhz crystals. I figured those would work as well because a 21.3 Mhz crystal results in a 15,851 Hz horizontal frequency. That should be well within the specified tolerance (a conservative 15,625 + 300 = 15,925).
So I replaced the 20.0 Mhz crystal with a 21.3 Mhz one. The scope confirms the horizontal frequency of 15,851 Hz:
Sadly, the problem didn't go away: the picture keeps running both vertically and horizontally.
I've also closely inspected the firmware source code and I can't seem to correlate the sync frequency with the crystal purely based on the source. Timer0 is set to a prescale of 8 and the counter is set to 96 so that should result in a rate of (21.000.000 / 8) / 96 = 27,343.75 Hz but that doesn't seem to correspond with the sync frequency I'm seeing on my scope.
Here's an excerpt from the source code (written in Bascom, see https://www.mcselec.com/index.php?optio ... Itemid=103). I've added my own comments, reflecting my interpretation of the logic.
Code: Select all
On Timer0 Frame : Enable Interrupts
Config Timer0 = Timer , Prescale = 8
Const Black = 8 ' Sync pin up (bit 3), RGB pins down (bits 0-2).
' The timer function.
Frame:
Timer0 = &H60 ' Reset the timer counter.
Video = 0 ' Pulls sync pin down.
Vert:
Incr Linecount
ldi R17, $21 ' Delay to generate a horizontal sync pulse.
Frame_delay:
dec R17
brne frame_delay
nop
If Linecount > 307 And Linecount <= 312 Then
Goto Vert ' Extend the pulse length, upgrading it to a vertical sync pulse.
Elseif Linecount = 313 Then
Linecount = 1
End If
Video = Black ' Pulls sync pin up. Ends the sync pulse.
Return
Do you guys have any knowledge of sync tolerances? Do I really need to keep looking for a 21 Mhz crystal or should it work with the 21.3 MHz crystal as well?
Besides, I'm not completely sure the distorted picture is exactly what you'd expect of a simple out-of-sync picture.