Believe me, I would had to do it twice anyway -as it was suggested before on this thread-. By doing it on purpose I avoided a lot of surprises and disappointments; and hopefully everything will be fixed and working for when the rest of the components arrive.Congratulations! You now have the first 90% of the project done. You only have 90% to go.
The SYNC output looks fine, except for 2 issues: the first is a small oscillation at the beginning of the rising edge; which you can see in this picture at 500Hz...This one could be either hardware or software... You need to make sure that the sync signal at the PIC input pin is clean without any wiggles or oscillations. If the sync signal is clean then I would vote for a software problem. Posting your code would be needed to help with that.
... and which seems to disappear above some something like 100KHZ to 500KHz, as in this picture at 500KHz...
The second issue is the fact that the wave is not 5V peak. As you can see in the oscilloscope, which is set at 1V per division, it goes from 0.2V to around 3.8V to 4V, depending on the frequency.
I found today that I can get the PIC to read any frequency from the SYNC output by using a pull-up resistor; but I was surprised about how small the resistor needs to be -anything over 220Ω will not work-; so I'm not sure if this is a reliable solution to the problem.
You're right, the SYNC is 90 degrees out of phase. I think you might also be right (as usual ) about this being the cause of the glitch, and also about having something to do with a bad ground. While taking those pictures above, I noticed that the glitch you see on them was gone for a moment while pushing down the left side of the LCD. Then I changed the position of the cables and the device and couldn't get the effect anymore; so I can't tell what exactly is causing the glitch.I think this glitch is from the sync signal. (As I remember, the sync signal is 90 degrees out of phase with the square wave).
Hopefully, better power supply bypassing will get rid of the glitch. If not, you may have the sync signal coupling into the input of the output amp, a poor ground for the bypass capacitors or a ground loop that the sync signal is drawing current through.
Last edited: