Have I perhaps done something silly?

booski

Senior Member
As some of you might have seen, I've been using a bit banged SPI bus to control a DS1802.

The DS1802 can also be used by grounding push button controls.
When I use the SPI bus to change the uPot, I get an inherent click through the speakers. However, when I use the push button controls directly (using a resistor and length of wire soldered to it to ground) I get no click, and the transition is smooth.

Now, the picaxe is directly attached to the DS1802 with a RST pin, Clock pulse pin and Data pin. There are also 3k pull down resistors on the SPI pins of the DS1802 and there are 2x DS1802 being controlled.

Now the silly thing I think I've done is to have connected the picaxe to the DS1802 without any kind of a resistance between.

Any ideas?
 

booski

Senior Member
Bah, yes, indeed I had done something silly.
Well, a couple of things actually. First off, the pull down resistors on each of the pin, because there was 2 x ds1802 and 2 x resistors, they essentially become 1.5k instead of 3k, hence, noise injected into the ground. Also, one of the pull downs wasn't on the correct pin either, instead of being on the clock pin, it was on the data out pin, and just injecting further noise into it like that.

So there are no longer pull downs on it and the noise has decreased considerably to a 'just audible' level. However, perfectly quiet would be nice so the question still remains, resistance between the picaxr and DS1802 or not?
 

hippy

Ex-Staff (retired)
There shouldn't be any need for pull-ups nor pull-downs on an SPI bus; they are driven to hard logic highs and low by the PICAXE. As to a resistor in series on each line that shouldn't be necessary but perhaps the best way is to try it. A lot will depend upon the nature of the noise, where the click is coming from or being induced.

You could try disconnecting one DS1802 from the audio and the other from the SPI bus - Does sending SPI cause a click on the channel still connected ? If so then it's pick-up or an induced click somewhere.

On what the circuit is built, how digital and analogue grounds are connected, plus how the power rail is regulated and decoupled, length of tracks or wires, can all affect an audio signal. Best thing is to put a scope on the audio to see the click and look at the grounds, power rails and other signals when that occurs.

Test the circuit with the download cable removed, particularly if an AXE026 RS232 cable, so there's no odd earth loops or anything pulling at grounds and ideally test with batteries.
 
Top