stimmer / DueVGA

Arduino Due VGA library
92 stars 30 forks source link

320x240 color mode: several instances of a pixel shift on several lines #10

Open Ragooman opened 9 years ago

Ragooman commented 9 years ago

I'm using your VGA library with the Arduino Due and I find it very useful. I'm working on a little homebrew project with this. Basically, a little instrument where I can take snapshots of data, via a FPGA data logger for several channels, and use the Due to process everything and display on the screen.

There was one thing I noticed on the screen. I attached a screenshot with arrows pointing out the aberrations. I'm not sure if this subject has been brought up yet. The pic is not that sharp - difficult to hold my hand still :) But there are several instances where the pixels are shifted right by one pixel. This is a hi-res pic, so if you download this you can zoom into the area of the problem.

The majority of the display is good, just those areas have the shifted pixels. And from looking at the whole screen, you can see a pattern in the repetition. You can see it happen within the text or the line drawings or the left edge of the screen border. BTW, the test is just a extra Font library I made to use a smaller 4x5 pixel matrix for the display. demo1

stimmer commented 9 years ago

I've seen that problem before - I don't know if it's possible to fix it. The Due is not deterministic (no ARM processors are), they are not cycle-accurate like AVRs, so it's near impossible to get every line precise. It's very sensitive to changes elsewhere in the code - you may find that adding a line of code to your sketch makes it mysteriously go away.

Changing VGA.xstart might do something. In setup() after VGA.begin(...), VGA.xstart-=2;VGA.synced=0; (2 is just an example, try anything, and try increasing it) It might change things, or might not, or might make things worse.

Ragooman commented 9 years ago

oh ok, no prob. Thanks for explaining the problem. I'll give that suggestion a try and report back.

guevarar commented 9 years ago

Hi I am trying to use the libraries but can not. When I use hello world example make mistake Thees : what do i have to do? And if I have to draw son And if I have to draw something where I can do? I have too much expirence with arduino and i am using Arduino Mega 2560

I need helppppp

In file included from HelloWorld.ino:4: C:\Users\Rosalba\Desktop\arduino-1.0.6\libraries\VGA/VGA.h: In function 'void _v_digitalWriteDirect(int, boolean)': C:\Users\Rosalba\Desktop\arduino-1.0.6\libraries\VGA/VGA.h:49: error: 'g_APinDescription' was not declared in this scope C:\Users\Rosalba\Desktop\arduino-1.0.6\libraries\VGA/VGA.h:50: error: 'g_APinDescription' was not declared in this scope