dip switch on pins 28 to 23 :wm8740 dac - diyAudio
Go Back   Home > Forums > Design & Build > Construction Tips

Construction Tips Construction techniques and tips

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 26th August 2012, 07:52 PM   #1
diyAudio Member
 
Join Date: Jun 2010
Default dip switch on pins 28 to 23 :wm8740 dac

Hi, firstly I apologise for being so thick! I am trying to experiment with dac chips. I am using this site

DAC Final

as a guide for construction techniques :just to learn. I want to use this guy's technique of using DIP switches to set , high or low, the control pins for the WM1870 (and other dac chips for that matter)

http://www.wolfsonmicro.com/document.../en/WM8740.pdf

The fellow goes into a lot of detail here but I cannot for the life of me figure out how to wire the switch to the 5v rail / the ground/ and the dac. I realise I could just solder the pins to 5v rail or ground rail directly but at the end of the day I am still clueless as to how to use the DIP technique also the switch would allow very easy A and B listening to try various filters on and off...Can any body help explain? I am going to use a single 8740 in stereo mode so I take it pin 6 is left floating instead of connected to 5v when used in mono mode. Thanks Alan
  Reply With Quote
Old 26th August 2012, 08:49 PM   #2
diyAudio Member
 
Join Date: Feb 2005
Location: S.England
Look at the datasheet, page 5. Some inputs have internal pull-up resistors, some pull-down. If these inputs are left floating (unconnected) then those inputs with internal pull-UP resistors default to logic 1 - hence connect a DIP switch to this input to the GND connection. Conversely, those inputs with an internal pull-DOWN resistor connected default to logic 0 if left floating, hence connect a DIP switch to the positive going rail (DVDD).

Pin 6: DIFFHW. Internal pull-down, activated by pulling high to DVDD for 'MONO' mode (i.e. if using 2 of these ICs). Hence yes, leave it floating for your application. Data sheet not too clear on this really.

Andy
  Reply With Quote
Old 26th August 2012, 09:02 PM   #3
diyAudio Member
 
Join Date: Jun 2010
thanks for the reply, its really informative I will try tomorrow ..
  Reply With Quote
Old 27th August 2012, 04:29 PM   #4
diyAudio Member
 
Join Date: Jun 2010
wolfson dip.JPG

Again I apologise for being so thick! I am really struggling with this. The site says "if you see the dip switch ON then connect to ground: otherwise to 5v". The circuit diagram of the switch is confusing me. There are no resistors because dac has them. So do you connect all the pins to the side of the switch closest to the dac to 5v and solder the pins of the other side of the switch to "ground" so when the switch says "on" the pins go to earth/ground? BUT!!!! Surely then you would just send 5 volts into the ground plane ie making the ground a power rail?

If I look at the ad1896 example its different here. The power rail actually passes through a resistor when the switch is "on" and a power rail can go to ground through a series resistor, just as say Salas suggests to do to test one of his power regs..


So surely what the guy on the site really means is that with the wolfson
pin 23 : switch off then pin connected to nothing
switch on then pin connected to 5v!! indeed : not earth

pin 24 : always to groundie not switched

pin 25/26/27/28: switch off then pins to nothing
switch on then pins to ground
Or am I completely wide of the mark?Like I said sorry for being so thick.

Attached Images
File Type: jpg ad1896 dip.JPG (28.6 KB, 51 views)
  Reply With Quote
Old 27th August 2012, 07:15 PM   #5
diyAudio Member
 
Join Date: Feb 2005
Location: S.England
Quote:
There are no resistors because dac has them.
Correct. Some are connected to DVDD, some connected to GND.

Quote:
So do you connect all the pins to the side of the switch closest to the dac to 5v and solder the pins of the other side of the switch to "ground" so when the switch says "on" the pins go to earth/ground?
NO!!... because:
Quote:
BUT!!!! Surely then you would just send 5 volts into the ground plane ie making the ground a power rail?
BTW, 'ground' IS a power rail.

Connect the DIP switch as stated in my first post. Connect the logic input pin to one side of a DIP switch. The other side of the DIP switch is connected to either DVDD or GND (to DVDD if the input has a pull-down resistor, to GND if the input has a pull-up resistor).

SO, this is what happens to a pin that has an internal pull-DOWN resistor:
Dip switch to input pin, other side to DVDD (+5V).
-Dip switch OPEN (off): the internal resistor pulls the voltage level to LOGIC1
-Dip switch CLOSED (on): the DIP switch pulls the voltage level to LOGIC0
*If input put left 'floating' (no DIP switch connected, or DIP switch is OPEN or off) then the pin will be at LOGIC0

SO, this is what happens to a pin that has an internal pull-UP resistor:
Dip switch to input pin, other side to GND (0V).
-Dip switch OPEN (off): the internal resistor pulls the voltage level to LOGIC0
-Dip switch CLOSED (on): the DIP switch pulls the voltage level to LOGIC1
*If input put left 'floating' (no DIP switch connected, or DIP switch is OPEN or off) then the pin will be at LOGIC1

Does that now make sense???

Andy
  Reply With Quote
Old 27th August 2012, 09:27 PM   #6
diyAudio Member
 
Join Date: Jun 2010
almost makes sense

surely an input pin with a pull up resistor already has an " internal " voltage to it? That is why the dip switch goes to Ground. With the voltage to it we get LOGIC 0.
Shut the switch, pass the voltage to gnd: LOGIC 1....So if the pin floats its the same as an open (off) dip switch so logic would be at LOGIC 0

Andy if its getting too hard I understand you giving up. I have however learnt enough to rig a switch up properly and I think I will get the answer emperically. I was going to make a big mistake because I did not realise the relationship of pull up resistor/switch/gnd and pull down resistor/switch/5v All dacs use this system to set logic....I think you saved me smoking the chip and my brain cells....I just followed how the dac is set in the photo and its just opened up a whole series of more questions but I will get the answers to these myself once its all soldered up....many thanks
  Reply With Quote
Old 27th August 2012, 09:41 PM   #7
diyAudio Member
 
Join Date: Jun 2010
hang on take it all back

with a pull up resistor when the switch is open the logic pin is held high
so you could say that the default of such a pin is high ie logic 1. A closed switch sets the pin low , changes the default setting.
  Reply With Quote
Old 28th August 2012, 07:44 AM   #8
diyAudio Member
 
Join Date: Feb 2005
Location: S.England
Quote:
with a pull up resistor when the switch is open the logic pin is held high
so you could say that the default of such a pin is high ie logic 1. A closed switch sets the pin low , changes the default setting.
YES! Hurragh! We got there in the end!

...and the opposite is true for an input that has a pull-DOWN resistor.

A

PS
Your self-detected error mentioned above when trying to understand DIP switches and their application to an input pin would not have resulted in damage to the chip - YES you would have shorted the supply rails by connecting DVDD +5V to GND when the DIP switch was closed - this may however resulted in damage to the power supply
  Reply With Quote
Old 28th August 2012, 07:54 AM   #9
diyAudio Member
 
Join Date: Feb 2005
Location: S.England
Sh1t! I think I got it ar$e about face above! I'm sure I re-read before posting. Try again:

SO, this is what happens to a pin that has an internal pull-DOWN resistor:
Dip switch to input pin, other side to DVDD (+5V).
-Dip switch OPEN (off): the internal resistor pulls the voltage level DOWN to LOGIC0
-Dip switch CLOSED (on): the DIP switch pulls the voltage level to DVDD LOGIC1
*If input put left 'floating' (no DIP switch connected, or DIP switch is OPEN or off) then the pin will be at LOGIC0

SO, this is what happens to a pin that has an internal pull-UP resistor:
Dip switch to input pin, other side to GND (0V).
-Dip switch OPEN (off): the internal resistor pulls the voltage level UP to LOGIC1
-Dip switch CLOSED (on): the DIP switch pulls the voltage level to LOGIC0
*If input put left 'floating' (no DIP switch connected, or DIP switch is OPEN or off) then the pin will be at LOGIC1

Oops! Sorry about that, girlfriend was prancing about the living room half naked last night and was ever so slightly distracting me - hehe
  Reply With Quote
Old 28th August 2012, 08:51 PM   #10
diyAudio Member
 
Join Date: Jun 2010
hahah no problem I could see the mistake but I said nothing because I did not want to be a smart **** ...so yes it really has sunk in.I really glad you helped me there. Thanks Andy... So I have just cooked up a etched pcb for the dac with dips and going to add the dips to the ad1896 tomorrow SOoooo hopefully...Further the Italian guy has made a mistake by saying "see the switch on :go to ground.See the switch off :go to 5v"...he forgot that pin 23 is a pull down!!.. My latest mistake! I put the wrong side of transparent image of the circuit board over the photoboard so I got a mirror image ( still populated the board tho )!!!!!!

Again thanks loads, learnt something at last!
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cs8414 & wm8740 dac (one dac chip) sparkle Digital Line Level 28 28th March 2012 01:10 PM
New WM8740 DAC lordearl Digital Source 4 3rd May 2010 09:51 AM
sot 23-5 to dip 8 adapter biovizier Parts 2 24th July 2005 12:37 PM
28 pin SSOP to DIP adapter seangoesbonk Parts 8 16th September 2004 07:50 PM


New To Site? Need Help?

All times are GMT. The time now is 04:02 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2