Poll
Question: Would like the 160x128 GLCD f/sparkfun ported to GLCD v.3?
Would liKe it to be included. - 33 (84.6%)
Don't care. - 5 (12.8%)
Wouldn't like it to be included. - 1 (2.6%)
Total Voters: 16

Pages: 1 2 [3] 4 5 ... 8   Go Down
Author Topic: Beta version of GLCD library version 3  (Read 16564 times)
0 Members and 1 Guest are viewing this topic.
NL
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Too bad the T6963C isn't one of them...
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As I was trying to say in an earlier post, it's difficult to add and support LCD panels we don't have on hand in our labs.  
« Last Edit: July 29, 2010, 08:10:27 am by mem » Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your work! I've just ordered one GLCD 128*64. Waiting right now. Hope to get it to work since it's KS0108 compatible. Is there any way to reduce the data line to 4 bits so I can still sense a few buttons and digital I/O? The GLCD will take 13 pins out of 18 pins (I need to keep serial). There's only 5 pins left. I have 3 buttons and 2 inputs and that leaves no room to expand. Is there any way to sacrifice speed and support shift register for the data bits? Thanks.
Logged


London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ks0108 does not have a four bit mode so all eight data lines are required. The data is bidirectional (bot read and write).  Bidirectional shift register solutions are complicated and it may be easier using a low cost bare bones instead to drive the GLCD that talks to Arduino through somthing like I2C.

Another solution is to use an Arduino compatible board with more pins.  The Mega has 54 pins, and thats overkill there are boards with  a smaller price and form factor -  have a look the Sanguino (32 pins),  Teensy (25 IO pins)  and the Teensy++ (46 IO pins).  

Sanguino: http://sanguino.cc/
Teensy: http://www.pjrc.com/teensy/teensyduino.html

All those boards work well with the GLCD library
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks mem. It seems atmega644pa with sanguino bootloader will give me a beefed up version of atmega328. I'll fiddle with this idea once I get a sanguino kit.
Logged


Dallas, TX USA
Offline Offline
Edison Member
*
Karma: 47
Posts: 2329
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just my 2 cents, but at this point in time, I don't see the value of the Sanguino now that the Teensy++ is available and PJRC has a teensy plugin for the arduino IDE.

Teensyduino s/w includes re-written digital i/o routines
(digitalWrite(), PinMode(), etc...) that are MUCH
faster than the standard libraries provided by Arduino.

Teensy++ board hardware has
Double the flash, Double the RAM, double the EEPROM, same analog inputs, more PWM pins, Hardware USB support builtin so you can emulate lots of USB devices with simple s/w (PJRC provides lots of sample code), does not need a USB to serial cable (like an FTDI cable) as USB support is built into the AT90USB1286.

It is also quite a bit cheaper than a Sanguino and comes fully assembled and tested.

The Sanguino is usually a kit which can be a plus for some people as it is kind of fun to solder up a board and you can also replace the processor as they are through hole vs SMT.

I  really like the hardware USB support especially for virtual serial communication as not only can the virtual serial interface run much faster  but also has built in flow control management because it sits on top of USB.

Just my crazy views & opinions....

--- bill
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
don't see the value of the Sanguino…
Actually, the Sanguino kit is the same price as the Teensy++ and would be a better choice for applications that need two hardware TTL serial ports (without USB).  It's a particularly good choice for hardware hackers - I have a project using the Sanguino circuit (an ATmega644P and a crystal) that was put together for $10 in parts.

That said, the Teensy++ is a good choice for the typical Arduino usage that uses USB connection to a computer.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 423
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI,  it is working perfect into my system:

Arduino Duemilanove
Arduino IDE 17
Windows XP

GLCD model: AGM1264B

Thanks for this new library with a lot of tools... it promises a lot of fun!

Just only one question, is there a way to use shift registers (eg., 74HC595) with GLCD in order to reduce the number of pins used? Thanks!

Cheers,
« Last Edit: August 01, 2010, 01:20:58 pm by madepablo » Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The library needs to both write and read to the LCD and implementing a read/write shift register a little tricky. For a similar component cost you could probably use a second ATmega168 to run the library code that communicates with a master Arduino  via something like I2C. Someone else asked about that capability and if it's a popular request then we can put I2C on the wish list for a future release.
« Last Edit: August 01, 2010, 01:30:20 pm by mem » Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 423
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, it could be great.

But in any case, right now, the library is great and a fantastic work.

Well done and thanks so much!
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 417
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
#include <glcd.h>
#include "fonts/Arial14.h"         // proportional font
#include "fonts/SystemFont5x7.h"   // system font
#include <Wire.h> // initialize wire
#include "nunchuck_funcs.h"

int loop_cnt=0;

byte accx;

void setup()
{
  Serial.begin(19200);
  nunchuck_setpowerpins();
  nunchuck_init();
  GLCD.Init(NON_INVERTED);
  GLCD.SelectFont(System5x7);
  Serial.print("Wii nunchuck ready");
GLCD.DrawHLine(0, 32, 127); // horizontal line
}

void loop()
{
   if( loop_cnt > 100 ) {
        loop_cnt = 0;

        nunchuck_get_data();

        accx  = nunchuck_accelx();

       Serial.println((byte)accx,DEC);
    
    
        GLCD.CursorTo(5,5);
        GLCD.println((byte)accx,DEC);
      
    }
    loop_cnt++;
    delay(1);
}
Ive been playing around with code for a few hours and got the nunchuck value to print from 73 to 184 or 185 the same in the serial.
At around 130 the value of accx is level.
My question is which im completely stumbled on is  read a  value from accx and depending on which state it is in draw a line (like a tilt plain) from level to be at 0, 32. if tilted to the right itd draw a line from 0,0 to 127,63. if tilted from left itd draw a line from 127,0 to 0,63.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, Thanks for answers to my Sanguino question. Is there any place where you can cheaply buy (<US$10) an ATMEGA644 with Sanguino bootloader. I will only need the chip. It seems that this chip needs same support as ATMEGA328P to run duino environment (5V DC, 16MHz crystal, caps etc.) I will need to get serial cable/FTDI chip board for other stuff anyway.
Logged


London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@chris, there is an example for drawing angled lines in the FPS example sketch. If you want to draw lines at a specified angle there is an example in the clockface sketch supplied in the download, although that code is highly optimized (it uses a sin table instead of floating point) and is a little obscure.

If RAM or performance are not a concern then you can use trionometry to calculate the coordinates. If you need it, you can find a trig primer here: http://processing.org/learning/trig/
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@liudr, Digikey sell the bare chip for $7: http://parts.digikey.co.uk/1/1/822588-ic-mcu-avr-64k-flash-40-dip-atmega644p-20pu.html

Wulfden sell the chip with bootloader, socket, crystal, caps and reset switch for $11
http://www.wulfden.org/TheShoppe/freeduino/rbfk.shtml

But if you need USB then the teensy may be the better choice.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 417
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@mem
thank you smiley
Logged

Pages: 1 2 [3] 4 5 ... 8   Go Up
Jump to: