EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: aaron on June 09, 2013, 01:07:14 pm

Title: DAC With Picaxe
Post by: aaron on June 09, 2013, 01:07:14 pm
Hey guys, I wanted to develop a program for a Picaxe PIC to draw stuff to a TV over composite.
The programming part is fine and all, but I'm still having trouble with the electronics, which I'm still trying to actively learn.

I want to produce 3 signals for my B/W output to the TV. 0v for sync, .33v for black and 1v for white. I'm trying to use transistors to send this signal out using two of the pins by pulling to ground when I set a pin to high (Using a Darlington). (Both high: 0v, Other two pins produce .33v and 1v if high)

I'm not sure how to go about this, I'm doing something wrong following guides on the internet, still haven't fully worked out exactly how transistors work in a set-up like this. Although I do have a general idea of how they work. (I just suck at applying it)

So yeah, any help would be awesome. I'm not even sure if I'm taking the correct approach using transistors.

Thanks!
Title: Re: DAC With Picaxe
Post by: Skimask on June 09, 2013, 01:57:14 pm
I don't see this happening...especially on a PICAXE.  Not nearly enough speed or consistency to maintain timings requied by NTSC or PAL.
But it's been done a numbr of times using regular PICs (or otherwise).
Guess where I found that info?
Title: Re: DAC With Picaxe
Post by: 4to20Milliamps on June 09, 2013, 02:05:38 pm
The propeller chip would be a better choice, not too steep of a learning curve:

http://www.parallax.com/portals/0/propellerqna/Content/QnaTopics/QnaVideo.htm (http://www.parallax.com/portals/0/propellerqna/Content/QnaTopics/QnaVideo.htm)
Title: Re: DAC With Picaxe
Post by: MikeK on June 09, 2013, 08:59:00 pm
I don't know if the PICAXE is fast enough to do it, but the guys at the PICAXE forums could give you a definite answer.  It's been done plenty of times with a regular PIC or AVR, though.
Title: Re: DAC With Picaxe
Post by: aaron on June 10, 2013, 02:15:59 am
Thanks for the responses. It may not work.... I'm overclocking the chip to get the delays I need, however it might not be consistent enough. It'll be an experiment really ;)

The problem is though, generating the signals. If I use resistor dividers and have a .33v output and a 1v output, I basically want to run them through switches and into the composite out signal. Both switches off would be 0v of course, and one or the other would be .33v or 1v.

The switches is where I'm stuck. I know you can use transistors to do this but every time I try, I get the wrong voltage outputs. I was wondering if someone could show me how I would go about using transistors in a circuit like this.

That would be awesome. Hopefully I can get it to work though.... I don't expect it to work, but if it does I'll post results ;D

Thanks in advance for any help
Title: Re: DAC With Picaxe
Post by: David_AVD on June 10, 2013, 02:20:08 am
Personally I'd just use an OSD chip to do all the hard work.  Built in fonts too.   :)
Title: Re: DAC With Picaxe
Post by: Skimask on June 10, 2013, 02:42:20 am
x2
Title: Re: DAC With Picaxe
Post by: aaron on June 10, 2013, 02:58:40 am
I could, but I still want to see if the Picaxe can do it :P
Besides, I don't have anything else with me at the moment. Would keep me occupied for a decent amount of time.
Title: Re: DAC With Picaxe
Post by: Psi on June 10, 2013, 03:00:28 am
The Minim OSD from hobbyking or somewhere, is only US$20.
http://www.hobbyking.com/hobbyking/store/__36844__minim_osd_v1_1.html (http://www.hobbyking.com/hobbyking/store/__36844__minim_osd_v1_1.html)

It has an ATMega328p and MAX7456 OSD chip already connected together. And the source code is opensource arduino.
It takes a composite signal and overlays text ontop. (im note sure if you can get it to generate its own composite signal though)

Note: if you do get it, join the AGND and DGND on the bottom of the pcb (there's a pad)
The MAX7456 chip has been known to smoke if it gets more than 0.3V between the two.
Title: Re: DAC With Picaxe
Post by: David_AVD on June 10, 2013, 03:02:04 am
I can understand the desire to try something just because you can.  As I get older I find that I just can't be arsed most of the time!   :-DD
Title: Re: DAC With Picaxe
Post by: aaron on June 10, 2013, 03:05:47 am
Thanks PSI and David. Sounds good but I still want to try it with what I have at hand right now. David I'm sure I'll end up the same :P

I'm still trying to figure out my transistor issue though, and I actually have an Atmega328p with the Uno bootloader on it with me now, just don't have a Serial/Usb/Ttl adapter.
Title: Re: DAC With Picaxe
Post by: David_AVD on June 10, 2013, 03:12:36 am
Check out the hardware used on the PIC based video projects (pong game for example).