Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Arduino Mega + 5 inch SSD1963 16 bit display

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Wed Apr 10, 2013 8:28 pm    Post subject: Arduino Mega + 5 inch SSD1963 16 bit display Reply with quote

Here the code and some pictures for the Arduino Mega, TFT shield, SSD1963 display 16 bit.

With thanks to HKipnik and SIX1.

These are the base routines, all functions can be catched from other published display code like ILI9320, ILI9325 etc.

This is the display



The back with the 40 pin connector



40 pins to fit the shield



The back of the display



This is the shield for the Arduino Mega



This is when you run the Bascom-AVR code in the attachment
You should see a small box on the left go up, reverse the screen and after that showing the text.



Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Wed Apr 10, 2013 8:53 pm    Post subject: Reply with quote

thanks to you all for your great display work. Very Happy
_________________
Mark
Back to top
View user's profile Visit poster's website
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Sun Jun 01, 2014 7:21 pm    Post subject: Reply with quote

Hello Ben
I just bought a 5.00 inches display, a itb2 arduino mega shield V2.1 from IDHead Studio and a Arduino 2560
your program is working fine ! Applause now i must try touch screen, and sd card
many thanks

just one think to say the 3.3 switch must be to 3.3V and you must use a extra alim because the all cards need more than 500Ma (usb maxi current)

JP Wink
Back to top
View user's profile Visit poster's website
gurpreet

Bascom Member



Joined: 01 Mar 2010
Posts: 9

india.gif
PostPosted: Sun Jul 13, 2014 6:50 pm    Post subject: ssd 1963 Reply with quote

hello ben
Can i use this tft (WF70HTIFGDBN0#) with ur same code. I have uploded a datasheet for the same
It is from winstar pls let me know can i use for the same as i am very new with tft
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Thu Jul 24, 2014 11:17 am    Post subject: Reply with quote

Hello Gurpreet,
I look at the datasheet and I did'nt found any reference about he controller IC. Are you sure it is a SSD1963 ?
I did a Excel Worksheet on the corresponding pins for the 5'' Display and the mega2560 with the adaptor from Itheadstudio
I add it with she schematic of my display

Bn courage
JP Wink
Back to top
View user's profile Visit poster's website
gurpreet

Bascom Member



Joined: 01 Mar 2010
Posts: 9

india.gif
PostPosted: Fri Jul 25, 2014 4:38 pm    Post subject: Reply with quote

hello Duval JP
yes I am dam sure about the controller Its ssd 1963. I have another tft 3.5" but the data interface is 8 bit & it is also ssd1963 (winstar) I have attached the display Datasheet
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Fri Jul 25, 2014 5:54 pm    Post subject: compare code in Basacom-AVR and in C Reply with quote

Here the init code for the SSD1963 in Bascom-AVR

Code:
Sub Ssd1963_init(byval Modus As Byte)

   X_pixel = 800
   Y_pixel = 480

   Display_modus = Modus
   ' First, Reset the Display
   Res_disp = 0
   Waitms 10
   Res_disp = 1
   Waitms 10

   Call Ssd1963_select_reg(soft_reset)                      'Software reset
   Call Ssd1963_select_reg(soft_reset)
   Call Ssd1963_select_reg(soft_reset)
   Waitms 100
   Call Ssd1963_select_reg(&He2)                            'PLL multiplier
   Call Ssd1963_write_data(&H23)
   Call Ssd1963_write_data(&H02)
   Call Ssd1963_write_data(&H04)

   Call Ssd1963_select_reg(set_pll)                         'E0
   Call Ssd1963_write_data(&H01)                            'start PLL

   Call Ssd1963_select_reg(set_pll)
   Call Ssd1963_write_data(&H03)                            'LOCK PLL
   Waitms 200

  ' Call Ssd1963_select_reg(soft_reset)                      'Software reset
   Call Ssd1963_select_reg(set_lshift_freq)                 'Set PCLK Pixel Clock frequency
   Call Ssd1963_write_data(&H03)
   Call Ssd1963_write_data(&H33)
   Call Ssd1963_write_data(&H33)

   Call Ssd1963_select_reg(set_lcd_mode)                    'Set LCD Mode  B0
   Call Ssd1963_write_data(&H0c)
   Call Ssd1963_write_data(&H80)
   Call Ssd1963_write_data(&H03)
   Call Ssd1963_write_data(&H1f)
   Call Ssd1963_write_data(&H01)
   Call Ssd1963_write_data(&Hdf)
   Call Ssd1963_write_data(&H00)

   Call Ssd1963_select_reg(&H36)                            'Rotation
   Call Ssd1963_write_data(&B00000000)

   Call Ssd1963_select_reg(set_pixel_data_interface)        'F0
   Call Ssd1963_write_data(&H03)                            'Set Pixel data format 8Bit

   Call Ssd1963_select_reg(set_pixel_format)                'RGB Format 666
   Call Ssd1963_write_data(&H50)                            '60 50

'   changes Ben
   Call Ssd1963_select_reg(set_hori_period)                 'Set HBP  B4
   Call Ssd1963_write_data(&H02)
   Call Ssd1963_write_data(&Hf8)
   Call Ssd1963_write_data(&H00)
   Call Ssd1963_write_data(&H44)
   Call Ssd1963_write_data(&H0f)
   Call Ssd1963_write_data(&H00)
   Call Ssd1963_write_data(&H00)
   Call Ssd1963_write_data(&H00)

'   changes Ben
   Call Ssd1963_select_reg(set_vert_period)                 'SET VBP  B6
   Call Ssd1963_write_data(&H01)
   Call Ssd1963_write_data(&Hf8)
   Call Ssd1963_write_data(&H00)
   Call Ssd1963_write_data(&H13)
   Call Ssd1963_write_data(&H07)
   Call Ssd1963_write_data(&H00)



   Call Ssd1963_select_reg(set_column_address)              'Set Column address
   Call Ssd1963_write_data(&H00)                            'start column adress 0
   Call Ssd1963_write_data(&H00)
   Call Ssd1963_write_data(&H03)                            'end column 799 high byte
   Call Ssd1963_write_data(&H1f)                            'end column 799 low byte

   Call Ssd1963_select_reg(set_page_address)                'Set Page address
   Call Ssd1963_write_data(&H00)                            'Strat page 0
   Call Ssd1963_write_data(&H00)
   Call Ssd1963_write_data(&H01)                            'end Page address 479 high byte
   Call Ssd1963_write_data(&Hdf)                            'low byte

   Call Ssd1963_select_reg(&Hba)                            'Gipo 3:0 out1
   Call Ssd1963_write_data(&H0f)

   Call Ssd1963_select_reg(&Hb8)                            'Gipo3=input Gipo2=output Gipo0=normal
   Call Ssd1963_write_data(&H07)
   Call Ssd1963_write_data(&H01)

   Call Ssd1963_select_reg(set_display_on)

   Call Ssd1963_select_reg(&Hbe)                            'PWM for Backlight
   Call Ssd1963_write_data(&H06)
   Call Ssd1963_write_data(&H80)                            'intensity 00 to FF
   Call Ssd1963_write_data(&H01)
   Call Ssd1963_write_data(&Hf0)
   Call Ssd1963_write_data(&H00)
   Call Ssd1963_write_data(&H00)

   Call Ssd1963_select_reg(&Hd0)                            'Set the dynamic back light configuration
   Call Ssd1963_write_data(&H0d)

'  Call Ssd1963_select_reg(set_post_proc)
'  Call Ssd1963_write_data(30)                               'was 100 Brightness
'  Call Ssd1963_write_data(30)                               'was 120 Contrast
'  Call Ssd1963_write_data(30)                               'was 100 Sätigung
'  Call Ssd1963_write_data(01)

End Sub


And here the init code in C found in the datasheet

Code:
Write_Command(0x01);
Delay_ms(10);
Write_Command(0xe0);
Write_Parameter(0x01);
Delay_ms(5);
Write_Command(0xe0);
Write_Parameter(0x03);
Delay_ms(5);
Write_Command(0xb0);
Write_Parameter(0x08);
Write_Parameter(0x80);
Write_Parameter(0x03);
Write_Parameter(0x1f);
Write_Parameter(0x01);
Write_Parameter(0xdf);
Write_Parameter(0x00);
Write_Command(0xf0);
Write_Parameter(0x03);
Write_Command(0x3a);
Write_Parameter(0x50);
Write_Command(0xe2);
Write_Parameter(0x1d);
Write_Parameter(0x02);
Write_Parameter(0x54);
Write_Command(0xe6);
Write_Parameter(0x04);
Write_Parameter(0x6f);
Write_Parameter(0x47);
Write_Command(0xb4);
Write_Parameter(0x04);
Write_Parameter(0x20);
Write_Parameter(0x01);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Command(0xb6);
Write_Parameter(0x02);
Write_Parameter(0x0d);
Write_Parameter(0x00);
Write_Parameter(0x2d);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Command(0x2a);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Parameter(0x03);
Write_Parameter(0x1f);
Write_Command(0x2b);
Write_Parameter(0x00);
Write_Parameter(0x00);
Write_Parameter(0x01);
Write_Parameter(0xdf);
Write_Command(0x29);
Write_Command(0x2c);
 


You could try to use the code of the datasheet to init your display. I see some parts that are the same, but also some parts that are different.

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
gurpreet

Bascom Member



Joined: 01 Mar 2010
Posts: 9

india.gif
PostPosted: Sun Jul 27, 2014 4:47 pm    Post subject: Reply with quote

Hello ben
I saw the code for initialization but i am confused in pin outs which pin of uc should I connect to which pin of Tft display to get a valid display results

thanks
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 1161
Location: France

france.gif
PostPosted: Sun Jul 27, 2014 5:52 pm    Post subject: Reply with quote

Hello,
Mr Kipnik, Ben and Six1 did a good job,
all informations about connections are in their programs.
You need 2 ports for data (16pins)
and 4 pins for the command. the line RD is pull up to 3.3v
In the Excel sheet you will see how I did.
and see the result :
http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=12414


Unfortunately to your datasheet I did see the main connector. Is it a flat rubbon ?

Bon courage
JP Wink
Back to top
View user's profile Visit poster's website
daro

Bascom Member



Joined: 15 Nov 2010
Posts: 25

blank.gif
PostPosted: Wed Mar 18, 2020 10:13 pm    Post subject: Reply with quote

edit
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum