Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
General Discussion
»
Technology and Development
»
Other
»
R-2R resistor ladder
« previous
next »
Print
Pages: [
1
]
2
Go Down
Author
Topic: R-2R resistor ladder (Read 8573 times)
0 Members and 1 Guest are viewing this topic.
Spyro543
LV9
Veteran (Next: 1337)
Posts: 1189
Rating: +74/-3
R-2R resistor ladder
«
on:
May 31, 2013, 02:42:00 pm »
An R-2R resistor ladder is a nice little method of doing digital to analog conversion.
The one I made is 8-bit, so it can output 256 different voltages from 0V to 3.3V. Here are some pics:
http://i.imgur.com/GPynZsR.jpg
You can see on my oscilloscope that I'm generating a saw wave. All I'm doing is counting from 0 to 255 really fast over and over again, and putting the number onto the 8 pins of the PIC that are connected to the resistor ladder. You can also see on the oscilloscope that the wave isn't perfectly straight, and that's because of the resistors' tolerance that is differing the resistance slightly. There's nothing I can do to fix that, except use resistors with smaller tolerance.
Here's a close up pic of the ladder:
http://i.imgur.com/VObI1xr.jpg
If you want to learn more about this take a look at the wikipedia page
here
.
«
Last Edit: May 31, 2013, 02:42:44 pm by Spyro543
»
Logged
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: R-2R resistor ladder
«
Reply #1 on:
June 01, 2013, 05:35:41 am »
I made a 4 bit one for use with calcs once. I tested that one with different waveforms as well. I even tried converting sound samples to calc format, but it did not quite work.
«
Last Edit: June 01, 2013, 05:35:57 am by Keoni29
»
Logged
If you like my work: why not
give me an internet?
aeTIos
Nonbinary computing specialist
LV12
Extreme Poster (Next: 5000)
Posts: 3915
Rating: +184/-32
Re: R-2R resistor ladder
«
Reply #2 on:
June 01, 2013, 05:42:09 am »
Nice oscilloscope you have there
Logged
I'm not a nerd but I pretend:
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: R-2R resistor ladder
«
Reply #3 on:
June 01, 2013, 05:44:05 am »
Hmm that scope gives me a cool idea
(calc ADC with scope software)
Logged
If you like my work: why not
give me an internet?
aeTIos
Nonbinary computing specialist
LV12
Extreme Poster (Next: 5000)
Posts: 3915
Rating: +184/-32
Re: R-2R resistor ladder
«
Reply #4 on:
June 01, 2013, 05:44:47 am »
will that work?
Logged
I'm not a nerd but I pretend:
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: R-2R resistor ladder
«
Reply #5 on:
June 01, 2013, 05:46:35 am »
Of course that will work. If you have a 12 bit analog to digital converter with an I2C bus you could interface it with the 84+. You'd need to implement the I2C protocol in software though.
Logged
If you like my work: why not
give me an internet?
Streetwalrus
LV12
Extreme Poster (Next: 5000)
Posts: 3821
Rating: +80/-8
Re: R-2R resistor ladder
«
Reply #6 on:
June 01, 2013, 05:47:12 am »
It will. Because here we're all awesome and there's nothing we can't do.
Edit : Why I2C ? wouldn't your soundchip interface work ?
«
Last Edit: June 01, 2013, 05:48:11 am by Streetwalker
»
Logged
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: R-2R resistor ladder
«
Reply #7 on:
June 01, 2013, 05:53:04 am »
The atmega 328 has a built in 10 bit ADC, so I could use one of those and use the same protocol as my soundchip uses.
Logged
If you like my work: why not
give me an internet?
Streetwalrus
LV12
Extreme Poster (Next: 5000)
Posts: 3821
Rating: +80/-8
Re: R-2R resistor ladder
«
Reply #8 on:
June 01, 2013, 05:55:17 am »
Yeah so you can actually make it in less than 10 seconds.
(not counting display but that's pretty easy in Axe)
Logged
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: R-2R resistor ladder
«
Reply #9 on:
June 01, 2013, 07:34:25 am »
No you can't do it in so little time. You have to write some code for handling data streams.
Logged
If you like my work: why not
give me an internet?
Streetwalrus
LV12
Extreme Poster (Next: 5000)
Posts: 3821
Rating: +80/-8
Re: R-2R resistor ladder
«
Reply #10 on:
June 01, 2013, 07:35:31 am »
Yeah I was just sayin' that it wouldn't take really long to do it.
Logged
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: R-2R resistor ladder
«
Reply #11 on:
June 01, 2013, 07:36:23 am »
About 1 hour to write the code and about 10 hours to find that one annoying bug.
Logged
+1/-0 karm for this message
If you like my work: why not
give me an internet?
Streetwalrus
LV12
Extreme Poster (Next: 5000)
Posts: 3821
Rating: +80/-8
Re: R-2R resistor ladder
«
Reply #12 on:
June 01, 2013, 07:37:11 am »
BUGS !
I HATE BUGS !
* Streetwalker runs away from them
«
Last Edit: June 01, 2013, 07:37:36 am by Streetwalker
»
Logged
aeTIos
Nonbinary computing specialist
LV12
Extreme Poster (Next: 5000)
Posts: 3915
Rating: +184/-32
Re: R-2R resistor ladder
«
Reply #13 on:
June 01, 2013, 07:40:20 am »
This is getting off-topic.
Really.
And I actually shouldn't post this either because it's also off-topic
Logged
I'm not a nerd but I pretend:
Streetwalrus
LV12
Extreme Poster (Next: 5000)
Posts: 3821
Rating: +80/-8
Re: R-2R resistor ladder
«
Reply #14 on:
June 01, 2013, 07:41:21 am »
Haha yeah.
This is looking pretty awesome, Spyro.
Logged
Print
Pages: [
1
]
2
Go Up
« previous
next »
Omnimaga
»
Forum
»
General Discussion
»
Technology and Development
»
Other
»
R-2R resistor ladder