Go Down

Topic: ATTINY & LCD (Read 5 times) previous topic - next topic


bill, thanks for posting that. i have begun to study it. but i have the sinking feeling that, after soldering it all together, my product will be bigger than a NANO, tho cheaper.

Perhaps, depending on what you use for a proto board.
Here is an example project that uses the same library but an alternate s/w device interface.
It uses LiquidCrystal_SR vs LiquidCrystal_SR2W
Gives you an idea of a real world implementation.

What I'd do instead, is use a strip board but wire up the LCD wires all to one side so it
has all the 16 lcd pins along one edge. That way the board with the LCD can be used as a backpack
and soldered to the LCD.
Then there is only 4 wires going to the AVR/Arduino. (power, gnd, data, clock)
It makes for a nice clean project.

Here is another exmaple that is more of what I was thinking:
While it uses a 3 wire interface instead of a 2 wire interface it shows
what I mean about creating a "backpack":

Even if you don't decide to go down the shift register route,
Here is place where you can get really cheap parts.
Thins like shift registers, proto/strip boards, caps, resistors, diodes, transistors,
one wire temperature sensors, leds, etc...

If you are thinking going down the alternative custom/small pre-made board route.
Take a look at the teensy boards. http://www.pjrc.com/teensy/
About same price but offers a bit more ram, eeprom, pins, and native USB as well.

--- bill


now that was a helpful comment. i have already spent about an hour looking at your various links and considering your suggestions. it looks as tho it can be made much smaller than the NANO. that's for me.

gracias amigo


Not sure what you are thinking about with a 2 wire implementation but
a two wire implementation, just like a 3 wire implementation
never has to block interrupts as there are no time critical sections or bits
that have to be protected since there are no rc filters involved when
using 2 or 3 wires to run a shift register.

I see the disconnect here.

The 3-wire connection I was talking about uses mosi/rs, sck and enable. Data pins are tied to Q0..7 on the shift register. No resistor / diode. It works with HC164, as well as HC595 - no code changes. The benefit is that 1) it can be driven by a typical spi driver, and 2) it allows 8-bit mode as well as 4-bit mode.

So to reduce that solution down to 2-wire, you have to use a rc filter on the mosi / rs line.

I will post the code in a separate thread.


Nov 24, 2012, 12:00 pm Last Edit: Nov 24, 2012, 12:40 pm by strykeroz Reason: 1

geoff, when you do get a chance to hook it up, i am interested to know what you found.

Sorry 'bout the break in comms there.

Well tonight I've set up a test and the results haven't been good at the first pass.  For displays I've got 3x I2C character LCDs that I've used:

It appears the two DFRobot products use the very same I2C interface module so this probably is like testing the same product twice...but they were both handy.

Initially I've set up with the hello world test sketch on an Arduino Uno, using the LiquidCrystal_I2C library I already had installed, which was the DFRobot-provided one.  It worked as advertised on the two DFR displays.  This Uno is a Freetronics Eleven, and I am using ATTINY85-20PU.

I then exited the IDE, installed the TinyWireM library, zipped up the existing LiquidCrystal_I2C library, and installed the modified one that adds ATTiny85 support (without losing existing functionality aparently).  Went back into the IDE, uploaded the Hello World sketch to the Uno, but that no longer worked on any display.  The top row of characters were lit up as bright blocks but nothing in the low row.  Suspecting the Uno support might have been broken I pressed on hoping the ATTiny experience would be better.  But it hasn't been.

I won't go into the details, but so far I'm getting the same result on the ATTiny as the Uno.  I'm pretty sure since the Uno and ATTiny85 exhibit the same problem, I'm staring at the solution but am just not seeing it.  I will continue to tinker and hopefully once I solve the Uno the ATTiny will be resolved too.  Will report back here when all's well.

Cheers ! Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield



Just some further notes from this.  The DFR modules work perfectly with the library provided on the DFRobot site.  However the ATTiny85 compatible library is a modification of this LiquidCrystal_I2C library (V2.0) and the DFRobot displays aren't responding to that at all.

The flickering issue was resolved when I noticed the DFR example files use I2C address 0x27 but the examples that were subsequently overwritten used address 0x20.  The correct address results in no dark flickering screen, nor the row of bright blocks, but a solid backlight without text.  I've so far not got the DFR displays working with the generic v2 library, nor the ATTiny one (which on closer inspection only appears to have some changed definitions which shouldn't impact the Uno at all, as advertised.

I've yet to get the eBay backpack to get past a bright backlight with no text for all 3 libraries.

This is pointing to me having incompatible displays so I've not been any great assistance at all.  I might come back to this tomorrow with fresh eyes - will let you know here if I have a win.

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield



After that previous post and no further progress I contacted the seller on ebay for clarification on the pinouts (to make sure they're directlly compatible) and a functional library.  I've yet to see a response on that - hopefully will have for the weekend when I can take a fresh look at it. 
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Go Up