640x480 resolution

Designing hardware and software that uses the VS23S0X0 family of ICs as a 8-bit or SPI SRAM memory or as a Video Controller for generating Composite Video (TV-Out) or driving other kinds of displays.
Post Reply
wfriedrich
Senior User
Posts: 22
Joined: Tue 2017-08-08 13:46

640x480 resolution

Post by wfriedrich » Mon 2018-12-17 5:10

Hello Panu and Kalle,
I am working again on my Arduino shield with the VS23S010 and I am trying to set up a 640x480 pixel resolution with a PAL crystal (4.434MHz).
Initialization seems to be somewhat OK as my display is syncing and showing a black image after config.
Drawing any pixel into the image memory does not show anything changing on the display.

Would you guys be willing to have a look at my code to see if anything is totally messed up?
I tried to use the structure of your Arduino demo code for configuration. Is it OK to post the code here?

Thanks,
- Wolfgang.

wfriedrich
Senior User
Posts: 22
Joined: Tue 2017-08-08 13:46

Re: 640x480 resolution

Post by wfriedrich » Sun 2019-01-06 22:42

And I probably should have added my code for anybody who is interested. If you use a different setup the SPI slave select, WP and hold pin need to be remapped eventually.
Here we go...

- Wolfgang.

PS:
If anybody is interested in my setup, here is more information about the board:
https://hackaday.io/project/21097-ntscp ... lay-shield

The board I have build is available here:
https://www.tindie.com/stores/Wolfi/
Attachments
P42Display_vga_pal.zip
(18.84 KiB) Downloaded 16 times

User avatar
Panu
VLSI Staff
Posts: 2622
Joined: Tue 2010-06-22 13:43

Re: 640x480 resolution

Post by Panu » Wed 2019-01-09 21:41

Hi! Just noticed this one... I can't understand how I failed to notice your post...

Anyway, what's the status now, is it still unchanged? Are you still trying to make 640*480? With the PAL crystal, there's about 56 microseconds per line times 4.43 MHz times 8 PLLclock per colorclock, e.g. 56 * 8* 4.43 = 1984 clock ticks per line visible area. Divide that by 640, you get 3.1 clock ticks per pixel -> should be just about perfect to use 3 clocks per pixel, e g. microcode size 3... quite a lot is possible...

I have not taken a look at your code, can you tell me just your quick basic idea how are you trying to set it up?

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

wfriedrich
Senior User
Posts: 22
Joined: Tue 2017-08-08 13:46

Re: 640x480 resolution

Post by wfriedrich » Fri 2019-01-11 5:25

Thanks, Panu.

I have not worked on the code since my initial post, but will continue over the weekend and send a summary of what I have initialized. I used your demo code with the macros to generate the protolines and modified the numbers to my best understanding, so it should be very easy to understand. Only the SPI commands are self written.

I was planning to use only 2 bits for colour for easier bit operations to set the pixels and have some of the frame buffer memory left over for my awesome bouncing ball demo to be able to use the block move command.
Thanks,
- Wolfgang.

User avatar
Panu
VLSI Staff
Posts: 2622
Joined: Tue 2010-06-22 13:43

Re: 640x480 resolution

Post by Panu » Fri 2019-01-11 19:48

Ok, sounds good. Hmm, 2 bits per pixel gives you a bitter sweet degree of awesomeness; we actually designed the IC to have a 4 color mode where the hues are freely selectable, but due to an unfortunate mix-up, the signs of both U and V are fixed; only a few hues are possible. But it's one more degree of freedom. I don't remember if it was PAL or NTSC, but I managed to make a really nice 4 color mode, where the colors were black, dark blue, bright emerald and white. I was planning to use that as a high resolution TV console for the VSOS :)

I'll take a look at the code, you said there's nothing on the screen?

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

wfriedrich
Senior User
Posts: 22
Joined: Tue 2017-08-08 13:46

Re: 640x480 resolution

Post by wfriedrich » Sun 2019-01-13 23:04

Here is my startup debug printout:
P42 Display Shield Test
Write SPI address: 0xB8 : 0xE
Read SPI address: 0xB7 : 0xE
Write SPI address: 0x1 : 0x40
Write SPI address: 0x28 : 0x39
Write SPI address: 0x29 : 0x129
Write SPI address: 0x2B : 0x3000
Write SPI address: 0x2A : 0x8D4
Write SPI address: 0x30 : 0x141
Write SPI address: 0x2C : 0x238
Write SPI address: 0x34 : 0x10
SPI opcode: 0x2 adress: 0x38 : 0xC
Write SPI address: 0x2D : 0xCA0C
Image address map
Address pixel (0,0): 0xF08
Address pixel (1,0): 0xF09
Address pixel (2,0): 0xF0A
Address pixel (0,1): 0x1000
Address pixel (640,480): 0x1E18F

After initialization before I do I 'clear screen' the display is stable but not centered on my screen and some pixels are already set (see attache image, ignore the phone :roll: ). That tells me that my memory init and protoline generation is not correct yet. After running a clear screen routine the display goes out of sync sometimes. Also I seem to be able to write into video picture line 0 only; all pixels below are always black.

Also attached my code again, with some debug options enabled.
The pixel draw routines are not working with modes other than 8bit per pixel yet, so I am just writing full bytes into the frame buffer memory.

Thanks,
- Wolfgang.
Attachments
Dsiplay640x480.jpg
Dsiplay640x480.jpg (425.12 KiB) Viewed 258 times
P42Display_vga_pal.zip
(12.24 KiB) Downloaded 16 times

Post Reply