SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By MarkS
#178430
I recently purchased the blue 7-segment serial display for a temperature controller project. My intent was and still is to connect it to an AVR via I2C. However, I first tested it with basic serial and it worked great. My initial tests were on an Atmega32 with the hardware UART, but I plan on using an Attiny84 for the project. Anyway, I downloaded two different AVR I2C software libraries (the tiny84 doesn't have built in hardware TWI support) and tried both on the tiny84. No luck. I then switched back over to the mega32 and tried both software libraries as well as the hardware TWI and again, no luck. I've checked the connections multiple times and everything is hooked up properly. I've connected the display both with and without pull up resistors. All I can get on the display is "0000".

So I came here and searched. It would seem that this is a common problem, although mostly with SPI and it stems from the wrong display type being defined in the firmware. So, basically, I bought a broken component. :doh: What I want to know is if it is possible to update the firmware without the FTDI board or cable. I simply refuse to pay for another product that I do not want or need, one that costs more than the broken part, to fix a problem that I did not cause. I will go another route with another manufacturer before I'll do that.

How do I fix this? The tiny84 doesn't have a hardware UART and I could just write a software UART, but if I ever decide to repurpose the display, it would be nice to know that it has full functionality. Ignoring the problem and using the serial connection is not acceptable.

No, I am not using the AVR as an Arduino, nor do I have any desire to do so.
By MarkS
#178443
jremington wrote:Lack of appropriate pullup resistors and confusion over the proper device address (7 bit or 8 bit) are the two most common causes of failures with I2C connections.
In this case, neither. The documentation states that the i2c pins are pulled up with the AVR's internal resistors and it uses an 8-bit address.

The issue here is that Sparkfun sells three different serial 7-segment displays with three different software protocols. The firmware is the same for each, with a compiler define used to differentiate between the three. It appears that some of these displays were compiled with the "OpenSegment" directive defined instead of the Serial 7 Segment directive. As a result, the i2c and SPI pins on the board do not correspond to the pins set in the software on the AVR.
n1ist wrote:You should be able to reprogram it with whatever you are using to program the other Atmel processors. Just wire a 6-pin ISP header to SDI, SDO, SCK, RST, Vcc and GND.

/mike
I'll try that when I get home from work. I am confused how the FTDI board would program the AVR in the first place. AVR's are programmed through their SPI interface and the FTDI chips are USB to UART. Something doesn't add up. :/
By jremington
#178455
The documentation states that the i2c pins are pulled up with the AVR's internal resistors
I'll bet that is the problem -- those resistors run 50K-100K, and do not correspond to I2C specifications. Use 4.7 K or 2.2K pullups.
By MarkS
#178497
Thanks for the replies. I just got a hold of customer service and they are refunding me and I placed a new order for the OpenSegment version.

I'm curious if it would be possible to emulate the FTDI board with the ATmega32 and the Pocket AVR programmer? I think if I remove the reset line from the SPI connector and write some code to buffer data from the SPI and then re-transmit the data via the UART, that would work. Possibly.

Solved. https://forum.sparkfun.com/viewtopic.php?f=14&t=40206