0

HT16K33 I2C Address Outputs NACK
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

HT16K33 I2C Address Outputs NACK

by psfetku on Mon Jul 14, 2014 6:28 am

Attention Adafruit

My name is Paul.

Recently, I purchased two LED displays from Adafruit + HT16K33 Backpacks:

1. 4-digit 7-segment
2. Quad Alphanumeric

I have a Mikroelektronika PIC18F-8520 development board - I2C Master.

I'm using MikroC Pro PIC compiler, it contains I2C library functions - C code provided below.

I have the 7-segment display w/Backpack interfaced to the PIC18F development board - I2C bus.

The HT16K33 is indicated to have default I2C address 0x70.

I have not touched address pads A0,A1,A2 - I assume the Backpack it is set for address 0x70.

PROBLEM

It appears I2C address 0x70 is not recognized by the HT16K33.

If the slave (HT16K33 ) accepts the address, it will pull the SDA line low to generate the ACK signal.

If the slave does not pull the SDA line low, this is considered a NACK condition.

When a NACK is received by the master, the address/data transfer has failed and the master will generate a STOP.


Look at the digital scope image below.

SCL pulses 1 - 8 represent address bits (0x70) 0111-0000, R/W = 0.

Notice that a NACK is generated at SCL pulse #9, not the expected ACK.

QUESTION

What the heck is happening, why is the HT16K33 not recognizing the default address 0x70?

What can be done to remedy this situation?

Should I change the I2C slave address to some other value?

Thanks
Attachments
Scope-Image.jpg
Digital Scope JPEG Image of NACK - Paul
Scope-Image.jpg (77.87 KiB) Viewed 1607 times
I2C PIC18F Master HT16K33 Slave C code.txt
I2C PIC18F to HT16K33 C Code - Paul
(3.76 KiB) Downloaded 113 times

psfetku
 
Posts: 6
Joined: Sun Dec 01, 2013 12:29 am

Re: HT16K33 I2C Address Outputs NACK

by adafruit_support_bill on Mon Jul 14, 2014 6:39 am

Post clear photos showing all your soldering and connections to the board.

adafruit_support_bill
 
Posts: 70464
Joined: Sat Feb 07, 2009 10:11 am

Re: HT16K33 I2C Address Outputs NACK

by psfetku on Mon Jul 14, 2014 6:04 pm

Images (3) of Front/Back of Adafruit 7-segment Display

Adafruit 4-Digit 7-Segment Display

I have done a continuity check on all soldered pins - everything is okay.

I am using 2.2k pull-up resistors on the SDA & SCL lines.

Measured Vcc = 4.80V
Attachments
3 Adafruit 7-Segment HT16K33  A0-A1-A2.jpg
Display - Back-View w/A0 A1 A2 Identified
3 Adafruit 7-Segment HT16K33 A0-A1-A2.jpg (108.55 KiB) Viewed 1583 times
2 Adafruit 7-Segment HT16K33.jpg
Display - Back-View
2 Adafruit 7-Segment HT16K33.jpg (234.77 KiB) Viewed 1583 times
1 Adafruit 7-Segment.jpg
Display Front-View
1 Adafruit 7-Segment.jpg (143.04 KiB) Viewed 1583 times

psfetku
 
Posts: 6
Joined: Sun Dec 01, 2013 12:29 am

Re: HT16K33 I2C Address Outputs NACK

by michaelmeissner on Mon Jul 14, 2014 7:05 pm

This is a wild guess, but i2c addresses consist of a 7 bit address along with the read/write bit. So if you have an address 0x70, the 8 bits that get sent over the wire are either 0xe0 or 0xe1, depending on whether the read/write bit is set. Arduino systems only specify the 7 bits, but perhaps PIC systems include the read/write bit in the specification: http://www.totalphase.com/support/articles/200349176-7-bit-8-bit-and-10-bit-I2C-Slave-Addressing

michaelmeissner
 
Posts: 1318
Joined: Wed Aug 29, 2012 12:40 am

Re: HT16K33 I2C Address Outputs NACK

by psfetku on Wed Jul 16, 2014 3:16 am

Hello Michael

This is Paul - thanks for the replay to my I2C address problem, I appreciate the input.

I have included an explanation to the I2C address situation as an attachment - I2C Byte Format - take a look.

I still have no idea why I2C slave default address 0x70 of the HT16K33 display driver is generating a NACK, and not the ACK.

I'll setup an experiment between two PIC microcontrollers, to test the validity of a master/slave data transfer using I2C.

I'll set the slave address to 0x70, and see what happens.

It's not likely, but perhaps something is defective in the PIC I2C serial module - though I really doubt it.

So, if I2C data can be transferred successfully between two PICs, then that pretty much points in the direction of a problem with the Adafruit HT16K33 Backpack - in some way.

Thanks
Attachments
I2C Byte Format.txt
Adafruit Backpack HT16K33 Display Driver I2C Information
(2.44 KiB) Downloaded 105 times

psfetku
 
Posts: 6
Joined: Sun Dec 01, 2013 12:29 am

Re: HT16K33 I2C Address Outputs NACK

by kim_h on Thu Sep 03, 2015 11:07 am

Having the same problem with the HT16K33 board. Though when i'm running a I2C address scanner on the board with only the VDD/GND and SDA/SCL connected, the address returned (in 7-bit) is 0x70. If I connect the C0 pin then the address is 0x77 (in 7-bit) i converted to the 8-bit addressing for both case with no success.

The question is why the I2C address for the board change only when i connect the C0 pin. If all C1-C7 and A0-A7 are connected the address is 0x70 ,only when i connect C0 the change happens.

Appreciate your support

kim_h
 
Posts: 1
Joined: Thu Sep 03, 2015 10:58 am

Re: HT16K33 I2C Address Outputs NACK

by compuser on Tue Mar 13, 2018 12:36 pm

It's an old thread, but I don't see a solution posted.

I am having the same issue. It works beautifully with my hand-assembled 6-digit 7-seg display, but falls down with a NACK if I try to use the C0 output with my 8x8 LED array.

If I stay away from C0 (by disconnecting one Column from my LED array), it works just fine (sans 1 column).

The clue is in the datasheet, I think. They've multiplexed the I2C address lines with the ROW drivers, and the AD output with the COM0. It also says you're supposed to connect the address lines to AD via diode/resistor circuit to set the address bits high. They've also made the device so that it samples the address on every internal refresh cycle. (bad idea, in my opinion.) I suspect actually using the COM0 pin in a circuit causes parasitic inductance/capacitance enough to mess with the address inputs when it gets sampled. The datasheet says it has a minimum of 250kOhm internal pull-down on the address lines. That's pretty weak.

I've lost too many hours of sleep trying to debug this, but that's where I'd start looking. I'm going to try to add another 100k pulldown on the A[2:0]/ROW[0:2] (250k || 100k ~= 70k) tonight to see if I have better luck. Barring that, it may be that you are stuck using address 0x77, which may behave better as it is actively driven by the device. You'll have to stuff the 3 jumper pads on the Adafruit backpack.

compuser
 
Posts: 3
Joined: Tue Mar 13, 2018 12:11 pm

Re: HT16K33 I2C Address Outputs NACK

by compuser on Thu Mar 15, 2018 1:04 am

Just to follow up, the extra pull-downs didn't help. I went as far as 10K pulldown and the device is still responding as 0x77 if COM0 is used with an LED array.
I think Holtek just screwed up on this device [or they're leaving out critical information in the data sheet.]. As it is, if one wants to use COM0 with a LED array, the device will be stuck at 0x77 with no way around it. (even without jumpers on the Adafruit backpack PCB)

As an aside, it responds as 0x70 with my 7-seg display, even when COM0 is used, so it's probably related to the subtlety of the forward current of the diodes in question.

Since I only have 1 device in the chain, this is adequate for me, but a big downer for folks trying to use multiple devices on the chain.

compuser
 
Posts: 3
Joined: Tue Mar 13, 2018 12:11 pm

Re: HT16K33 I2C Address Outputs NACK

by compuser on Sat Mar 17, 2018 6:18 am

Didn't want to reply o myself again, but mystery solved.
My array was built from a literal "mixed bag" of LEDs, some of which are bidirectional/bicolor type. I was even aware of this and testing the direction of them as I built my array (so that my array will have a uniform color), but didn't consider the implications of what I was doing. Having no issues with my (single color) 7-seg should have given it away.

Long story short, a bidirectional LED will inadvertently create the Address strap-up circuit described in the data sheet.

Bottom line: don't use bicolor/bidirectional LEDs with this thing.

compuser
 
Posts: 3
Joined: Tue Mar 13, 2018 12:11 pm

Re: HT16K33 I2C Address Outputs NACK

by adafruit_support_bill on Sat Mar 17, 2018 7:12 am

Long story short, a bidirectional LED will inadvertently create the Address strap-up circuit described in the data sheet.

Wow. Than must have been tricky to diagnose. Thanks for the follow up.

adafruit_support_bill
 
Posts: 70464
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.