Go Down

Topic: AVR GCC LCD library allows connecting pins in any order (Read 1 time) previous topic - next topic

iyahdub

Just thought youd like to know about it...

http://www.scienceprog.com/avr-gcc-lcd-library-allows-connecting-pins-in-any-order/
10 LET Loop=Infinite
20 GO TO 10

floresta

So what's the big deal?  Haven't you heard about the LiquidCrystal library?

Don

68tjs

Very interresting, especially if this library is more optimized than that provided by Arduino.
The libraries provided by Arduino are very simple to use but take up much space in memory and in a micro controller space is limited

floresta

Quote
Very interresting, especially if this library is more optimized than that provided by Arduino.


Optimized!!!   Have you looked at the code?

Don

68tjs

This one no. I don't have time.
But some months ago I have a look on pinMode(x) and digitalWrite(x,y),  this functions are 8 times slower than writing dirrectly in the registers DDRx and PINx and with direct register writing the hex file is smaller too.

On the other hand Arduino boards represent a very small part of the Atmell profit, so main of AVR users develop their own library outside of arduino, and it is very instructive to have a look on the other works even if we continue to use arduino library.

This is why I welcome the announcement of another library.

iyahdub


Quote
Very interresting, especially if this library is more optimized than that provided by Arduino.


Optimized!!!   Have you looked at the code?

Don

So you saying its the same as the default library ?!?
I had in mind i was a bit dependent on the pins from same port on it, hence posting this one...Maybe i was wrong...If that is the case, the not much point in it !!

So you saying that with the liquidCrystal i can use any pin for  the LCD ?!?
10 LET Loop=Infinite
20 GO TO 10

Docedison

Apparently you didn't read any of the example sketches... IMO

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

iyahdub

I did... but i thought they all had to be on same port. im totally new to Atmel chips...Only now im starting to dig deeper on the more detailed AVR as well... trying to have a much better understanding of the background of arduino !!
10 LET Loop=Infinite
20 GO TO 10

Optimization? Look to fmalpartida's NewLiquidCrystal.

https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

8 bit, 4 bit, I2C, ShiftOut and even a mode with one pin. And three times faster than the original LiquidCrystal library.

floresta

Quote
So you saying that with the liquidCrystal i can use any pin for  the LCD ?


That's what you are doing with the LiquidCrystal 'constructor'.  Unfortunately in the quest for brevity or obfuscation (look it up) they left out some comments:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here


Don

bperrybap


Optimization? Look to fmalpartida's NewLiquidCrystal.

https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

8 bit, 4 bit, I2C, ShiftOut and even a mode with one pin. And three times faster than the original LiquidCrystal library.


While there are a few low level 1 pin shiftout support routines, there isn't an interface class in
place to use it yet. So for now, you have to use 2 pin or 3 pin mode when using a shift register
unless you write your own 1 pin interface class.

--- bill

iyahdub


Quote
So you saying that with the liquidCrystal i can use any pin for  the LCD ?


That's what you are doing with the LiquidCrystal 'constructor'.  Unfortunately in the quest for brevity or obfuscation (look it up) they left out some comments:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here


Don


Tanks Don.
10 LET Loop=Infinite
20 GO TO 10

Go Up