Sparkfun LCD
#1
Posted 21 August 2010 - 10:32 PM
#2
Posted 21 August 2010 - 11:26 PM
So I purchased the Electronic Brick Start Kit (http://www.seeedstud...tml?cPath=48_69 ) along with my netduino.
Manual here: http://www.seeedstud...icks Vol1.1.pdf
There seems to be a library for controlling this display for the arduino, is there an equivalent for the netduino?
If it's a 3.3V LCD it's no problem - I have one as well but haven't fought with it yet since I also have a SparkFun LCD which works like a charm.
#3
Posted 22 August 2010 - 05:59 PM
#4
Posted 23 August 2010 - 01:01 AM
Attached Files
#5
Posted 23 August 2010 - 02:40 AM
#6
Posted 24 August 2010 - 12:24 AM
#7
Posted 24 August 2010 - 01:56 AM
Check out this diagram at http://arduino.cc/en...l/lcd_schem.png, for details. Just watch out the Digital pins are mapped differently than todotani's example from GHIElectronics library.
I also noticed that some of the sample posts in this thread, included mismatched pin types:
LCD_D4 = new OutputPort(Pins.GPIO_PIN_D13, false);
LCD_D5 = new OutputPort(Pins.GPIO_PIN_A0, false); << Wrong this is an analog pin, A for "analog", should be a digital pin
LCD_D6 = new OutputPort(Pins.GPIO_PIN_A1, false); << Wrong, same issue
LCD_D7 = new OutputPort(Pins.GPIO_PIN_A2, false); < Wrong, same issue.
Ed
#8
Posted 24 August 2010 - 02:22 PM
#9
Posted 24 August 2010 - 04:07 PM
Thanks EdO!
I was under the impression that the analog pins were "general purpose", as far as them being able to act as digital? Was I mistaken?
The "brick shield" im using makes it pretty obvious that mapping the LCD pins to the analog ports pretty obvious. I'll check the "other" pins and try going all digital for the next round of testing.
I don't know with netduino, but on arduino you can use a analogue pin as a digital pin,
I often use it when no free digital pins,
Pascal
#10
Posted 24 August 2010 - 04:37 PM
I don't know with netduino, but on arduino you can use a analogue pin as a digital pin,
I often use it when no free digital pins,
The six "analog inputs" on the Netduino are also digital pins. The only caveat is that A0-A3 can only put out about 2mA of power (vs the 8mA to 16mA of the other digital pins).
Chris
#11
Posted 27 August 2010 - 01:11 AM
#12
Posted 28 August 2010 - 11:40 AM
Ok,
I matched the code from the link EdO referenced to the bus connections shown in the Electronic Bricks Bus documentation. I ended up with this:
LCD_RS = new OutputPort(Pins.GPIO_PIN_D10,false);
LCD_E = new OutputPort(Pins.GPIO_PIN_D12,false);
LCD_D4 = new OutputPort(Pins.GPIO_PIN_D13, false);
LCD_D5 = new OutputPort(Pins.GPIO_PIN_A0, false);
LCD_D6 = new OutputPort(Pins.GPIO_PIN_A1, false);
LCD_D7 = new OutputPort(Pins.GPIO_PIN_A2, false);
When I try the following code:
LCD.Initialize();
while (true)
{
LCD.Print("Hello World");
Thread.Sleep(2000);
LCD.SetCursor(1, 0);
LCD.Print("Hello Netduino");
Thread.Sleep(2000);
LCD.Clear();
Thread.Sleep(2000);
}
I get no response from the LCD. The first row of characters on the LCD is filled with solid blocks, as in the pic attached to the original posting.
Any ideas on how to debug?
As EdO mentioned, R/W pin should be grounded. To do this, try to add the following code;
LCD_RW = new OutputPort(Pins.GPIO_PIN_D11,false);
This feed LCD R/W (pin 11) Low.
#13
Posted 04 September 2010 - 09:21 PM
If I connect to the 2nd bus on the shield, and use the following code... I get the LCD to blank... but that's it.
//Setup the ports OutputPort LCD_RS = new OutputPort(Pins.GPIO_PIN_D10, false); OutputPort LCD_RW = new OutputPort(Pins.GPIO_PIN_D11, false); OutputPort LCD_E = new OutputPort(Pins.GPIO_PIN_D12, false); //enable OutputPort LCD_D4 = new OutputPort(Pins.GPIO_PIN_D13, false); OutputPort LCD_D5 = new OutputPort(Pins.GPIO_PIN_A0, false); OutputPort LCD_D6 = new OutputPort(Pins.GPIO_PIN_A1, false); OutputPort LCD_D7 = new OutputPort(Pins.GPIO_PIN_A2, false); LCD_RS.Write(false); //Send 0x28, function set: 4 bits, 1 line, 5x8 dots LCD_D7.Write(false); // 0 LCD_D6.Write(false); // 0 LCD_D5.Write(true); // 1 LCD_D4.Write(false); // 0 LCD_E.Write(true); LCD_E.Write(false); Thread.Sleep(50); LCD_D7.Write(true); // 1 LCD_D6.Write(false); // 0 LCD_D5.Write(false); // 0 LCD_D4.Write(false); // 0 LCD_E.Write(true); LCD_E.Write(false); //Send 0x0C 0000 1100// display control: turn display on, cursor off, no blinking Thread.Sleep(50); LCD_D7.Write(false); //0 LCD_D6.Write(false); //0 LCD_D5.Write(false); //0 LCD_D4.Write(false); //0 LCD_E.Write(true); LCD_E.Write(false); Thread.Sleep(50); LCD_D7.Write(true); //1 LCD_D6.Write(true); //1 LCD_D5.Write(false); //0 LCD_D4.Write(false); //0 LCD_E.Write(true); LCD_E.Write(false);
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
#14
Posted 04 September 2010 - 09:26 PM
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
#15
Posted 06 September 2010 - 05:57 PM
So I purchased the Electronic Brick Start Kit (http://www.seeedstud...tml?cPath=48_69 ) along with my netduino.
Manual here: http://www.seeedstud...icks Vol1.1.pdf
There seems to be a library for controlling this display for the arduino, is there an equivalent for the netduino?
HURRAH! I finally got a version working.
First, go here, and download the MicroLiquidCrystal_20100905.zip file. You can find it at the bottom of this post (from a forum member here... Thanks!)
http://geekswithblog...id_crystal.aspx
Then, load up your project. Use the GpioLiquidCrystalTransferProvider as your provider.
Finally, setup your provider code as follows:
GpioLiquidCrystalTransferProvider lcdProvider = new GpioLiquidCrystalTransferProvider(Pins.GPIO_PIN_D10, Pins.GPIO_PIN_D11, Pins.GPIO_PIN_D12, Pins.GPIO_PIN_D13, Pins.GPIO_PIN_A0, Pins.GPIO_PIN_A1, Pins.GPIO_PIN_A2 ); LiquidCrystal lcd = new LiquidCrystal(lcdProvider);
And, you'll end up with a screen like this...
Enjoy!
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
#16
Posted 06 September 2010 - 06:06 PM
And, you'll end up with a screen like this...
Enjoy!
You may want to post a link to this in the "Project Showcase" forum, Eric (and including it in the "compatible shields and accessories" sticky post. Congrats on getting it up and running!
Chris
#17
Posted 06 September 2010 - 08:11 PM
You may want to post a link to this in the "Project Showcase" forum, Eric (and including it in the "compatible shields and accessories" sticky post. Congrats on getting it up and running!
Chris
Thanks Chris... I posted it in the Project Showcase. I think it's already in the Compatible Shield thread... if not, I'll post it there...
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
#18
Posted 05 October 2010 - 11:53 PM
#19
Posted 06 October 2010 - 12:00 AM
#20
Posted 11 May 2012 - 09:08 PM
I am curious to know if anybody actually got this to work - I haven't.
I am using
- NetDuino Plus
- Electronic Brick LCD (from the Starters Kit)
- I downloaded the MicroLiquidCrystal from http://microliquidcr...l.codeplex.com/ and took the latest version 6668
- I rewrote Eric Burdo's code to match the new version (method names have changed) to look like this:
GpioLcdTransferProvider lcdProvider = new GpioLcdTransferProvider(Pins.GPIO_PIN_D10, Pins.GPIO_PIN_D11, Pins.GPIO_PIN_D12, Pins.GPIO_PIN_D13, Pins.GPIO_PIN_A0, Pins.GPIO_PIN_A1, Pins.GPIO_PIN_A2 ); Lcd lcd = new Lcd(lcdProvider);When run I get an exception in the library (Line 71).
Anyone has a fix for that?
Any help would be appreciated!
Kind regards
Per Butschkow
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users