Pages: [1]   Go Down
Author Topic: Arduino VGAout  (Read 2835 times)
0 Members and 1 Guest are viewing this topic.
Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I watched this video.
http://www.youtube.com/watch?v=_xTTg-i0Ak8&feature=youtu.be

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.


Code:
#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!
Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all!
I programmed some functions.
  put_char(x,y,c)
  set_line_color(line,color)
  delay66(n)

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

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!
Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Freediving, spearfishing, alt energy, motion control, christian
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"
Code:
□検索条件  "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/
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Freediving, spearfishing, alt energy, motion control, christian
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much for your assistance Nabe_RMC.

I have sent the files to you.
Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Quote
/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
http://twitpic.com/df592d
I thought up new way.
It might make more display characters if applied VGA13 this technique.

Best regards,

Nabe

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 https://www.youtube.com/watch?v=EpNBO-afJ84

Your code is quite complicated to me. Is it possible to "blank" the first line? Friend supposed duct tape  smiley-wink
« Last Edit: April 29, 2014, 12:18:05 pm by zuiga » Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm very glad  you have tried that code.

Quote
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.

Quote
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.  smiley

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

Nabe



Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm

Quote
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.


Logged

Japan
Offline Offline
Jr. Member
**
Karma: 16
Posts: 79
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi zugia

Quote
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
« Last Edit: May 04, 2014, 11:11:47 am by Nabe_RMC » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: