Loading...
  Show Posts
Pages: 1 [2] 3 4
16  Forum 2005-2010 (read only) / Interfacing / Re: Digitally Controlling an LM317 on: May 29, 2008, 04:02:26 am
This is pretty interesting. Would it be possible to do pwm to create an analog out on the arduino and then use that to control the lm317 ? This could be a nice little digital power supply. Any possibility of sharing you schematic ? Just want to see how you hooked everything up.
17  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 20, 2008, 03:20:50 pm
Thats what I thought too when I saw the 40 and 0x28, but like you say, the rest doesn't match ... very weird.
18  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 20, 2008, 03:00:39 pm
OK, so I got it to work. I the registers in the datasheet are either wrong or I have the wrong datasheet, but here is what I figured out:

(1) It's really a 2x40 lcd, but the lines are cut in two so you have a 4x20
(2)

According to my datasheet the registers for each line should start at :

Line 1 : 0x0
Line 2 : 0x40
Line 3 : 0x14
Line 4 : 0x54

but the registers actually are :

Line 1 : 0x0
Line 2 : 0x28
Line 3 : 0x14
Line 4 : 0x3C

Weird ??

So I initialized the lcd as a two line lcd and I changed the cursorTo function to the following :

Code:
void LCD4Bit::cursorTo(int line_num, int x){
  //first, put cursor home
  commandWrite(CMD_HOME);

  //if we are on a 1-line display, set line_num to 1st line, regardless of given
  if (g_num_lines==1){
    line_num = 1;
  }
  
  //offset 40 chars in if second line requested
  if (line_num == 2){
    x += 0x28;
  }
  
  if (line_num == 3){
    x += 0x14;
  }
  
  if (line_num == 4){
    x += 0x3C;
  }
  
  //advance the cursor to the right according to position. (second line starts at position 40).
  for (int i=0; i<x; i++) {
    commandWrite(0x14);
  }
}

Now it finally works smiley

19  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 19, 2008, 03:31:31 pm
Quote
Am I correct in thinking that you can write to line 3 by doing
   cursorTo(1, 0x14);
but cursorTo(3, 0); does not work?

and that you tried this with the library linked in post 8  ?


Correct, but cursorTo(3,0) won't work because I specify only 1 line when I init the LCD. If I use any other amount then nothing works. Yes, I tried that library.

Don't know if this helps but I think I found the datasheet for the controller for this lcd:

http://www.lcdproduct.com/Tech/Controller_Or_Driver/SPLC780D_DS.pdf
20  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 19, 2008, 08:56:05 am
Yep, I tried that library. Also the pinouts only show 1 enable so no go on that either. I'll try tonight in 8bit mode and see how that goes
21  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 18, 2008, 01:03:37 am
anybody ?
22  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 16, 2008, 09:20:23 am
Quote
Make sure you are using a version of the library that has four line support.

I checked the library and it looks fine. But this is what I Figured out.

When I set it to a 1 line lcd, it works fine for line1. I can also write on line 3 using lcdlocate(1, 0x14), essentially forcing it to start writing at that address. But, as soon as I change the num lines to anything else then I can't do anything, not even write on line 1. The only other place where the numlines have any relevance (except for setting the location) is in the init part

Code:
int num_lines_ptn ;
  if (g_num_lines != 4) {
        num_lines_ptn = g_num_lines - 1 << 3;
  } else {
      num_lines_ptn = 2 - 1 << 3; // we are controlling the 4 lines display as an 2 lines.
  }
  int dot_format_ptn = 0x00;      //5x7 dots.  0x04 is 5x10

  commandWriteNibble(num_lines_ptn | dot_format_ptn);
  delayMicroseconds(60);

The datasheet on this lcd doesn't give much else apart from the pinouts. Any help would be greatly appreciated.
23  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 16, 2008, 07:32:50 am
ok, so it works, but only the first line. The other lines won't display anything. And if I use the 4bit2x20 lcd library then it doesn't show anything ??
24  Forum 2005-2010 (read only) / Interfacing / Re: Will this LCD work ? on: May 15, 2008, 08:52:19 am
Cool - I'm getting them tomorrow so I'll give it a try. Thanks Guys
25  Forum 2005-2010 (read only) / Interfacing / Will this LCD work ? on: May 14, 2008, 08:33:40 am
Hi There,



I'm planning a project with a 4 line LCD. These are the only ones that I can find locally. I've been looking through the datasheet and it seems hd44780 compatible, but I'm not sure. Can somebody check the datasheet and just verify for me that it will work.

Thanks,
Tom
26  Forum 2005-2010 (read only) / Interfacing / Re: receiving i2c commands on: March 23, 2007, 01:31:21 am
thanks for the info. thats exactly what I was looking for.  smiley
27  Forum 2005-2010 (read only) / Interfacing / receiving i2c commands on: March 22, 2007, 03:01:59 am
Hi There,

I'm relatively new to i2c, but this is what I want to try and do:

I've got a little controller that I can program to send i2c commands. What I want to do is to connect my arduino board to the controller and receive those i2c commands. How would I connect it to my arduino? I've got three pins for i2c communication SCL_5v and SDA_5v and GND. If I can get it connected are there easy commands to read this i2c input ? Any help would be greatly appreciated and I'll make everything I get to work freely available on the net smiley

Thanks,
tom
28  Forum 2005-2010 (read only) / Exhibition / Re: SD card read/write with Arduino on: March 30, 2008, 01:03:57 pm
Will this work on the atmega8 ?
29  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Pong on: August 29, 2007, 04:29:42 am
has anybody got this to work on the atmega8 ? I tried the cli method and the pong intro screen shows fine now, but when the game starts it gets out of sync again .
30  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Pong on: August 24, 2007, 06:22:57 am
Quote
Ok ignore what I just said in the post above.  cli(); in set-up works just fine.
I was running software version 0007, I just downloaded 0009 and it all works fine now.

I can play pong now, my life is complete!!!

Thanks for sharing a great project.

Are you using arduino with an atmega168 or atmega8 ?
Pages: 1 [2] 3 4