hchunhui / esp-vga

Using esp8266 to generate VGA signals
16 stars 6 forks source link

More informations #1

Open smaffer opened 6 years ago

smaffer commented 6 years ago

Hello, i am interested in your project. I am trying to write a similar project for ESP8266. Is this project working? Can you share more informations about pin wiring? Which resistor need to be used?

Thank you, Sandro

hchunhui commented 6 years ago

Hi,

The project is working. It can output ascii and chinese charcters recieved over wifi. The VGA driver provides a 512x480 framebuffer, so it is possible to output monochrome images too.

Build: Put the project in the esp sdk directory, and type "./gen_misc.sh".

Wiring: GPIO13 <--(330ohm)--> R, G, B GPIO4 <------------> HSYNC GPIO5 <------------> VSYNC

Usage: The esp8266 sets up a wifi network called "esp". Connect to the network and redirect text to 192.168.4.1:88.

Chunhui

smaffer commented 6 years ago

Hello! i have build a library for Arduino reusing your awesome work! https://github.com/smaffer/espvgax

Using Arduino ESP8266 i have found some problems when Wifi is turned ON.. Many screen flickering and the Wifi signal sometimes can't work properly. Your VGA signal is always stable? Thank you!

hchunhui commented 6 years ago

espvgax is awesome!

I have the same problem when using Wifi (the screen flickers). I think it is because the interval of the VGA timer (32us) is smaller than the minimal interval of the esp sdk guide (50us).

I found the problem is mitigated when using 160Mhz running speed.

gwstaten commented 4 years ago

I have been trying to use a nodemcu to make a vga signal, I am using espvgax2 right now, and I am taking input through serial from another device, but that causes a lot of flickering, any ideas?

hchunhui commented 4 years ago

@grantwstaten Hi, I am not familiar with espvgax2. It looks like that espvgax2 uses a different approach to generate VGA signals, so the following may not be suitable for your situation.

I think the key to avoid flickering is to generate stable sync signals. For my project, I use a timer interrupt to generate HSYNC and VSYNC. The interrupt should be triggered every 32us. If the interrupt is delayed (for example Wifi interrupt has higher priority), the screen will flicker.

gwstaten commented 4 years ago

@hchunhui maybe I'll have more luck using your library, do you have any example code for using the library?

hchunhui commented 4 years ago

@grantwstaten Thank you! Currently there is no simpler example code. I think you can try espvgax. The library uses the same approach, has good documentation, and should be easier to use. If the screen still flickers, I have no better idea.

gwstaten commented 4 years ago

I tried espvgax at first and when I connected a serial port it was outputting bunches and bunches of stuff to it and wouldn't pick up on things that were being sent

On Fri, May 22, 2020, 10:18 AM hchunhui notifications@github.com wrote:

@grantwstaten https://github.com/grantwstaten Thank you! Currently there is no simpler example code. I think you can try espvgax. The library uses the same approach, has good documentation, and should be easier to use. If the screen still flickers, I have no better idea.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hchunhui/esp-vga/issues/1#issuecomment-632776994, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGZQBADKY7L2OPZDLDJSYDRS2QURANCNFSM4E7W55VA .

hchunhui commented 4 years ago

I remember esp8266 has two serial ports: GPIO1/3 and GPIO13/15, maybe you use the latter. The project use SPI port (GPIO13) to send VGA data, so the there is a conflict.

gwstaten commented 4 years ago

I'm not sure which one is used when you use a USB, I have been testing using that before I use it in the project it

On Fri, May 22, 2020, 11:09 AM hchunhui notifications@github.com wrote:

I remember esp8266 has two serial ports: GPIO1/3 and GPIO13/15, maybe you use the latter. The project use SPI port (GPIO13) to send VGA data, so the there is a conflict.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hchunhui/esp-vga/issues/1#issuecomment-632810926, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGZQBHERJKMJ62AXWWSWFDRS2WUJANCNFSM4E7W55VA .

gwstaten commented 4 years ago

Can I use both espvgax and serial on pins 1 and 3?

On Fri, May 22, 2020, 11:16 AM Grant Staten grantwstaten@gmail.com wrote:

I'm not sure which one is used when you use a USB, I have been testing using that before I use it in the project it

On Fri, May 22, 2020, 11:09 AM hchunhui notifications@github.com wrote:

I remember esp8266 has two serial ports: GPIO1/3 and GPIO13/15, maybe you use the latter. The project use SPI port (GPIO13) to send VGA data, so the there is a conflict.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hchunhui/esp-vga/issues/1#issuecomment-632810926, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGZQBHERJKMJ62AXWWSWFDRS2WUJANCNFSM4E7W55VA .

gwstaten commented 4 years ago

Apparently I can, but the flicker is there... How can I prioritize the library code over the serial code?

On Fri, May 22, 2020, 11:31 AM Grant Staten grantwstaten@gmail.com wrote:

Can I use both espvgax and serial on pins 1 and 3?

On Fri, May 22, 2020, 11:16 AM Grant Staten grantwstaten@gmail.com wrote:

I'm not sure which one is used when you use a USB, I have been testing using that before I use it in the project it

On Fri, May 22, 2020, 11:09 AM hchunhui notifications@github.com wrote:

I remember esp8266 has two serial ports: GPIO1/3 and GPIO13/15, maybe you use the latter. The project use SPI port (GPIO13) to send VGA data, so the there is a conflict.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hchunhui/esp-vga/issues/1#issuecomment-632810926, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGZQBHERJKMJ62AXWWSWFDRS2WUJANCNFSM4E7W55VA .