Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Interfacing / Rs232 card reader interfacing on: April 09, 2010, 07:13:08 pm
I'm trying to interface this rs232 serial card reader(female db9 port, port powered) with my USB Arduino. (I know there are other/better ways to interface with a card reader, but this is all I have at the moment and I'm trying to get a prototype out the door ASAP)

I'm played around with the ttl to rs232 adaptor , but had no luck (presumably because it's designed to hook into a computer's rs232 port, or at least a powered port)

I've seen alot about the max232 chip, but I'm not sure that it's going to help me.

Any suggestions to get something running with the supplies I have? Thanks!
2  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Generating Composite Video on: January 25, 2007, 10:03:26 am
Quote

Any news?  smiley

Still working on it, though classes seem to be getting in the way :3
I might get a chance this weekend to tinker some more, but no real progress as of late.

Also q1 in the schematic is a pnp transtor. I'd imagine a 2n3906 would work fine.
3  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Generating Composite Video on: January 09, 2007, 06:13:28 pm
Quote
My guess is that you might have some problems because of timer interrupts (or other interrupts?) messing up your timing.  Just as an experiment, try adding this to the end of your setup():

    cli();   // disable interrupts

I disabled the interrupts but nothing noticable has changed. Thanks for the suggestion though.
4  Forum 2005-2010 (read only) / Frequently-Asked Questions / Progress! on: January 09, 2007, 12:39:29 pm
O.K. so after reading some about using the registers and applying it to some code I ended up with this


http://datablue.net/random/better_vid.AVI

Not perfect, but alot better than before!
This code still doesn't incorporate the vertical sync because I can't get the timing right. I think It might have something to do with the loop I'm using.

Code:
/* Composite Video Generation
 * ------------
 *
 * uses a 2-bit D-A converter to generate
 * voltages for composite video to RCA. This
 * code should generate continous white horizontal
 * lines to create a fullly white TV
 *
 * Created 18 December 2006
 * copyleft 2006 Kyle Granat <http://www.datablue.net>
 * http://arduino.cc
 *
 * based on Rickard Gunée's pic work
 * http://www.rickard.gunee.com/projects/video/pic/howto.php
 *
 * Register code from Cosine Kitty
 * http://www.arduino.cc/playground/Code/BitMath#registers
 */


void setup()
{
        // set pins 0 (serial transmit) and 2 and 3 as output,
        // but leave pin 1 (serial receive) as input
        // (otherwise serial port will stop working!) ...
        DDRD = B00001101;  // digital pins 7,6,5,4,3,2,1,0
        // Turn off digital output pins 2 and 3
        PORTD &= B00000011;   // turns off 2..7, but leaves pins 0 and 1 alone

}

void loop()
{
  
  
    PORTD = B00000000;    // sets out to 0V for sync pulse for 4 uS
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);

    PORTD = B00000100;//sets out to .33V  for 'porch'
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);
    delayMicroseconds(1);

    PORTD = B00001100;   //sets out to 1V(White)
    delayMicroseconds(52);  


}
5  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Generating Composite Video on: January 04, 2007, 08:37:14 pm
Quote
I think possibly the problem might be that the DigitalWrite command takes a few microseconds to work... maybe you could try using port registers to switch the outputs?

http://www.arduino.cc/playground/Code/BitMath#registers

You might need to add up the cycles that you're using to make sure you get exact timing...

Sorry if all of what I've said is total rubbish... this is just my guess at a possible solution

I've actually had a feeling that that's where my problem is and I've been trying to figure out just how to figure out how long digitalWrites take. This page might help out though, I'll try it later tonight.
Thanks!
6  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Generating Composite Video on: December 26, 2006, 10:08:57 pm
I actually want rolling, solid lines (at the moment) right now I'm just getting this


http://www.datablue.net/random/badVid.avi

Shouldn't I be getting somthing like

?
7  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Generating Composite Video on: December 26, 2006, 09:07:37 pm
Thanks for all of the ideas. I realize how critical it is to get the timing just right. At the moment I'm still having issues witht the video syncing up so I'm really not sure what to do. I've tried using the delayMicroseconds(1) but I'm having similar difficulties as before.

I haven't even begun to play around with  the vertical blanking interval since right now I'm just trying to get it to display solid lines down, so I know I have the horizontal timing right.

I'm not giving up yet, but I'm kinda stuck :/

One of my goals is to have a small protable text generator to use in some other projects. If i can I'd like to make some basic atari-like games as well.
8  Forum 2005-2010 (read only) / Frequently-Asked Questions / Generating Composite Video on: December 20, 2006, 09:15:51 pm
I've been trying to generate some composite video signals based on the following website
http://www.rickard.gunee.com/projects/video/pic/howto.php

Basically each horizontal scan the electron gun shoots corresponds to a 64uS waveform. The first 4uS are the sync pulsem the next 8uS prime the electon gun, and the last 52uS correspond to the asctual image you see( .3V is black and 1V is white)

I'm using the same Digital to Analog converter shown on the website

to generate 0V, .33V, .67V, and 1V based on pin 2(D0) and pin 3(D1). I tested the different voltage to make sure I haven't wired anything wrong, and the hardware seems to be fine.
My code should just continously display lines white, but I'm getting moving white and black lines.
http://www.datablue.net/random/badVid.AVI

Code:
/* Composite Video Generation
 * ------------
 *
 * uses a 2-bit D-A converter to generate
 * voltages for composite video to RCA. This
 * code should generate continous white horizontal
 * lines to create a fullly white TV
 *
 * Created 18 December 2006
 * copyleft 2006 Kyle Granat <http://www.datablue.net>
 * http://arduino.cc
 *
 * based on Rickard Gunée's pic work
 * http://www.rickard.gunee.com/projects/video/pic/howto.php
 */

int d0 = 2;                
int d1 = 3;  

void setup()
{
  pinMode(d0, OUTPUT);      // sets the digital pin as output
  pinMode(d1, OUTPUT);      // sets the digital pin as output
}

void loop()
{
    digitalWrite(d0, LOW);  //sets out to 0V for sync pulse for 4 uS
    digitalWrite(d1, LOW);
    delayMicroseconds(4);
    digitalWrite(d0, HIGH);   //sets out to .33V  for beam ready pulse for older tvs
    digitalWrite(d1, LOW);
    delayMicroseconds(8);
    digitalWrite(d0, HIGH);   //sets out to 1V(White)
    digitalWrite(d1, HIGH);
    delayMicroseconds(52);    

}

I've tried some other waveforms( another site said the wave form should be a 2uS black pulse, a 4us sync pulse, another 4uS black pulse, and a 54uS image data) but still didn't get proper results.
I've also read that it should be 63.5uS not 64uS.

I beleive it's a timing problem with my sync pulse (possibly becuase the digitalWrite() function is taking a few microseconds or beacuse the delayMicroseconds() isn't accurate enough?)

Has anyone tried this or have any ideas/tips?
9  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino POV anyone? on: March 28, 2007, 09:49:49 am
Here's some of my Arduino POV stuff
http://www.datablue.net/random/pov/
http://www.datablue.net/random/povshoe.jpg

The link that Daniel mentioned (http://i.document.m05.de/?p=127) is what I based my stuff on. I found the hardest thing to do physical setup.

Let me know if you need any help.
10  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino running Game of Life? on: December 26, 2006, 09:10:08 pm
Leah Buechley has done some awesome work with werable displays. Her LED shirt plays the game of life though it uses the AVRmega16. It's got a pretty good write up though, perhaps it will help
http://www.cs.colorado.edu/~buechley/diy/diy_tank.html
Pages: [1]