Author Topic: NHD-C0220BiZ-FSW-FBW-3V3M no display  (Read 870 times)

kbless7

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
NHD-C0220BiZ-FSW-FBW-3V3M no display
« on: October 11, 2016, 09:39:28 AM »
Hi,

I'm trying to communicate to the C0220BiZ with a PicAxe 20M2 microcontroller over I2C. I issue the setup and write commands in the PicAxe program with the built-in functions http://www.picaxe.com/BASIC-Commands/Advanced-IO-Interfacing/hi2csetup/ http://www.picaxe.com/BASIC-Commands/Advanced-IO-Interfacing/hi2cout/.

Code: [Select]
init:
  pause 1000

  hi2csetup i2cmaster, $78, i2cslow, i2cbyte
  hi2cout 0, ($00)
  hi2cout 0, ($38)
  pause 10
  hi2cout 0, ($39)
  pause 10
  hi2cout 0, ($14)
  hi2cout 0, ($78)
  hi2cout 0, ($5E)
  hi2cout 0, ($6D)
  hi2cout 0, ($0C)
  hi2cout 0, ($01)
  hi2cout 0, ($06)
  pause 10

main:
  pause 500
  hi2cout 0, ($40, %01110011)
  goto main

I have scoped the SCL and SDA lines and attached images of the result. I have tested a slave address of 0x78 and 0x3C per the other threads I have read. The first image shows the i2cout command in the main function where the first burst is the slave address, the second is the comsend, and the last is the data send. It appears that the address of 0x78 works because the ack is low, or low enough, since data transmission continues. If I use 0x3C, the ack is high and nothing else follows.

I have tested the setup with pullup resistors of 1K, 4.7K and 10K. The data bits are sharper with a lower resistance but then the ack bit starts gets higher. The attached images are using a 10K pullup.

I have checked my wiring multiple times. Here are the voltages I'm getting.

1:RST- 3.28V with 4.7K pullup
2:SCL- 3.24V with 10K pullup
3:SDA- 3.24V with 10K pullup
4:VSS- 0V
5:VDD- 3.28V
6:VOUT- 2.93V with 1uF electrolytic cap (I don't have ceramic caps)
7:C1+ 3.28V with 1uF electrolytic cap to C1-
8:C1- 0.02V with 1uF electrolytic cap to C1+

It looks like it isn't initializing since VOUT and C1+ are still near the supply voltage. Does anything look wrong in my code or the images? I followed the startup code in the datasheet for the screen.

Thanks for any help!


EDIT:

If I change the hi2csetup command to be i2cword, VOUT becomes 6.44V, C1+ is 4.85V and C1- is 1.65V. With this nothing is still shown on the display, but do the voltages look correct? I can see all of the dots get dark and then go back to normal upon startup. It doesn't do that when the hi2csetup is set to i2cbyte.
« Last Edit: October 11, 2016, 11:15:08 AM by kbless7 »

kbless7

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: NHD-C0220BiZ-FSW-FBW-3V3M no display
« Reply #1 on: October 11, 2016, 11:14:26 AM »
For those wondering, I was able to get it working. I had to change the code to the following. The lines with the strike through in the init function change the contrast. The write command in the main loop was what made it not function before. Credit to http://shawnreeves.net/wiki/index.php?title=Photo-gate_timer_with_a_PICAXE_20M2 for having the proper data send command.

Code: [Select]
init:
  pause 1000

  hi2csetup i2cmaster, $78, i2cslow, i2cbyte
  hi2cout 0, ($00)
  hi2cout 0, ($38)
  pause 10
  hi2cout 0, ($39)
  pause 10
  hi2cout 0, ($14)

  [s]hi2cout 0, ($78)[/s]
  hi2cout 0, ($7F)

  [s]hi2cout ($5E)[/s]
  hi2cout 0, ($5D)

  hi2cout 0, ($6D)
  hi2cout 0, ($0C)
  hi2cout 0, ($01)
  hi2cout 0, ($06)
  pause 10

main:
  pause 500
  hi2cout 0, ($80) ; clears display
  [s]hi2cout ($40, %01110011)[/s]
  hi2cout $40, (%01110011)
  goto main
« Last Edit: October 11, 2016, 11:21:08 AM by kbless7 »

Paul_B

  • Administrator
  • Sr. Member
  • *****
  • Posts: 248
  • Karma: 16
    • View Profile
Re: NHD-C0220BiZ-FSW-FBW-3V3M no display
« Reply #2 on: October 11, 2016, 12:28:18 PM »
Glad to hear you got your display up and running!

Thanks for sharing your solution, it will definitely help others  :D

 

NHD‐C12864A1Z‐FSW‐FBW‐HTT display clears after draw

Started by EdAverillBoard Graphic LCDs

Replies: 6
Views: 5675
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: 3383
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: 8775
Last post July 10, 2014, 08:46:06 AM
by Michael_L
NHD-0420DZW-AG5 - Display "sometimes" shows only 2 lines

Started by stylonurusBoard OLEDs

Replies: 5
Views: 5561
Last post June 18, 2014, 10:09:49 AM
by Michael_L
Optical bonding Display to cover glass (dry film bonding)

Started by fourtraxBoard TFTs

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