Pages: [1]   Go Down
Author Topic: AVR GCC LCD library allows connecting pins in any order  (Read 1272 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 0
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just thought youd like to know about it...

http://www.scienceprog.com/avr-gcc-lcd-library-allows-connecting-pins-in-any-order/
Logged

10 LET Loop=Infinite
20 GO TO 10

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Don
Logged

IDF/SO
Offline Offline
Edison Member
*
Karma: 41
Posts: 2274
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Optimized!!!   Have you looked at the code?

Don
Logged

IDF/SO
Offline Offline
Edison Member
*
Karma: 41
Posts: 2274
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?!?
Logged

10 LET Loop=Infinite
20 GO TO 10

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2926
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Doc
Logged

--> 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

Offline Offline
Sr. Member
****
Karma: 0
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !!
Logged

10 LET Loop=Infinite
20 GO TO 10

SPAIN
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2738
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

10 LET Loop=Infinite
20 GO TO 10

Pages: [1]   Go Up
Jump to: