Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Dallas/Maxim One-wire over Xbee on: March 13, 2011, 01:12:53 pm
Maybe the DS1821 is a solution.

The DS1821 can function as a standalone thermostat with user-programmable trip-points or as 8-bit temperature sensor with a 1-Wire® digital interface. The thermostat trip-points are stored in nonvolatile memory, so DS1821 units can be programmed prior to system insertion for true standalone operation. The DS1821 has an operating temperature range of –55°C to +125°C and is accurate to ±1°C over a range of 0°C to +85°C. Communication with the DS1821 is accomplished through the open-drain DQ pin; this pin also serves as the thermostat output.
2  Using Arduino / Displays / Re: Howto start porting drivers to GLCD on: March 13, 2011, 12:04:58 pm
Hi Don,

Thanks for your reply.

As I understand it you were able to read the data sheets and then write some code.

In sep/oct. 2010 i ordered an Arduino mega2560 together with an Ethernet shield (v5) and started playing with it. Played with OneWire, rotary encoder, i2c RTC, 20x2 LCD, Ethernet server/client stuff and the 2 graphic displays mentioned. For the 2 graphic displays i found libraries at for the T6963 display and for the HD61830 one.
Then i modified both to let them work together in a test project.
There are a couple of problems with those libraries.
1) I cannot print like i could do with Serial.print or LCD.print etc.
2) There are different implementations with different functions to draw lines, circles etc (file: graphic.c/graphics.c).

Now it seems that you want us to help you write better code without using either the data sheet or the code that you would like us to revise. That's a pretty tall order.

I for sure didn't meant to ask for you guys to solve my problems.  smiley-zipper
And yes, without giving some information and ask for a total solution is indeed waaay to much to ask for..  smiley-eek-blue

A lot of people write libraries for graphic displays and use their own graphic functions. It's nice to have a single framework for all type of graphic displays. This is the main reason i'm looking into GLCD.

I'll focus on the T6963 controller for now because it is 240 pixels wide and i am not sure if wider displays can work with GLCD.

What have i done so far (still lots of things to do).
In 'Modlm6270_Manual_Config.h':
What can i do with  #define glcdEN, the T6963 doesn't have an enable line, just leave it out?
The T6963 has separate WR and RD lines. How should i go on with that, are heavy modifications needed in other .cpp files?

 * lm6270_Manual_Config.h - User specific configuration for Arduino GLCD library
 * Use this file to set io pins and LCD panel parameters
 * This version is for a LM6270SYL display
 * connected using the default Arduino wiring


 * define name for panel configuration
#define glcd_PanelConfigName "lm6270-Manual"

/*  Configuration for LCD panel specific configuration   */
#define DISPLAY_WIDTH 240

// panel controller chips
#define CHIP_WIDTH     240 // pixels per chip
#define CHIP_HEIGHT    64  // pixels per chip

/*  Configuration for assigning LCD bits to Arduino Pins */

 * define name for pin configuration
#define glcd_PinConfigName "lm6270-Manual"

 * Pins can be assigned using Arduino pin numbers 0-n
 * Pins can also be assigned using PIN_Pb
 *   where P is port A-L and b is bit 0-7
 *   Example: port D pin 3 is PIN_D3

/* Data pin definitions
#define glcdData0Pin        PIN_A0
#define glcdData1Pin        PIN_A1
#define glcdData2Pin        PIN_A2
#define glcdData3Pin        PIN_A3
#define glcdData4Pin        PIN_A4
#define glcdData5Pin        PIN_A5
#define glcdData6Pin        PIN_A6
#define glcdData7Pin        PIN_A7

/* Arduino pins used for Commands
 * default assignment uses the first five analog pins
#define glcdCSEL1           PIN_C2

#define glcdRW              PIN_C0
#define glcdRD              PIN_C1
#define glcdDI              PIN_C3
//#define glcdEN              PIN_C2
// Reset Bit  - uncomment the next line if reset is connected to an output pin
#define glcdRES             PIN_C4    // Reset Bit

 * the following is the calculation of the number of chips - do not change

 * The following defines are for panel specific low level timing.
 * See your data sheet for the exact timing and waveforms.
 * All defines below are in nanoseconds.

#define GLCD_tDDR   320    /* Data Delay time (E high to valid read data)        */
#define GLCD_tAS    140    /* Address setup time (ctrl line changes to E high)   */
#define GLCD_tDSW   200    /* Data setup time (data lines setup to dropping E)   */
#define GLCD_tWH    450    /* E hi level width (minimum E hi pulse width)        */
#define GLCD_tWL    450    /* E lo level width (minimum E lo pulse width)        */

#include "device/T6963_Device.h"

  T6963_Device.h - Arduino library support for graphic LCDs


This is a device template file that shows what needs to be
in a device header for a glcd.

The following lcd primitives must be defined


For devices that split set column into to 2 commands of hi/lo:

glcd_DevCol2addrlo(x) (x & 0xf) // lo nibble
glcd_DevCol2addrhi(x) (x & 0xf0) // hi nibble


 * define name for Device
#define glcd_DeviceName "T6963"

 * Sanity check XXX config pins
 * Help the user detect lipin configuration errors by
 * detecting when defines are missing or are incorrect.
 * Check for existence/non-existence of:
 * glcdCSEL1
 * glcdCSEL2
 * glcdEN
 * glcdE1
 * glcdE2



#ifndef glcdCSEL1
#error "T6963 configuration missing glcdCSEL1"

#ifdef glcdEN
#error "T6963 configuration missing glcdEN"

#ifdef glcdE1
#error "T6963 configuration does not use glcdE1"
#ifdef glcdE2
#error "T6963 configuration does not use glcdE2"

 * LCD commands -------------------------------------------------------------

#define LCD_ON
#define LCD_OFF
#define LCD_SET_ADD
#define LCD_SET_PAGE

 * Status register bits/flags -----------------------------------------------

#define LCD_BUSY_BIT

 * Define primitives used by glcd_Device.cpp --------------------------------

#define glcd_DevSelectChip(chip)

 * Define how to strob EN signals
#define glcd_DevENstrobeHi(chip)
#define glcd_DevENstrobeLo(chip)

 * Define how to get low and how addresses
 * (if needed)

 * Convert X & Y coordinates to chip values
#define glcd_DevXYval2Chip(x,y)
#define glcd_DevXval2ChipCol(x)

 * Convert from chip column value to hi/lo address value
 * for LCD commands.
 * (If Needed)

#define glcd_DevCol2addrlo(x)
#define glcd_DevCol2addrhi(x)


3  Using Arduino / Displays / Howto start porting drivers to GLCD on: March 09, 2011, 05:45:07 pm
Hi everyone,

I have in my toy-box a couple of graphic displays. All those displays have different controllers of course (Murphy ?).
GLCD has a couple of nice features and it would be nice to use only one graphic library.

At the moment i have 2 displays connected to a mega2560:
- 1x 400x64, LC7981/HD61830 graphic or text mode controller
- 1x 240x64, T6963 graphic,text or mixed mode controller
These displays work fine but the drawback is that they use their own drivers and graphic functions.

As i'm not a programming guy, i find it complex smiley-confuse to port/create drivers for the GLCD library.
Reading/interpreting the data sheets is no problem and reading basic C code is doable (i got the displays working)  smiley-lol
So far i have read the source and the doc. The trouble is all those #define an chip selects. As my displays only work with 1 CS line and the controllers are 'smarter' then the KS-0108.

So my question is:
- Can someone help me with creating some nice code?
- Is it possible to have more then 1 display connected at the time?
Maybe in the future it's easier for more people to use their 'found' displays easier.

4  Forum 2005-2010 (read only) / Development / Re: Shield pin usage list on: January 20, 2011, 04:37:37 pm

Version 5 is compatible with the Arduino Mega 2560. The PCB has an ICSP connector at the bottom to reach the right pins i believe.

This is from the shield page (i couldn't post a link, 1st post?)
- 8< ----
It is compatible with the Arduino Duemilanove and Mega (using the Ethernet library coming in Arduino 0019)
- 8< ----

I'm using these 2 boards myself without modifying anything

Sooo.... _NO_ pin bending needed ;-)

Pages: [1]