LCD for N+
#21
Posted 16 November 2012 - 06:40 AM
#23
Posted 16 November 2012 - 06:21 PM
He uses SPI, is it better? What's the difference between using IC2 and SPI?
Thanks
#24
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
Posted 17 November 2012 - 08:01 AM
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.
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
- carb likes this
#26
Posted 19 November 2012 - 10:38 PM
Mike,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.
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
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
Posted 20 November 2012 - 01:18 AM
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.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
Chuck
#29
Posted 20 November 2012 - 02:03 AM
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
Chuck
#30
Posted 21 November 2012 - 12:46 PM
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
- Giuliano likes this
#31
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
Posted 28 November 2012 - 08:04 PM
Special thanks to Dave and Chuck for their support.
- JerseyTechGuy and carb like this
#33
Posted 28 November 2012 - 10:02 PM
Giuliano,The LCD works so great with the backpack, I am loving it already.
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
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
Posted 30 November 2012 - 04:37 PM
Attached Files
#36
Posted 02 December 2012 - 09:40 PM
#37
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
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
Posted 03 December 2012 - 12:37 AM
And attached is the code for N+ 1:
Special thanks to Dave once again.
Attached Files
- JerseyTechGuy likes this
#40
Posted 03 December 2012 - 01:30 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users