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 for N+


  • Please log in to reply
44 replies to this topic

#21 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 16 November 2012 - 06:40 AM

I follow the instructions and now all is soldered and good to go, however I don't know how to use it with the Netduino Plus. I am using I2C at the moment. I already connected to 5V, GND IC2 ping 4 (DAT) and 5 (CLK) but nothing shows up on the screen which is probably fine because I haven't send any info to the I2C ports. Can someone provide a library or class I can use to start testin this LCD?

#22 supra

supra

    Advanced Member

  • Members
  • PipPipPip
  • 210 posts
  • LocationOntario, Canada

Posted 16 November 2012 - 09:53 AM

Hi Dave, do you mind sharing your class?


Here is link for lcd:
Mylink

video:
Mylink_1

#23 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 16 November 2012 - 06:21 PM

Here is link for lcd:
Mylink

video:
Mylink_1



He uses SPI, is it better? What's the difference between using IC2 and SPI?

Thanks

#24 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 16 November 2012 - 10:19 PM

He uses SPI, is it better? What's the difference between using IC2 and SPI?

Thanks


3 things come to mind;
  • SPI is much faster. Maximum of 37.5Mhz on the N+2 (vs. 400Khz for I2C on all the Ns)
  • SPI is easier to program against
  • I2C requires external pullup resistors.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 


#25 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 17 November 2012 - 08:01 AM

I've followed the instructions of the blog provided but cannot get the LCD to work, all I get is a Red LCD as soon as I plug it in to the power.

My wiring is as follows:

CLK going to D13, DAT going to D12, LAT going to D10, 5V to 5V on the Netduino and GND to GND on the Netduino.

Below is a picture that shows my setup.


Posted Image

And here is the code I am using:

public static void Main()
{
 // create the transfer provider    
 var lcdProvider = new Shifter74Hc595LcdTransferProvider(SPI_Devices.SPI1, SecretLabs.NETMF.Hardware.NetduinoPlus.Pins.GPIO_PIN_D10);

 // create the LCD interface    
 var lcd = new Lcd(lcdProvider);

 // set up the LCD's number of columns and rows: 	
 lcd.Begin(20, 4);

 // Print a message to the LCD.    
 lcd.Write("hello, world!");

 while (true)
 {
  // set the cursor to column 0, line 1        
  lcd.SetCursorPosition(0, 1);

  // print the number of seconds since reset:        
  lcd.Write((Utility.GetMachineTime().Ticks / 10000).ToString());
  Thread.Sleep(100);
 }
}

Any feedback will be greatly appreciated.

Thanks

#26 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 19 November 2012 - 10:38 PM

I've followed the instructions of the blog provided but cannot get the LCD to work, all I get is a Red LCD as soon as I plug it in to the power.

My wiring is as follows:

CLK going to D13, DAT going to D12, LAT going to D10, 5V to 5V on the Netduino and GND to GND on the Netduino.

Mike,

I have a backpack and LCD coming, may take a few days to get here. I currently have only the Adafruit RGB Negative LCD Shield and it seems to work correctly using Stefan's NETMF Toolbox sample program.

But from looking at the wiring and the pinout card for the Netduino, you are not connected properly for SPI. The SPI pins are D11, D12 & D13 not D10, D12 & D13. Netduino Plus Pinouts

I assume that you have worked through the Adafruit tutorial? LCD Backpack Tutorial

Also to work through the code I will likely need to know what you are importing / references. If you have Dropbox or simular it may be easier to post the code there or email it to me.

I will at it some more after supper, but need the backpack first.

Chuck

#27 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 19 November 2012 - 11:52 PM

Mike,

I have a backpack and LCD coming, may take a few days to get here. I currently have only the Adafruit RGB Negative LCD Shield and it seems to work correctly using Stefan's NETMF Toolbox sample program.

But from looking at the wiring and the pinout card for the Netduino, you are not connected properly for SPI. The SPI pins are D11, D12 & D13 not D10, D12 & D13. Netduino Plus Pinouts

I assume that you have worked through the Adafruit tutorial? LCD Backpack Tutorial

Also to work through the code I will likely need to know what you are importing / references. If you have Dropbox or simular it may be easier to post the code there or email it to me.

I will at it some more after supper, but need the backpack first.

Chuck


Hi Chuck,

N+ Tech Specs:
Digital pins 11-13: SPI MOSI, MISO, SPCK

Thanks for anwering, I did follow the tutorial referenced to me here in one of the links but maybe it is for an old Netduino and not for the Netduino Plus as they are using D10 as you pointed out, so I am going to try with D11 instead of D10 as suggested.

So, Stefan's NETMF Toolbox works with the LCD itself, right, not with the backpack?

I'll put the code in dropbox or skydrive and send you the link to it.

Thanks

#28 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 20 November 2012 - 01:18 AM

Hi Chuck,

N+ Tech Specs:
Digital pins 11-13: SPI MOSI, MISO, SPCK

Thanks for anwering, I did follow the tutorial referenced to me here in one of the links but maybe it is for an old Netduino and not for the Netduino Plus as they are using D10 as you pointed out, so I am going to try with D11 instead of D10 as suggested.

So, Stefan's NETMF Toolbox works with the LCD itself, right, not with the backpack?

I'll put the code in dropbox or skydrive and send you the link to it.

Thanks

It works with the LCD shield. But I think that if you get the SPI correct that it may work, or at least help get you started.

Chuck

#29 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 20 November 2012 - 02:03 AM

Mike,

I think I told you wrong, and I think your connections are right.

On the Arduino and Netduino:
  • D10 is the chip select and must be low to write to the LCD backpack(not shown on Pinout but any DIO set to false should work. Connect to Lat(Latch) on LCD backpack
  • D11 is MOSI Master Output Slave Input (from Arduino or Netduino to LCD) connect to DAT (Data In)
  • D12 is Master Input Slave Output (not used on LCD backpack).
  • D13 is Clock tells slave to recieve data. Connect to CLK (Clock) on LCD
Try setting D10 to false.

Chuck

#30 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 21 November 2012 - 12:46 PM

Ok, I took a little time to build a basic LCD demo from the code I use. This contains a modified version of Stefan Thoolen RGB class from the netmftoolbox that I modified to work with the RGB Backlight. I also added some quick and dirty properties to quickly set certain colors. This sample code also contains an example of using custom Glyphs. I know many people have asked how to use Glyphs.

This uses a Netduino Plus and the following LCD and Backpack from AdaFruit.

https://www.adafruit.com/products/498
https://www.adafruit.com/products/292

I am also using the following libraries from CodePlex. I have however modified them to some extent so these are not pure.

MicroLiquidCrystal

FusionWare.SPOT

I am using the FusionWare.SPOT library for only the I2C classes. In my project I use a lot of sensors which are I2C. This coupled with several buttons and several SPI sensors is the reason I went I2C for my LCD. I may try an SPI implementation of this setup if I have time.

Attached Files



#31 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 21 November 2012 - 03:45 PM

Ok, I took a little time to build a basic LCD demo from the code I use. This contains a modified version of Stefan Thoolen RGB class from the netmftoolbox that I modified to work with the RGB Backlight. I also added some quick and dirty properties to quickly set certain colors. This sample code also contains an example of using custom Glyphs. I know many people have asked how to use Glyphs.

This uses a Netduino Plus and the following LCD and Backpack from AdaFruit.

https://www.adafruit.com/products/498
https://www.adafruit.com/products/292

I am also using the following libraries from CodePlex. I have however modified them to some extent so these are not pure.

MicroLiquidCrystal

FusionWare.SPOT

I am using the FusionWare.SPOT library for only the I2C classes. In my project I use a lot of sensors which are I2C. This coupled with several buttons and several SPI sensors is the reason I went I2C for my LCD. I may try an SPI implementation of this setup if I have time.


Hi Dave,

Thanks for taking the time to put this information together. I will desolder the SPI terminals and give this a shot. I'll keep you posted of my findings.

#32 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 28 November 2012 - 08:04 PM

The LCD works so great with the backpack, I am loving it already.

Posted Image

Special thanks to Dave and Chuck for their support.

#33 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 28 November 2012 - 10:02 PM

The LCD works so great with the backpack, I am loving it already.

Posted Image

Giuliano,

Glad to see that you got it working. I still have not gotten the equipment from that I ordered from Adafruit 8 days ago. I think that the Post Office ate it. I was going to try and help with the code.

Are you going to post the code to drive the LCD? It would help others.

Chuck

#34 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 29 November 2012 - 07:09 PM

Giuliano,

Glad to see that you got it working. I still have not gotten the equipment from that I ordered from Adafruit 8 days ago. I think that the Post Office ate it. I was going to try and help with the code.

Are you going to post the code to drive the LCD? It would help others.

Chuck


Thanks Chuck,

I will definitely post the code here which is pretty much the same code as the one Dave posted above, the only difference is that mine is a N+ 1 project while his is a N+ 2 one.

I will play with SPI one of these nights and upload the code here as well.

#35 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 30 November 2012 - 04:37 PM

Attached is the N+ 1 project as promised.

Attached Files



#36 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 02 December 2012 - 09:40 PM

Good day everyone, Is there a way to reverse the characters in the LCD, so the LCD can be used either in their regular position as well as upside down?

#37 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 02 December 2012 - 11:25 PM

Good day everyone,

Is there a way to reverse the characters in the LCD, so the LCD can be used either in their regular position as well as upside down?


I've never come across anything like that. Are you having a space constraint issue?

#38 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 03 December 2012 - 12:01 AM

I've never come across anything like that. Are you having a space constraint issue?


Not now but maybe in the future once I put all the hardware in an enclosure.

#39 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 03 December 2012 - 12:37 AM

I was able to do a successful test of the same hardware using SPI.

Posted Image

And attached is the code for N+ 1:

Special thanks to Dave once again.

Attached Files



#40 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 03 December 2012 - 01:30 AM

Not sure if you are needing to create and use Glyphs in your setup. I see you have the battery Glyph on the screen from my demo. I am working on a program to create the glyph code. I'll post it sometime tomorrow.




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.