<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://wiki.specnext.dev/index.php?action=history&amp;feed=atom&amp;title=CTC</id>
	<title>CTC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.specnext.dev/index.php?action=history&amp;feed=atom&amp;title=CTC"/>
	<link rel="alternate" type="text/html" href="http://wiki.specnext.dev/index.php?title=CTC&amp;action=history"/>
	<updated>2026-05-01T06:51:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>http://wiki.specnext.dev/index.php?title=CTC&amp;diff=41880&amp;oldid=prev</id>
		<title>Johnnyo: The rate of clock input to the CTC&#039;s timer</title>
		<link rel="alternate" type="text/html" href="http://wiki.specnext.dev/index.php?title=CTC&amp;diff=41880&amp;oldid=prev"/>
		<updated>2026-04-04T01:36:35Z</updated>

		<summary type="html">&lt;p&gt;The rate of clock input to the CTC&amp;#039;s timer&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:36, 4 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l18&quot;&gt;Line 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At the moment, the ZC/TO output of each channel is fed into the CLK/TRG input of the succeeding channel so that time and count periods can be cascaded.  Channel 3&amp;#039;s ZC/TO output is divided by two and drives the joystick&amp;#039;s clock in io mode.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At the moment, the ZC/TO output of each channel is fed into the CLK/TRG input of the succeeding channel so that time and count periods can be cascaded.  Channel 3&amp;#039;s ZC/TO output is divided by two and drives the joystick&amp;#039;s clock in io mode.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The rate of clock input to the CTC&#039;s timer is not affected by the value in the NextReg 7.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Johnnyo</name></author>
	</entry>
	<entry>
		<id>http://wiki.specnext.dev/index.php?title=CTC&amp;diff=11771&amp;oldid=prev</id>
		<title>Em00k: Created page with &quot;CTC  The CTC has been temporarily reduced to four channels from eight.  Eight independent CTC channels are available on ports 0x183B through 0x1F3B.  These perform counter / t...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.specnext.dev/index.php?title=CTC&amp;diff=11771&amp;oldid=prev"/>
		<updated>2022-07-01T22:15:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;CTC  The CTC has been temporarily reduced to four channels from eight.  Eight independent CTC channels are available on ports 0x183B through 0x1F3B.  These perform counter / t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;CTC&lt;br /&gt;
&lt;br /&gt;
The CTC has been temporarily reduced to four channels from eight.&lt;br /&gt;
&lt;br /&gt;
Eight independent CTC channels are available on ports 0x183B through 0x1F3B.  These perform counter / timer functions that can be used to generate timer interrupts or to generate interrupts on behalf of physical signals.&lt;br /&gt;
&lt;br /&gt;
The CTC is a standard Zilog part.  Its datasheet can be found at http://www.zilog.com/docs/z80/ps0181.pdf . The Zilog documentation is ambiguous around how soft resets are treated so the following clarifies some points in the Next&amp;#039;s implementation.&lt;br /&gt;
&lt;br /&gt;
: 1. Hard reset requires a control word to be written with D2 = 1 (time constant follows) otherwise the channel effectively ignores the control word and will remain in the hard reset state.&lt;br /&gt;
&lt;br /&gt;
: 2. Soft reset is generated when the control word&amp;#039;s D1 = 1.  if D2 = 0, the channel will enter the hard reset state.  If D2 = 1 the channel expects a time constant to be written next and after that the counter/timer will run as expected.&lt;br /&gt;
&lt;br /&gt;
: 3. Changing the trigger edge selection in bit 4 counts as a clock edge. A timer waiting for a clock edge to start will start and in counter mode, the count will be decremented.&lt;br /&gt;
&lt;br /&gt;
: 4. ZC/TO is asserted for one clock cycle and not for the entire duration that the count is at zero.&lt;br /&gt;
&lt;br /&gt;
To soft reset a particular channel that is in an unknown state, a soft reset control word should be written twice with D2 = 0 (no time constant follows).&lt;br /&gt;
&lt;br /&gt;
At the moment, the ZC/TO output of each channel is fed into the CLK/TRG input of the succeeding channel so that time and count periods can be cascaded.  Channel 3&amp;#039;s ZC/TO output is divided by two and drives the joystick&amp;#039;s clock in io mode.&lt;/div&gt;</summary>
		<author><name>Em00k</name></author>
	</entry>
</feed>