Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

LCD Help needed, 16x2s are boring


  • Please log in to reply
100 replies to this topic

#21 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 31 December 2010 - 12:38 PM

Possibly, but Omar can't get it to work either .

#22 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 31 December 2010 - 12:58 PM

If anyone wants this one, I'll mail it to you for FREE, with the proviso that you'll experiment with it and share your experiences here.


If you're serious, I'll take you up on that - with the added proviso that if I can't get it to work, I'll make the same offer :)

Do you have any idea what the problem is?

#23 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 31 December 2010 - 01:51 PM

If you're serious, I'll take you up on that - with the added proviso that if I can't get it to work, I'll make the same offer :)

Do you have any idea what the problem is?

I'm completely serious. Add "@gmail.com" to my username and send me your preferred mailing address. It will be sent first class mail. I have no idea what the problem is, but I do not think that the device is broken. FYI: The device is quite small about 1.5 inches x 1.5 inches (the size of an old school cell phone screen) so it will easily fit in a standard envelope.

Good luck!

P.S. I think we could (re)start a tradition here of passing around unwanted/surplus small components in first class envelopes. I have successfully sent and received parts this way years ago (1980's) and would like to return to this old pasttime.

#24 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 31 December 2010 - 04:45 PM

I thought of that, but I didn't do that, before I got it I read that it works with 3.3V and all of the netduino's Digital Outputs are 3.3V. And both of us can't get it to work so, I'll keep trying, I am still waiting for sparkfun to email me back.

#25 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 31 December 2010 - 05:29 PM

And both of us can't get it to work so, I'll keep trying, I am still waiting for sparkfun to email me back.

What sort of things will you try? I tried stock SPI, bit-banged SPI, carefully managing the SCE (i.e. latch) line relative to SCLK, carefully managing the RST line relative to SCE, carefully managing D/C relative to MOSI, all the various commands (such as clear screen, inverse video, etc.) but I could not get the display to blink.

#26 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 31 December 2010 - 05:59 PM

What sort of things will you try? I tried stock SPI, bit-banged SPI, carefully managing the SCE (i.e. latch) line relative to SCLK, carefully managing the RST line relative to SCE, carefully managing D/C relative to MOSI, all the various commands (such as clear screen, inverse video, etc.) but I could not get the display to blink.


I am not sure what to try, I am just reading the datasheet again. I just haven't giving up on it, I really like this little screen.

#27 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 02 January 2011 - 05:08 PM

What sort of things will you try? I tried stock SPI, bit-banged SPI, carefully managing the SCE (i.e. latch) line relative to SCLK, carefully managing the RST line relative to SCE, carefully managing D/C relative to MOSI, all the various commands (such as clear screen, inverse video, etc.) but I could not get the display to blink.


Hi,

If you have an Arduino lying about, test the display out with that first (I have both the Arduino and NetDuino).
This has helped me out in the past in identifying what the issue is, or at least confirming that my assumptions on setup and wiring are correct.
This should also eliminate the possibility that the display is broken (or otherwise :))

If you haven't been taken up on your offer I'd be interested to have a look :)
-(e)

#28 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 02 January 2011 - 05:45 PM

P.S. I think we could (re)start a tradition here of passing around unwanted/surplus small components in first class envelopes. I have successfully sent and received parts this way years ago (1980's) and would like to return to this old pasttime.


I peronally think this is a fantastic idea and would gladly take part. As I'm very new to the netduino and haven't built circuits in years (I'm currently arranging to get my oscilloscope out of storage) it may take me a couple of months before I've got anything worth passing on - But I'd happily do so then :)

#29 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 04 January 2011 - 03:36 AM

Hi,

If you have an Arduino lying about, test the display out with that first (I have both the Arduino and NetDuino).
This has helped me out in the past in identifying what the issue is, or at least confirming that my assumptions on setup and wiring are correct.
This should also eliminate the possibility that the display is broken (or otherwise :))

If you haven't been taken up on your offer I'd be interested to have a look :)
-(e)

I really liked your suggestion, so I went out an bought an Arduino UNO.

And while I kinda like the Arduino (I never used one before), I still cannot get this little LCD screen to display anything (using the example code from SparkFun and the same pins that they specify.)

#30 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 04 January 2011 - 03:48 AM

I really liked your suggestion, so I went out an bought an Arduino UNO.

And while I kinda like the Arduino (I never used one before), I still cannot get this little LCD screen to display anything (using the example code from SparkFun and the same pins that they specify.)

12 minutes later.....

HEY OMAR! I got it working with the Arduino! The second example on the SparkFun site works on the Arduino straight away.
I think our wiring is correct, but something else must be wrong. I'll figure it out tonight on the Saleae and port the solution to the Netduino.

#31 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 04 January 2011 - 04:21 AM

HEY OMAR! I got it working with the Arduino! The second example on the SparkFun site works on the Arduino straight away.
I think our wiring is correct, but something else must be wrong. I'll figure it out tonight on the Saleae and port the solution to the Netduino.


OMAR! I got it working on the Netduino! This seems to be the key section, I didn't change much else...

        private static void LcdInitialize()
        {
            ResetPort.Write(false);
            ResetPort.Write(true);

            LcdWrite(Command, 0x21);  // LCD Extended Commands.
            LcdWrite(Command, 0xBf);  // Set LCD Vop (Contrast). //B1
            LcdWrite(Command, 0x04);  // Set Temp coefficent. //0x04
            LcdWrite(Command, 0x14);  // LCD bias mode 1:48. //0x13
            LcdWrite(Command, 0x0C);  // LCD in normal mode. 0x0d for inverse
            
            LcdWrite(Command, 0x20);
            LcdWrite(Command, 0x0C);
        }

[Like Mike Iaconelli says...NEVER GIVE UP!]

#32 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 04 January 2011 - 04:50 AM

OMAR! I got it working on the Netduino! This seems to be the key section, I didn't change much else...

        private static void LcdInitialize()
        {
            ResetPort.Write(false);
            ResetPort.Write(true);

            LcdWrite(Command, 0x21);  // LCD Extended Commands.
            LcdWrite(Command, 0xBf);  // Set LCD Vop (Contrast). //B1
            LcdWrite(Command, 0x04);  // Set Temp coefficent. //0x04
            LcdWrite(Command, 0x14);  // LCD bias mode 1:48. //0x13
            LcdWrite(Command, 0x0C);  // LCD in normal mode. 0x0d for inverse
            
            LcdWrite(Command, 0x20);
            LcdWrite(Command, 0x0C);
        }

[Like Mike Iaconelli says...NEVER GIVE UP!]


OMAR! It works with either bit-banged SPI or with built-in SPI. The key is the startup sequence.

Procedure chipInitialize = delegate
                {
                    try
                    {
                        resetPort.Write(false);
                        resetPort.Write(true);
                        
                        chipMode(Command);
                        spi.Write(new byte[] {0x21, 0xBF, 0x04, 0x14, 0x0C, 0x20, 0x0C});
                    }
                    finally 
                    {
                        chipMode(Data);
                    }
                };


#33 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 04 January 2011 - 04:55 AM

Big thanks to SWEETLILMRE, and no thanks to the first example on the SparkFun link, it does not work without the startup sequence from the second example. BTW: the fonts in the array are slightly different in the two examples. EDIT: on second thought, that's not true, they are just spaced differently

Edited by AlfredBr, 05 January 2011 - 09:39 AM.


#34 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 January 2011 - 05:13 AM

Woot! I'm really glad that you guys got this up and running. And thank you for contributing the code, AlfredBr. Chris

#35 bill.french

bill.french

    Advanced Member

  • Members
  • PipPipPip
  • 260 posts
  • LocationPrinceton, NJ

Posted 04 January 2011 - 01:20 PM

so I went out an bought an Arduino UNO.


Wait, did you literally go out somewhere and buy an Arduino? Like, to a bricks and mortar store? Where are these stores???

Besides that, thank you for your work on this. I was just about set on this screen: http://www.sparkfun.com/products/10090

...which I might still get, but now having a <$10 option is fantastic.

#36 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 04 January 2011 - 07:45 PM

Wait, did you literally go out somewhere and buy an Arduino? Like, to a bricks and mortar store? Where are these stores???

Besides that, thank you for your work on this. I was just about set on this screen: http://www.sparkfun.com/products/10090

...which I might still get, but now having a <$10 option is fantastic.


I got the Arduino from Amazon.com, not from a retail store.

I guess I should apologize to Basiclife, since I got this working I guess I won't be giving it away. But I do have some other useful components that I'll offer up in a future post.

#37 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 04 January 2011 - 08:02 PM

I guess I should apologize to Basiclife, since I got this working I guess I won't be giving it away. But I do have some other useful components that I'll offer up in a future post.


No apologies needed - and congratulations on getting it working B)

#38 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 04 January 2011 - 08:49 PM

OMAR! I got it working on the Netduino! This seems to be the key section, I didn't change much else...

        private static void LcdInitialize()
        {
            ResetPort.Write(false);
            ResetPort.Write(true);

            LcdWrite(Command, 0x21);  // LCD Extended Commands.
            LcdWrite(Command, 0xBf);  // Set LCD Vop (Contrast). //B1
            LcdWrite(Command, 0x04);  // Set Temp coefficent. //0x04
            LcdWrite(Command, 0x14);  // LCD bias mode 1:48. //0x13
            LcdWrite(Command, 0x0C);  // LCD in normal mode. 0x0d for inverse
            
            LcdWrite(Command, 0x20);
            LcdWrite(Command, 0x0C);
        }

[Like Mike Iaconelli says...NEVER GIVE UP!]


That is really interesting... let me try that....

WOW! NICE! I thought that the initializing stuff could be wrong and tried sending the bytes shown on the data sheet example but taht didn't do it. Sir you are amazing, now I can actually show live data with my netduino plus!!!! I am so happy, I can't wait till I am done with my exams (studying now, no time to play :( ). Thanks a lot! Whooooo :D awesome!

#39 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 04 January 2011 - 09:31 PM

That is really interesting... let me try that....

WOW! NICE! I thought that the initializing stuff could be wrong and tried sending the bytes shown on the data sheet example but taht didn't do it. Sir you are amazing, now I can actually show live data with my netduino plus!!!! I am so happy, I can't wait till I am done with my exams (studying now, no time to play :( ). Thanks a lot! Whooooo :D awesome!

Let me know when you get yours online! I'll try to test the limits of the transfer speed and play with uploading bitmaps tonight.

#40 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 04 January 2011 - 09:57 PM

Let me know when you get yours online! I'll try to test the limits of the transfer speed and play with uploading bitmaps tonight.

Oh it works! I am playing with it right now, trying to make: SetPixel(int x, int y, bool on) and Write(bool[][] grid).... it will take a long time though, I want to figure out how to move the cursor so I can write on certain parts of it and not others. Maybe it isn't possible, but I am reading that datasheet again!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.