Arduino VGAout

I watched this video.

Nice Hack!
http://www.reddit.com/r/HSL/comments/168zwo/arduino_vga/

So, I came back on the making of Arduino program.
First, I made easy sample sketch for text display.

#include "SYSdef.h"
#include "CRTdef.h"
#include "INTdef.h"
#include "CSLdef.h"

/*==========================================================================*/
/*  Program                                                                 */
/*==========================================================================*/
CSYS objSYS;
CCRT objCRT;
CCSL objCSL;
CINT objINT;

void setup()
{
    objSYS.Ini();               /* re-initialize after Arduini IDE init()   */
    objCRT.ChangeMode( CRT_TEXT );
    sei();                      /* interrupt enable                         */
}

void loop()
{
    vram_data[8*0+0] = 'H';     /* line 1   */
    vram_data[8*0+1] = 'a';
    vram_data[8*0+2] = 'p';
    vram_data[8*0+3] = 'p';
    vram_data[8*0+4] = 'y';
    
    vram_data[8*1+0] = 'N';     /* line 2   */
    vram_data[8*1+1] = 'e';
    vram_data[8*1+2] = 'w';
    
    vram_data[8*2+0] = 'y';     /* line 3   */
    vram_data[8*2+1] = 'e';
    vram_data[8*2+2] = 'a';
    vram_data[8*2+3] = 'r';
    vram_data[8*2+4] = '!';
    
    LineColor[0] = COL_RED;
    LineColor[1] = COL_GRN;
    LineColor[2] = COL_BLU;
}

GoogleCode
http://code.google.com/p/arduino-vgaout/

1 year ago
http://arduino.cc/forum/index.php/topic,76020.45.html

I will enjyoy with Arduino again.
Thanks!

Hi all!
I programmed some functions.
put_char(x,y,c)

And I wrote a simple skrtch.

You can download the code "VGA13_20130202.zip".
http://code.google.com/p/arduino-vgaout/downloads/list

http://code.google.com/p/arduino-vgaout/

Thanks!

Hi all!

I have added a few functions.
And write simple example sketch.

64-color VGA with Arduino and 8 register
http://code.google.com/p/arduino-vgaout/

functions
http://code.google.com/p/arduino-vgaout/wiki/Welcome

sketch
http://code.google.com/p/arduino-vgaout/wiki/Example2

code : VGA13_0216.zip
http://code.google.com/p/arduino-vgaout/downloads/list

Thanks!

Hi all!
I have added draw line function.
And write an example sketch.

64-color VGA with Arduino and 8 register
http://code.google.com/p/arduino-vgaout/

schematic and pictures : VGAout_Schematic.pdf
code : VGA13_0315.zip
http://code.google.com/p/arduino-vgaout/downloads/list

Thanks!

I love what you're doing but I'm struggling to get it running.

I'm seeing the following compiler error…

VGA13_0315/CRT_ChangeMode.cpp.o: In function CCRT::ChangeMode(unsigned char)': /Users/me/Documents/Arduino/libraries/VGA13_0315/CRT_ChangeMode.cpp:32: multiple definition of CCRT::ChangeMode(unsigned char)'
CRT_ChangeMode.cpp.o:CRT_ChangeMode.cpp:32: first defined here

…in fact LOTS of this but this is the start of it.

I'm using VGA13_0315
Arduino IDE 0022, 1.0.4 and 1.5.4
On Mac OS 10.8.5

I'm hoping to use this as a display device for kids club where we are building a race track for Pinewood Derby cars. An Arduino will scan optical sensors at the finish line then display placings either on a monitor or a projector.

All suggestions gratefully received.

Hi! I'm Nabe_RMC.
Thanks you so much to see my work.

I'm sorry I don't have any Mac PCs.
So, I cannot check on Mac.

"multiple definition"?

I did "Grep"

?????  "ChangeMode"
????   *.cpp,*.h,*.pde,*.ino
????   D:\work_D\tmp\VGA13_0315\
    (?????????)
    (?????????????)
    (?????????????)
    (????????)


D:\work_D\tmp\VGA13_0315\CRT_ChangeMode.cpp(3,23)  [SJIS]:     File Name   : CRT_ChangeMode.cpp
D:\work_D\tmp\VGA13_0315\CRT_ChangeMode.cpp(27,12)  [SJIS]: void CCRT::ChangeMode( UB mode )
D:\work_D\tmp\VGA13_0315\CRT_Ini.cpp(55,5)  [UTF-8]:     ChangeMode(CRT_TEST1);
D:\work_D\tmp\VGA13_0315\CRT_Set_Data_sin.cpp(3,23)  [SJIS]:     File Name   : CRT_ChangeMode.cpp
D:\work_D\tmp\VGA13_0315\CRTdef.h(129,10)  [UTF-8]:     void ChangeMode( UB );
D:\work_D\tmp\VGA13_0315\VGA13_0315.pde(61,9)  [SJIS]: 	objCRT.ChangeMode( CRT_TEXT );
D:\work_D\tmp\VGA13_0315\VGA13_0315.pde(86,9)  [SJIS]: 	objCRT.ChangeMode( CRT_DRAW );
7 ??????????

I'm using
Windows XP - Arduino 0018
Windows 7 - Arduino 1.0.4
And there is no problem.
But the source of Shift-JIS code seems to have been mixed.
Will there be affected this for Mac OS?
I think I want to check the files you unzipped.
Could you send me by compressing the following folder?
/Users/me/Documents/Arduino/libraries/VGA13_0315/

Thank you very much for your assistance Nabe_RMC.

I have sent the files to you.

I received the?files and compiled on my Windows PC.
No error occurred.

/Users/me/Documents/Arduino/libraries/VGA13_0315/CRT_ChangeMode.cpp:32: multiple definition of `CCRT::ChangeMode(unsigned char)'

I noticed VGA_0315 folder is located under the libraries folder.
So I also to put in the same way.
Then the folder name I have seen in the following step.
[File] -> [Examples]
And click the name then open new window.
I clicked Verify button then same error occurred.

VGA_0315 folder and files are not arranged as libraries.
So when we compile the files the following procedure.
[File] -> [Open]
Select
/VGA13_0315.pde
then open new window and click [Verify] button.

I'm coding NTSC signal soft recently.
Arduino UNO or Duemilanove and 8 registers

I thought up new way.
It might make more display characters if applied VGA13 this technique.

Best regards,

Nabe

I have managed to run this nice project on Mega2560.
Everything else works now, but first line of every font is out of sync. This works with UNO, but I need analog input pins in project.

Here you can see what is the issue - YouTube

Your code is quite complicated to me. Is it possible to "blank" the first line? Friend supposed duct tape :wink:

I'm very glad you have tried that code.

Here you can see what is the issue https://www.youtube.com/watch?v=EpNBO-afJ84

I watched the video.
I think that the processing time is running out.
Could you send me your code?
I will chek that on my Mega2560.
If you are satisfied with 6 charcters per row,?it may be easy to correct.

Everything else works now, but first line of every font is out of sync. This works with UNO, but I need analog input pins in project.

When using UNO, you can use PD port instead of PC port as signal output.
But my code is quite complicated. That's right. :slight_smile:

I'm staying at my home town to take a vacation in this week.
So, next week I will try your code.

Nabe

Hi,
Thanks for your answer!! I can upload code also next week because of vacation.
My part of code is very very simple. Only read one analog input value and make few if comparsions and depend of those display some Finnish text.

I have tested also your examples only changing (found in Youtube) :

defTimer.h ->
"
#define CRT_OCR1A_HS 61 /* (1/16MHz)×61 = 3.8125us /
#define CRT_OCR1A_VS (615- 61)
#define CRT_ICR1 615 /
(1/16MHz) × (1017+1) = 31.75us */
"
Monitor is out of sync with default settings.

Hmmm

I have tested also your examples only changing (found in Youtube) :

defTimer.h ->
"
#define CRT_OCR1A_HS 61 /* (1/16MHz)×61 = 3.8125us /
#define CRT_OCR1A_VS (615- 61)
#define CRT_ICR1 615 /
(1/16MHz) × (1017+1) = 31.75us */
"
Monitor is out of sync with default settings.

Deafault settings are for @85Hz timing.
http://tinyvga.com/vga-timing/640x400@85Hz

How is the timing of your monitor ?
http://tinyvga.com/vga-timing

Please tell me the timing or your monitor name.
Then I can tell you optimal settings.

Hi zugia

Here you can see what is the issue https://www.youtube.com/watch?v=EpNBO-afJ84

I checked the video.
I think the delay of processing has occurred.
Please check this.
https://dl.dropboxusercontent.com/u/85872655/ProcessDelay.pdf

Please tell me the version of the Arduino IDE which you use and the code.

Nabe

Hi,
Thanks for your solution! The changes that you made for Mega board works great!