<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - OPA Multi-timbral FM Synthesizer]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/18171/"/>
	<updated>2016-09-05T17:38:17Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/18171/opa-multitimbral-fm-synthesizer/</id>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247830/#p247830"/>
			<content type="html"><![CDATA[<p>Just tried the edits, one at a time. No change in the behavior.<br />There is another point that I didn&#039;t fully notice yesterday. The comms start to work right&nbsp; when I:</p><p>1 Select ttyAMA0<br />2 ****Send Note On/Off messages to editor, the first 2 or 3 key presses are silent, thereafter the synth sounds.****<br />3 De select ttyAMA0 or shut down the Editor.<br />4 Select ttyAMA0 again, now the the Editor will refresh.</p><p>I hadn&#039;t noticed that step 2 was needed but I was doing it when it worked yesterday. Just tried Select-Deselect-Select with no Note messages and that didn&#039;t.<br />Yogi</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-05T17:38:17Z</updated>
			<id>https://chipmusic.org/forums/post/247830/#p247830</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247827/#p247827"/>
			<content type="html"><![CDATA[<p>One in place of the other. But try first with: tcflush(handle, TCIFLUSH);<br />Many thanks in advance yogi.</p>]]></content>
			<author>
				<name><![CDATA[marzacdev]]></name>
				<uri>https://chipmusic.org/marzacdev</uri>
			</author>
			<updated>2016-09-05T16:58:31Z</updated>
			<id>https://chipmusic.org/forums/post/247827/#p247827</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247826/#p247826"/>
			<content type="html"><![CDATA[<p>One in place of the other. But try first with: tcflush(handle, TCIFLUSH);<br />Many thanks in advance yogi.</p>]]></content>
			<author>
				<name><![CDATA[marzacdev]]></name>
				<uri>https://chipmusic.org/marzacdev</uri>
			</author>
			<updated>2016-09-05T16:58:17Z</updated>
			<id>https://chipmusic.org/forums/post/247826/#p247826</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247825/#p247825"/>
			<content type="html"><![CDATA[<p>Great, will do!<br />one question-the TCIFLUSH line with the TCIOFLUSH line also or one in place of the other?</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-05T16:45:02Z</updated>
			<id>https://chipmusic.org/forums/post/247825/#p247825</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247824/#p247824"/>
			<content type="html"><![CDATA[<p>Hi Yogi,<br />since you are in the rs232-linux.c code could you try this:</p><p>add the line:</p><p>tcflush(handle, TCIFLUSH);</p><p>before:<br />if (tcsetattr(handle, TCSANOW, &amp;config) &lt; 0) {</p><p>So it makes:</p><p>// Timeouts configuration<br />&nbsp; &nbsp; config.c_cc[VTIME] = 1;<br />&nbsp; &nbsp; config.c_cc[VMIN]&nbsp; = 0;<br />&nbsp; &nbsp; //fcntl(handle, F_SETFL, FNDELAY);<br />// Validate configuration<br />&nbsp; &nbsp; tcflush(handle, TCIFLUSH);<br />&nbsp; &nbsp; if (tcsetattr(handle, TCSANOW, &amp;config) &lt; 0) {<br />&nbsp; &nbsp; &nbsp; &nbsp; close(handle);<br />&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; com-&gt;handle = handle;<br />&nbsp; &nbsp; return 1;<br />}</p><p>It&#039;s very possible the uart buffers are not initially empty as they are used by the system as a terminal console. Can you tell me if that solves the problem?</p><p>It could even be more secure to perform a:<br />tcflush(handle, TCIOFLUSH)</p><p>Please try it too.</p><p>Fred</p>]]></content>
			<author>
				<name><![CDATA[marzacdev]]></name>
				<uri>https://chipmusic.org/marzacdev</uri>
			</author>
			<updated>2016-09-05T15:44:16Z</updated>
			<id>https://chipmusic.org/forums/post/247824/#p247824</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247791/#p247791"/>
			<content type="html"><![CDATA[<p>YES, success by accident! I had been testing this afternoon, trying the different setups and ideas we&#039;ve been kicking around with no improvement. Then at one point, opened the ttyAMA0 com (no display update), closed the connection; THEN without closing the Editor, I re opened the ttyAMA0 connection and BOOM! full functionally <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> I&#039;ve repeated this after a cold boot and no test harness attached, to confirm the workaround. Not really sure if something changed with my cable but I doubt that was the issue. </p><p>In the Dropbox are the putty5.logs of the re connect; dsPIC&#039;s Tx monitored via a FTDI connection to my PC, while the OPA was connected to the Pi.&nbsp; &nbsp;</p><p>So my guess is there is something strange in the RPi&#039;s uart handling that is outside the norm for other Linux distros. Where as the Editor using ttyUSB works almost flawlessly on the Pi.&nbsp; <br />Yogi <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-04T21:54:00Z</updated>
			<id>https://chipmusic.org/forums/post/247791/#p247791</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247777/#p247777"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>marzacdev wrote:</cite><blockquote><p>If you&#039;re sure of your connections (RX and TX swapped correctly), you can try to short R5 and see if that&#039;s working better.<br />Also, if you do not have a scope at reach, try with an ohm-meter to check the basic conductivity of your wiring.</p></blockquote></div><p>I&#039;m sure with the pinning and will try shorting R5 (is it series resistance, current limiting?). After several cycles of re pinning for the two setups, I suspect the crimp-on connectors ( AMP type shell and crimp connectors). The metal &#039;socket&#039; may have been deformed a little when I crimped it, just enough to have a bad connection on the carrier board header and a slightly better connection when plugged into the PC FTDI header. </p><p>I did do a continuity test across the cable: SIP header pins inserted into the Pi end socket of the cable, the other socket plugged into the header on the carrier board, and tested from the back of the board header across to the Pi end pins. Which was good, but&nbsp; of course I was applying &#039;pressure&#039; and flexing the cable with my meter probes. Will continue testing from OPA shield to Pi board.</p><p>Was also thinking of a another test harness- the cable between the Pi and OPA in place, but add a jumper/probe from the Rx on the PC FTDI to the OPA&#039;s Tx. Sort of a &#039;Y&#039; on the line so I can log the dsPIC response and trace the signal path. My biggest concern is loading the dsPIC&#039;s pin too much.&nbsp; </p><p>Yogi</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-04T17:55:07Z</updated>
			<id>https://chipmusic.org/forums/post/247777/#p247777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247773/#p247773"/>
			<content type="html"><![CDATA[<p>If you&#039;re sure of your connections (RX and TX swapped correctly), you can try to short R5 and see if that&#039;s working better.<br />Also, if you do not have a scope at reach, try with an ohm-meter to check the basic conductivity of your wiring.</p>]]></content>
			<author>
				<name><![CDATA[marzacdev]]></name>
				<uri>https://chipmusic.org/marzacdev</uri>
			</author>
			<updated>2016-09-04T16:46:22Z</updated>
			<id>https://chipmusic.org/forums/post/247773/#p247773</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247772/#p247772"/>
			<content type="html"><![CDATA[<p>If you&#039;re sure of your connections (RX and TX swapped correctly), you can try to short R5 and see if that&#039;s working better.<br />Also, if you do not have a scope at reach, try with an ohm-meter to check the basic conductivity of your wiring.</p>]]></content>
			<author>
				<name><![CDATA[marzacdev]]></name>
				<uri>https://chipmusic.org/marzacdev</uri>
			</author>
			<updated>2016-09-04T16:46:08Z</updated>
			<id>https://chipmusic.org/forums/post/247772/#p247772</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247769/#p247769"/>
			<content type="html"><![CDATA[<p>Thanks so much Fred. I noticed the same byte pattern in the logs but didn&#039;t know the meaning. Of course remember that the logs are dumps of the Editor sending to the PC (in place of the OPA), Pi-&gt;PC test setup. It does confirm that the Editor is opening and using the Uart port. But the sound test, with the OPA I did last night, does show the one-way comms behavior. </p><p>The weird part is I used the same jumper cable on both tests, ~25cm of 4 conductor ribbon with a 4 pin socket on the Pi end and a 6 pin socket on the OPA end. The shield carrier board has a 6 pin header following the FTDI breakout board layout. So the OPA end of the jumper cable is pinned to match this header, plugging in instead of the FTDI board. With the Pi-&gt;PC test I just re pinned this socket, swapping Tx and Rx and removing the +5V from the socket. Then plugging it into a PC side FTDI board, set for +3.3V. This Pi-&gt;PC setup did work bidirectionally with the terminal tests.</p><p>At any rate, all signs point to a bad connection to the dsPIC Tx. Don&#039;t have access to a scope any more but I can setup my Papilio board as a Logic Analyzer. So if I can&#039;t make headway with inspecting the cable connectors, will load up the Papilio and see if that helps. </p><p>Thanks again,<br />Yogi</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-04T16:31:49Z</updated>
			<id>https://chipmusic.org/forums/post/247769/#p247769</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247756/#p247756"/>
			<content type="html"><![CDATA[<p>Hello Yogi,</p><p>given the logs, I can tell that the editor received no data from the OPA.</p><p>Look (putty1.txt):<br />00000040&nbsp; 3D 7E 3D 7E 3D 7E 3D 7E 3D 7E 3D 7E 3D 0D 0A 0A<br />00000050&nbsp; 00 4C 00 0E 00 00 05 00 09 04 05 00 09 07 05 00</p><p>Real data starts at 0x004F (0D 0A is carriage return / line feed)<br />Editor sends 0A 00 4C 00 = please send me program 1<br />Then he should ask for program 2 until program 10, kit parameters and global parameters to initialise the GUI.</p><p>If it does not ask for more, it is because he received nothing.<br />I have checked the Raspberry Model A &amp; B 2.1 and Model B+ 1.2 schematics and TX / RX lines are directly connected to the CPU, there is no logic conversion or pull-up, pull-down resistors.</p><p>The OPA shield also works with 0V to 3.3V logic levels (as the Raspberry).<br />You must have some connection problems.</p><p>I recommend you to use a scope and probe the logic levels on the RXD pin on the Raspberry connector to check if they are in a good range.</p>]]></content>
			<author>
				<name><![CDATA[marzacdev]]></name>
				<uri>https://chipmusic.org/marzacdev</uri>
			</author>
			<updated>2016-09-04T06:21:28Z</updated>
			<id>https://chipmusic.org/forums/post/247756/#p247756</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247753/#p247753"/>
			<content type="html"><![CDATA[<p>Wow, So I rechecked my cable but everything seemed right. Setup the shield and opened the Editor, and unlike with the FTDI it didn&#039;t load the default program 1 from the shield. This behavior is like I had noted before (and thought it meant the shield wasn&#039;t working), but this time I tried connecting my keyboard and played a few notes. AND HEARD the 1 OP default sound. So I Opened a patch from disk, the editor updated the display and the synth plays it. </p><p>&nbsp; Testing further, seems that the Editor is not updating from the synth. Loading an Internal patch does load it on the synth but the Editor doesn&#039;t update the screen with the patch prams.&nbsp; Moving controls or Opening a saved patch updates the synth and the display.</p><p> Seems like there is an issue with the dsPIC Tx -&gt; Pi Rx connection, More checking with this cable!!!<br />Yogi</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-04T02:19:43Z</updated>
			<id>https://chipmusic.org/forums/post/247753/#p247753</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247751/#p247751"/>
			<content type="html"><![CDATA[<p>Ok more logs in the Dropbox folder ( here is the link to the folder) <a href="https://www.dropbox.com/sh/7ud7s5eoy30v929/AADf1EJtRYZto0sukty-g8l7a?dl=0" target="_blank">https://www.dropbox.com/sh/7ud7s5eoy30v &#133; g8l7a?dl=0</a><br />In putty2.log and putty2.txt <br />I opened the Editor and after the cursor stopped spinning (trying to refresh from OPA? ) I hit the Load Internal three times (Program 1, internal 1). So the last 9 bytes of the log should be 0x0A, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x0A, 0x00, 0x00 yes?<br />But the log shows this in HxD- 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00 0x00<br /> So this is strange. I did another run but pressed Store Internal (Program 1, internal 1)<br />putty3.log and putty3.txt-<br />Now its 0x0D, 0x00, 0x00 when it should be 0x09,0x00, 0x00<br />So don&#039;t know What is going on, why the bit values are off compared to the Command value in the manual. Maybe some weirdness with PuTTY or HxD or the FTDI interface or the Pi uart ?!?!<br />And why the Editor works with an FTDI and not with a direct connection. Judging from these tests it would seem that the shield would do Something,&nbsp; even if it&#039;s the wrong command. But not seeing/hearing any signs. </p><p>Hope this helps,<br />Yogi<br />EDIT: Ok I looked into the Arduino Lib. Checked in OPA.h and see&nbsp; that <br /></p><div class="codebox"><pre><code>        OPA_CODE_INTERNALSTORE        = 13,
        OPA_CODE_INTERNALLOAD        = 14, </code></pre></div><p>Which matches with the above logs, so... will have to recheck the cable. I also wonder if the +3.3V signals from the Pi are a problem. It Should work with the dsPIC but maybe the drive from those pins is just too low? I have some SF bi-direction Level shifter boards I can setup on the cable and test again.</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-04T00:13:31Z</updated>
			<id>https://chipmusic.org/forums/post/247751/#p247751</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247749/#p247749"/>
			<content type="html"><![CDATA[<p>Here is the PuTTY log. I started a session then started the Editor. Hit Load, then moved the Vol knob about Halfways up.<br /><a href="https://www.dropbox.com/s/mh0sshvwftwt5pm/putty.log?dl=0" target="_blank">https://www.dropbox.com/s/mh0sshvwftwt5 &#133; y.log?dl=0</a><br />Yogi<br />EDIT: if there is a specific command in the Editor to log let me know. Also I included a hex view from HxD as putty1.txt<br /><a href="https://www.dropbox.com/s/l92l1yshr1qduwb/putty1.txt?dl=0" target="_blank">https://www.dropbox.com/s/l92l1yshr1qdu &#133; 1.txt?dl=0</a></p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-03T21:48:26Z</updated>
			<id>https://chipmusic.org/forums/post/247749/#p247749</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OPA Multi-timbral FM Synthesizer]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/247746/#p247746"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>marzacdev wrote:</cite><blockquote><p>Hi yogi,</p><p>I have been reading what you&#039;ve done and I think you&#039;ve found most of the problems. It should be working ok by now!<br />Send me a dump of the data it transmits and I will have a look. </p><p>You can actually log a putty session into a text file:<br /><a href="http://www.tricksguide.com/guide-how-to-capture-a-log-file-of-your-putty-session.html" target="_blank">http://www.tricksguide.com/guide-how-to &#133; ssion.html</a></p><p>I believe the problem might be the wiring. </p><p>Are these lines set as followed:<br />- DIG2 / CS1 =&gt; 0v<br />- DIG3 / CS2 =&gt; 0v<br />- DIG7 / RESET =&gt; 0v<br />- DIG7 / SWAP =&gt; 0v</p><p>with no jumper on the shield?</p><p>Fred</p></blockquote></div><p>Hi Fred, I&#039;ll get a dump file for you. </p><p>As to the pins, got those set as you noted and jumpers open. Cable- Pi GND -&gt; GND, +5v -&gt; +5v, Pi Rx -&gt; Rx and Pi Tx -&gt;Tx (carrier board crosses Tx/Rx between FTDI header and Shield header ); same carrier board just replaced FTDI board&nbsp; with cable to PI. Have tested on GPIO uart with and without Swap active, have a jumper block on the board. As well, I have the &#039;Arduino&#039; Reset line pulled high with 10K R as per the Arduino board.</p><p>Thanks for your input, will get back to you,<br />Yogi</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2016-09-03T21:25:48Z</updated>
			<id>https://chipmusic.org/forums/post/247746/#p247746</id>
		</entry>
</feed>
