uLisp-esp32 VGA Mini Computer


#21

Hi Ronny,

GIPO pins 16 and 17 are used for PSRAM on ESP32 Wrover modules (16-CE, 17-CLK, see https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/external-ram.html).

I can think of that FabGL occupies his standard GPIOs even if it’s configured otherwise. To proove this we should connect a sdcard to a wroom board (i.e. a board without psram) connected to pins not normally used by FabGL) and proove, that the card is working when activating FabGL. If this is successful, we (maybe with help from fdivitto) should find the cause of the problem. If not successful, the problem seems to be in my uLisp code.
This is just a guess, but I think it may be the best way to go forward. With a wroom based module we can use the pins fdvitto suggested.

What do you think?

Best regards,
Kaef


#22

Hi Kaef,
Yes you’re right about io17 & io16, same for the ttgo board. I think your idea of going on is fine , yes.
But unfortunately I don’t have a wroom board. Hope you have one.
Please let me know how you will go on.
It would be very nice to have this working !

Kind regards,
Ronny


#23

Hi Kaef ,

Any updates concerning the sd card issue ??

Kind regards,
Ronny


#24

Hi Ronny,

sorry, I did not find free time during the last days.
I’ll test a sdcard connected to pins not used by FabGl defaults and if it is working I’ll test with pins default (but not used) FabGl pins…

I hope to do these test during this week…

Best regards,
Kaef


#25

Hi Kaef ,

No problem. Please let me know how you get on.

Regards,
Ronny


#26

Hi Ronny,

I made some test with a wroom module (without PSRAM) and the sdcard is working using FabGl and the TTGO-T8 settings.
Next I’ll try using a wrover module (with PSRAM)…
So either the error depends on the wrover module or the T8 causes the error.

Best regards,
Kaef


#27

Hi Kaef ,

Thanks. ! That seems like good news , only a lot of memory is lost …
What exactly do you mean with TTGO-T8 settings ? The one in arduino IDE or the ones in your .ino file.
What pinout did you use for the sdcard ? Which wroom module did you use…
Just curious :-)

Kind regards,
Ronny


#28

In my version of uLisp-3.0a is a constant named “TTGO_T8”. If set it defines GPIOs for the sdcard and the gpio used by FabGl. This is the constant I mentioned.


#29

Hi Kaef ,

I have your version 3.0a , but I can not find this variable.
Where is it ?

Regards,
Ronny


#30

Ah I see , you’ve updated 3.0a , didn’t know this.

regards,
Ronny


#31

Hi Ronny,
I ran my test program on the TTGO-T8 and it is working!
Then I reflashed ulisp-3.0a and the sdcard is not working!
Best regards,
Kaef


#32

Hi Ronny,

good news, I was able to fix the sdcard problem!
It seems to be a memory problem with the SD library (or SPI?); reducing the FabGl VGA resolution leads to a working sdcard!
I updated my uLisp-3.0a repository, but it is a untested resolution setting (I don’t have a VGA screen here,). Adjustment may be wrong, please have a look at the function setupFabGl () around line 5200ff. I’ll have a look at the SD library, maybe the problem can be solved here. Another solution may be moving the Symboltable to PSRAM, or reducing its size could also help. So higher resolutions may be possible in future…

Best regards,
Kaef


#33

Hi Kaef ,

Thanks. ! , and sorry for the late reply (had a busy morning).
Screen resolution works , but its better to change shrinkscreen to (8,8) otherwise the image height is too big.
My sd card is indeed recognized as a 7450Mb (it’s an 8GB sdcard).
I didn’t write or read from it , but I assume you did this already (?)
I will try now to use the 64 bit colors.
I’ll keep you posted !

Kind regards,
Ronny


#34

Hi Kaef ,

I’m sorry to inform you that the 64 bit color mode doesn’t work.
All signals look ok exept Vsync on pin15 just isn’t there (constant low)
There is no other signal that generates vsync (checked with a scoop)
Sdcard is however still recognized (in the serial monitor)

Hope this helps you finding the problem .

Kind regards,
Ronny


#35

Hi Kaef,

Good news ,

64 color mode works , but you have to change the vsync to another pin (I used p25)
pin15 is used for the sdcard MOSI signal

VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_25);

Kind regards,
Ronny


#36

Hi Ronny,

great that it works for you. You may have a look at the pin definitions for the TTGO-T8, I think one of your vga pins conflicts with the i2c pin definitions. Sorry, I don’t have the code here so I can’t look for it now.

Have fun,
best regards,
Kaef

PS: I’ll try to free up more RAM next week, so higher resolutions should be possible. You may reduce the symboltablesize definition (which I set to 32k) to free some memory (try 8k or less) and use a higher vga resolution.


#37

Ok , thanks !
I used pin25 just to test , I will see which pins doesn’ tmake conflicts
I will try to play with the symboltablesize as you suggest and see what’s possible.

Thanks already for your effort.
Hope to hear from you next week , you will hear from me !

Enjoy and stay healthy.
Ronny


#38

Hi Kaef ,

Hope you’re doing well.
I played a bit with the symboltablesize , and it looks like 16K is a working choice. 32K is to much.
Here’s a piece of your code I changed around lines 5200 :

#ifndef TTGO_T8
// use 8 colors
Serial.println(PSTR(“8 color mode setup: R:25, G:26, B:27, H:5, V:23”));
VGAController.begin(GPIO_NUM_25, GPIO_NUM_26, GPIO_NUM_27, GPIO_NUM_5, GPIO_NUM_23);
#else
Serial.println(PSTR(“64 color mode setup: standard VGA32 pins used”));
VGAController.begin(GPIO_NUM_27, GPIO_NUM_12, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_25);
#endif
if (psramFound()) {
Serial.println(PSTR(“psramFound!”));
//VGAController.setResolution(VGA_640x350_70HzAlt1); // Kaef: UNTESTED!!
// Kaef, 2020-03-12: if too much memory is used here the sdcard mounting will fail…
//VGAController.setResolution(VGA_640x240_60Hz);
VGAController.setResolution(VGA_640x240_60Hz); // this saves a lot of memory (+3k cells vs 640x240)
// adjust screen position and size
VGAController.shrinkScreen(0, 0);
VGAController.moveScreen(0, 0);

I used 64 colors , 640*240 and used pins not dedicated to i2c or spi

Kind regards,
Ronny


#39

Is this the board you’ve used as the basis for your uLisp VGA Mini Computer?

TTGO VGA32 V1.1 ESP32 Controller PS/2 Mouse And Keyboard Controller

Now I just need to find a nice small VGA monitor, preferably iPad-sized.


#40

Hi @johnsondavies,

yes, this is the board I used first and uLisp with VGA support is working on it.

Because it has no PSRAM, I used the TTGO-T8 later, but VGA and PS/2 connectors need to be soldered with resistors.

Best regards,
Kaef