<?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_Channels</id>
	<title>CTC Channels - 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_Channels"/>
	<link rel="alternate" type="text/html" href="http://wiki.specnext.dev/index.php?title=CTC_Channels&amp;action=history"/>
	<updated>2026-05-01T16:02:45Z</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_Channels&amp;diff=11770&amp;oldid=prev</id>
		<title>Em00k: Created page with &quot;{{Port |Number=$183B |NumberDec=6203 |PortMask=%0001 1XXX 0011 1011 |ShortDesc=CTC 8 channels 0x183b - 0x1f3b |Readable=Yes |Writable=Yes |Subsystem=CTC }} CTC    The CTC has...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.specnext.dev/index.php?title=CTC_Channels&amp;diff=11770&amp;oldid=prev"/>
		<updated>2022-07-01T22:15:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Port |Number=$183B |NumberDec=6203 |PortMask=%0001 1XXX 0011 1011 |ShortDesc=CTC 8 channels 0x183b - 0x1f3b |Readable=Yes |Writable=Yes |Subsystem=CTC }} CTC    The CTC has...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Port&lt;br /&gt;
|Number=$183B&lt;br /&gt;
|NumberDec=6203&lt;br /&gt;
|PortMask=%0001 1XXX 0011 1011&lt;br /&gt;
|ShortDesc=CTC 8 channels 0x183b - 0x1f3b&lt;br /&gt;
|Readable=Yes&lt;br /&gt;
|Writable=Yes&lt;br /&gt;
|Subsystem=CTC&lt;br /&gt;
}}&lt;br /&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>