NL
Offline
Newbie
Karma: 0
Posts: 37
Arduino rocks
|
 |
« Reply #30 on: July 29, 2010, 07:46:37 am » |
Too bad the T6963C isn't one of them...
|
|
|
|
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #31 on: July 29, 2010, 08:10:04 am » |
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
Faraday Member
Karma: 35
Posts: 5915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #32 on: July 29, 2010, 11:34:30 pm » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #33 on: July 30, 2010, 02:17:50 am » |
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.htmlAll those boards work well with the GLCD library
|
|
|
|
|
Logged
|
|
|
|
|
Central MN, USA
Offline
Faraday Member
Karma: 35
Posts: 5915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #34 on: July 30, 2010, 05:58:22 pm » |
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
Edison Member
Karma: 24
Posts: 1616
|
 |
« Reply #35 on: July 30, 2010, 06:24:56 pm » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #36 on: July 30, 2010, 10:32:14 pm » |
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
Sr. Member
Karma: 0
Posts: 379
Arduino rocks
|
 |
« Reply #37 on: August 01, 2010, 01:19:10 pm » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #38 on: August 01, 2010, 01:29:33 pm » |
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
Sr. Member
Karma: 0
Posts: 379
Arduino rocks
|
 |
« Reply #39 on: August 01, 2010, 01:34:39 pm » |
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
Sr. Member
Karma: 0
Posts: 417
Arduino rocks
|
 |
« Reply #40 on: August 01, 2010, 10:55:32 pm » |
#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
Faraday Member
Karma: 35
Posts: 5915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #41 on: August 01, 2010, 11:03:22 pm » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #42 on: August 02, 2010, 01:00:55 am » |
@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
|
|
|
|
|
|
|
0
Offline
Sr. Member
Karma: 0
Posts: 417
Arduino rocks
|
 |
« Reply #44 on: August 02, 2010, 08:38:01 am » |
@mem thank you 
|
|
|
|
|
Logged
|
|
|
|
|
|