data stream pattern generator

Hi

I am playing around with an idea to send a data stream ( large binary number ) to the video signal of a monitor to generate a pattern.

It would need to be synchronised to the line pulse from the monitor.

Would a Serial.println(number in binary); send an output data stream to any chosen pin of the chip ? ( without needing any handshaking? )

If so, how fast can the data stream be from a Duemilanove?

John

Would a Serial.println(number in binary); send an output data stream to any chosen pin of the chip ?

With NewSoftSerial, you can use any pin as the TX pin.

If so, how fast can the data stream be from a Duemilanove?

NewSoftSerial supports up to 57600 baud.

thanks Paul, I will give it a try

to the video signal of a monitor

This can become a little bit more complex, but you have a chance with a B/W TV compatible monitor (50 or 60 Hz), however not with SoftwareSerial....

I am not worried about gray scale, just black squares, and the horizontal sync from the monitor must start the output of the data stream.

How fast can a pin designated as an output, be switched on and off repeatedly, like the "blink" sketch without any delays ?

John

Very fast, but you will need the

digitalWriteFast()

library. You can then generate a composite video by just two resistors for B/W and may be a third one for 2 intermediate grays. But that would reduce the speed...
I think 50 to 100 pixels/line will be possible... The limiting factor will be the code you need to compute the pixel data...

I think 50 to 100 pixels/line will be possible... The limiting factor will be the code you need to compute the pixel data...

Or, you could use the TVOut library...

http://www.arduino.cc/playground/Main/TVout

Thats sounding good, I only want to put some block type text or shapes in the top right hand corner of the screen.

Every n number of lines I would want to change the data ( n representing the number of lines to make the height of the block )

So perhaps I can change the data ( the binary number ) during the first half of the scan, and then send the data?

If I can't make the number changing during the delay, perhaps have one long number of permanent zeros, then the variable data ?

My present prototype has a handful of 74HC chips so getting it down to one chip would be very rewarding. ( Each block at the moment is 1/80th of a line wide. )

I was doing some research on this - found this (never heard of it - looks cool; thought I'd share):

Note - on one of the pages he mentions converting it to 16 grey scale on PAL using a simple resistor DAC; I am not sure about PAL, but on NTSC, with 4 grey levels and the right patterns for artifact coloring, you can get 256 colors. This was recently (ok, last year) rediscovered on the TRS-80 Color Computer 3; with 16 grey levels...perhaps thousands of colors might be possible.

:slight_smile:

Hi cr0sh
The TV out looks interesting but I am running at 1024 x 768 x 60 Hz, but I can afford to lose some resolution if needed .....

that promethues thing shows it can be done, but that is way out of my league ( I am a newbie to programming and Arduino, with 3 weeks experience, and one project finished to my name )

1024 x 768 x 60 Hz

You did not say so before.
That is non-interlaced, giving you <20us per line
The blocks have to be an little bit larger then :slight_smile:

NTSC is 525@30Hz
What kind if monitor input do you use?

Its basically from a PC, I am superimposing text or shapes in the top RH corner, thats why I wondered how fast the ardiuno would run.

The guy who normally writes the software ( PIC ) for my projects reckoned it would be too fast for a micro, which is why I built the first one from 74HC chips, but having now taken an interest in programming , and seeing some of the projects out there, it made me wonder ?

Its basically from a PC

That can be a lot - from EGA to HDMI. But I think you mean VGA ??

The good thing is thatoypu can easily sync to the screen as H-sync and V-sync are readable from the connector pins.
I think this is the first part you should try: identify the sync pattern.

Sorry I should have mentioned its vga, I have the sync extracted , I use an exclusive or gate for auto detecting the polarity , the proto is working fine.
I wonder if the sync coming so soon after the last bit of data would be a problem ( with the graphic block being on the right hand side ) ?

Read about this one:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1220054359/0
A chip that can display on screen images/text/simbosl just like you want.

Not really low cost and difficult to purchase...

Thanks Senso
I will check that out and see if it can handle the vga

I tried the blink program with no delay, ( assuming that this is as quick and simple as it can get ) and the switched output was 8uS period, and with DigitalWriteFast it was 860 nS or 1.16 Mhz, so I guess I will shelve this idea for now.

I had :-

int ledPin = 13; // LED connected to digital pin 13
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWriteFast(13, HIGH); // set the LED on

digitalWriteFast(13, LOW); // set the LED off

}

If you want to do more with - albeit low resolution - video, the Parallax Propeller is a very flexible chip. As you have 8 processors on it one can be dedicated to video. Even two years ago they had all sorts of funny applications....

It does not cost more than an Arduino....
Their forum is a little bit like this one, may be slightly more professional...