For once I followed the First Rule of Electronics Troubleshooting (FRET):
- Check your voltages.
While trying to integrate the DS1077 programmable oscillator into my RasPi/Propeller prototype accessory, I noticed that I was getting a very glitchy IO signal on an LED I was using for debugging. I was using the LED to signal when an event had happened in the I2C comms process. This showed up when I attached my logic analyser to the IO pin connected to the LED. There was an intermittent fault on that line that could not be a result of the PASM code running on the Propeller.
Hmm. What to do? What do we know about the circuit? We know that the RasPi behaves itself very well when the prototype board isn't attached, and when it is attached, the RasPi continues to function correctly. This means the problem is internal to the prototype board and seems not to cause the RasPi any problems.
That doesn't exonerate the RasPi of blame though. Nosiree. A poke with a multimeter tells me that the "5V" rail on the RasPi is sitting at a very stable but somewhat sickly 4.72 volts.
Next I checked the Propeller's supply voltage - which is the output of the LD33V LDO voltage regulator. This was found to be a nonchalant and debonnaire 3.3 volts - perfect.
Onwards to the DS1077 which runs directly from the "5V" rail on the RasPi. I have to confess ignorance here. I foolishly neglected to verify the quality of the "5V" rail on the RasPi board. Turns out that the "5V" rail is simply hard-wired to the power input which in my case comes directly from a Kindle charger wall-wart.
The DS1077 datasheet states that the acceptable range of VCC is between 4.75 and 5.25. I think that's the culprit right there. I'm running that DS1077 chip from a weak VCC source which is barely grazing the acceptable range.
Interesting. So hopefully if I can provide a stiffer 5V supply for the RasPi (by using a wall wart with a greater current range), I can do away with these glitches in other parts of the system. This also indicates that I can't easily run 5V devices off the 5V rail of the RasPi necessarily.
For the final design I'll need to use some additional circuitry to filter noise on the 5V rail into the prototype board! Ferrites and caps will help in that regard.
We live and learm :).