Author Topic: EVE2 Startup for 7" Display  (Read 1023 times)

warriorofwire

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
EVE2 Startup for 7" Display
« on: May 13, 2018, 02:30:14 AM »
Hi Newhaven folks,

I'm following the FT81x Series Programmer Guide and the DS_FT81x datasheet to set my Newhaven display up and running.  I've been stuck for several days trying to get a hello world working.

My first test is to make a red circle on the screen.  It works very rarely and sometimes makes the circle the wrong size or at the bottom of the screen, sometimes it's only 1/2 or 1/4 circle.  Re-running startup randomly makes the screen kind of work, but the red dot location, size and presence is completely random.

  • 10mhz single SPI.
  • FTDI internal 12mhz crystal, not using external crystal.  (should I?)
  • Particle Photon microcontroller.

Here's what I'm writing to the display, with comments.  I write to the display, then read back what I wrote in a follow-up transaction to see if it "took" properly.  First column is "milliseconds since bootup."

Code: [Select]
0000004092 [app.ft81x.display] INFO: wrote to register: 0x34, wrote: 0x00000320, read: 0x00000320.  good // Sets HSIZE=800
0000004092 [app.ft81x.display] INFO: wrote to register: 0x2c, wrote: 0x000003a0, read: 0x000003a0.  good // Sets HCYCLE=928
0000004093 [app.ft81x.display] INFO: wrote to register: 0x30, wrote: 0x00000058, read: 0x00000058.  good // Sets HOFFSET=88
0000004093 [app.ft81x.display] INFO: wrote to register: 0x38, wrote: 0x00000000, read: 0x00000000.  good // Sets HSYNC0=0
0000004094 [app.ft81x.display] INFO: wrote to register: 0x3c, wrote: 0x00000030, read: 0x00000030.  good // Sets HSYNC1=48
0000004095 [app.ft81x.display] INFO: wrote to register: 0x48, wrote: 0x000001e0, read: 0x000001e0.  good // Sets VSIZE=480
0000004095 [app.ft81x.display] INFO: wrote to register: 0x40, wrote: 0x0000020d, read: 0x0000020d.  good // Sets VCYCLE=525
0000004096 [app.ft81x.display] INFO: wrote to register: 0x44, wrote: 0x00000020, read: 0x00000020.  good // Sets VOFFSET=32
0000004096 [app.ft81x.display] INFO: wrote to register: 0x4c, wrote: 0x00000000, read: 0x00000000.  good // Sets VSYNC0=0
0000004097 [app.ft81x.display] INFO: wrote to register: 0x50, wrote: 0x00000003, read: 0x00000003.  good // Sets VSYNC1=3
0000004097 [app.ft81x.display] INFO: wrote to register: 0x6c, wrote: 0x00000001, read: 0x00000001.  good // Sets PCLK_POL=1 (falling edge, this is a curious setting in Newhaven's documentation)
0000004098 [app.ft81x.display] INFO: wrote to register: 0x68, wrote: 0x00000001, read: 0x00000001.  good // Sets CSPREAD=1
0000004098 [app.ft81x.display] INFO: wrote to register: 0x60, wrote: 0x00000001, read: 0x00000001.  good // Sets DITHER=1
0000004099 [app.ft81x.display] INFO: wrote to register: 0x64, wrote: 0x00000000, read: 0x00000000.  good // Sets SWIZZLE=0
0000004099 [app.ft81x.display] INFO: wrote to register: 0xd4, wrote: 0x00000080, read: 0x00000080.  good // Sets backlight PWM=128 (fully on)
0000004100 [app.ft81x.display] INFO: Settings are set.
0000004100 [app.ft81x.display] INFO: Waited 0ms for display list after register init.                           // This loops to wait for REG_DLSWAP's value to be 0
0000004101 [app.ft81x.display] INFO: Wrote display list: 0, command: 0x04000000, written: 0x04000000.  good // color_rgb(0,0,0) (display list number is (dl_offset)/4 for more convenient log reading)
0000004101 [app.ft81x.display] INFO: Wrote display list: 1, command: 0x26000007, written: 0x26000007.  good // clear(all)
0000004101 [app.ft81x.display] INFO: wrote to register: 0x54, wrote: 0x00000002, read: 0x00000002.  good // Writes 2 to REG_DLSWAP
0000004102 [app.ft81x.display] INFO: wrote to register: 0x70, wrote: 0x00000002, read: 0x00000002.  good // Sets PCLK=2 (Also a curious setting, FTDI programmer guide says this goes after the first display list)
0000004103 [app.ft81x.display] INFO: Waited 0ms for display list ready after initial clear display list. // This loops to wait for REG_DLSWAP's value to be 0
0000004103 [app.ft81x.display] INFO: Wrote display list: 0, command: 0x02000000, written: 0x02000000.  good // dl_ram+00 = color_rgb(0,0,0)
0000004104 [app.ft81x.display] INFO: Wrote display list: 1, command: 0x26000007, written: 0x26000007.  good // dl_ram+04 = clear(all)
0000004104 [app.ft81x.display] INFO: Wrote display list: 2, command: 0x04a01616, written: 0x04a01616.  good // dl_ram+08 = color_rgb(160,22,22)
0000004105 [app.ft81x.display] INFO: Wrote display list: 3, command: 0x0d000140, written: 0x0d000140.  good // dl_ram+12 = point_size(20+16)  (for a 40 pixel diameter circle)
0000004105 [app.ft81x.display] INFO: Wrote display list: 4, command: 0x1f000002, written: 0x1f000002.  good // dl_ram+16 = begin(point)
0000004106 [app.ft81x.display] INFO: Wrote display list: 5, command: 0x38085001, written: 0x38085001.  good // dl_ram+20 = vertex2ii(192,133,0,0)  (to try to drop the circle somewhere on the screen)
0000004106 [app.ft81x.display] INFO: Wrote display list: 6, command: 0x21000000, written: 0x21000000.  good // dl_ram+24 = end()
0000003908 [app.ft81x.display] INFO: wrote to register: 0x54, wrote: 0x00000002, read: 0x00000002.  good // Writes 2 to REG_DLSWAP

Am I interacting with the screen wrong?  Setting wrong settings?

Ted_M

  • Administrator
  • Jr. Member
  • *****
  • Posts: 59
  • Karma: 3
    • View Profile
Re: EVE2 Startup for 7" Display
« Reply #1 on: May 21, 2018, 10:08:45 AM »
The resolution init settings look to be correct for the 7" display.  Please review the example Arduino code that is on our Github page for this 7" display and see if it's possible to convert it to run on the Particle Photon microcontroller.

https://github.com/NewhavenDisplay/EVE2-TFT-Modules/blob/master/7.0in/Capacitive/FT_App_Graph/Project/Arduino/FT_App_Graph/FT_App_Graph.ino

warriorofwire

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: EVE2 Startup for 7" Display
« Reply #2 on: May 22, 2018, 01:18:23 AM »
Thanks for the reply!  I had a bug with my vertex2ii command bits.  I realized this when I was able to tweak the background color.  It's now working as expected.

I'm building a more trimmed, straightforward library for my simple consumption (no ifdefs).  The next hurdle is bitmap display!

 

Blank Display on NHD‐C0220BiZ‐FS(RGB)‐FBW‐3VM

Started by SteveCBoard Character LCDs

Replies: 3
Views: 8647
Last post May 13, 2014, 12:04:36 AM
by SteveC
NHD‐C12864A1Z‐FSW‐FBW‐HTT display clears after draw

Started by EdAverillBoard Graphic LCDs

Replies: 6
Views: 10435
Last post November 07, 2014, 08:25:20 AM
by Michael_L
NHD‐4.3‐480272EF‐ATXL#‐CTP | FAN5333 | BBB | Nothing on the Display

Started by Alias_AliasBoard TFTs

Replies: 1
Views: 7363
Last post September 25, 2015, 03:09:24 PM
by Paul_B
Arduino LCD library not working with newhaven display NHD‐0420H1Z‐FL‐GWB-3V3

Started by c2hollowBoard Character LCDs

Replies: 9
Views: 16420
Last post July 10, 2014, 08:46:06 AM
by Michael_L
Optical bonding Display to cover glass (dry film bonding)

Started by fourtraxBoard TFTs

Replies: 1
Views: 3527
Last post September 29, 2016, 08:35:00 AM
by Saurabh_B