AMPY 2001-11 LCD Display - Page 1
Forum section: electronics / general

author: paul30003
author_rank: Contributor
timestamp: January 26, 2013, 10:49:56 pm
content: Hi guys.Just picked up an odd bag of display components, a few LED displays and sorts, I don't usually buy these crappy bags of junk, but one thing attracted me and at the price, an AMPY 2001-11 LCD. I though this LCD display was worth the money itself, but it seems I may have been wrong as I cant find any information or data sheets on this device,The so called supplied datasheet was about as useful as a fork in a sugar bowl.I'm experimenting with AVR micro's and wanted to take my projects a little further with LCD's.Maybe some of you guys have seen or know about this or even have a datasheet.A pretty extensive Google search came up with nothing??Help please.Thanks.

author: tom66
author_rank: Super Contributor
timestamp: January 26, 2013, 10:58:15 pm
content: It is most likely a HD44780-style interface going by those pin names.

author: Unknown
author_rank: Unknown
timestamp: January 26, 2013, 11:11:20 pm
content: I concur with tom66. Searching for how to hook up aHD44780-compatible LCD to an AVR should produce dozens of hits.

author: marshallh
author_rank: Unknown
timestamp: January 27, 2013, 12:54:59 am
content: Yes, it's a Hitachi HD44780 clone. Anything chinese is almost always a copy of some existing western standard, just renamed.You can find more variations of LCDs with this controller at Allelectronics.40x2 (80 chars) is the maximum one controller can address. 40x4 screens exist and just use two controllers.You can pull these screens out of many electronics from the 80s to 90s... desk phones, alarm consoles, ind. automation displays, etc

author: telbee
author_rank: Newbie
timestamp: January 31, 2013, 10:19:23 pm
content: Hi,I don't tend to buy these lucky (!)bags either, but I spied one of these today in Maplin with this display and bought it too.I intend to connect it to a PIC, I'll let you know how I get on.. Likewise, if you have any joy, please share!ThanksT

author: mariush
author_rank: Super Contributor
timestamp: January 31, 2013, 11:08:26 pm
content: The pinout will be similar to the ones on these:http://uk.farnell.com/midas/mc21605b6w-fptlw/lcd-2x16-fstn-white-led-b-l-5v/dp/2063169http://uk.farnell.com/midas/mc21605b6w-spr/lcd-2x16-stn-reflective-5mm/dp/2063239http://uk.farnell.com/midas/mc21605a6wd-sptly/lcd-2x16-stn-ylw-green-b-l-5mm/dp/2063233http://ro.farnell.com/midas/mc21605ab6w-gptly/lcd-2x16-grey-stn-g-b-l-5mm/dp/2063119The controllers are all hd44780 clones or using the same protocol with some added features. You can check the datasheets in the links above.This is the datasheet of one of those controllers, with additional information that may not be found in the datasheets from the links above (but the datasheets above have all you need to make it work) :http://savedonthe.net/download/440/SPLC780D-sunplus-lcd-controller.htmlYou'll find ready made libraries for these screens.I've coded my own very simple routines, and they're somewhat optimized for 16mhz clock (i mean in some places i use a number of instructions that i know they'll take a microsecond or something like that to be processed at 16 mhz clock) :(RS, RW and EN are on PORTE on a 40 pin pic, 8 bit data to lcd on porta)newlcd.hCode:#ifndef __LCDH_INIT#define __LCDH_INIT#defineLCD_RS PORTEbits.RE0#defineLCD_RW PORTEbits.RE1#define LCD_EN PORTEbits.RE2#define LCD_DATA PORTA#define LCD_TRIS TRISA#define LCD_MASK_OFF 0x00; // all pins on PORT A set to output#define LCD_MASK_ON 0x80; // pin 7/LCD_DATA3 set to input// keep LCD_EN =1 for 500ns when clock is 16Mhz#define LCD_STROBE()((LCD_EN = 1),(LCD_EN = 1), (LCD_EN=0))#define lcd_clear() lcd_control(1);#define lcd_home() lcd_control(2);#define lcd_display(screen, cursor, blink) lcd_control(8+4*screen+2*cursor+blink)#define lcd_shift(cursor,screen) lcd_control(16+8*cursor+4*screen)#define lcd_goto(position) lcd_control(0x80 | position)#endifextern void lcd_start();extern void lcd_control(unsigned char command);extern void lcd_data(unsigned char data);extern void lcd_busy();extern void lcd_string(const char *s);newlcd.cCode:#include "htc.h"#include "newlcd.h"#include "delay.h"void lcd_busy() {delay_ms(2);return;LCD_TRIS = 0x80;LCD_DATA = 0;LCD_RS = 0;LCD_RW = 1;do {LCD_STROBE();delay_1us();} while ((LCD_DATA>>7)==1);LCD_TRIS = 0;LCD_DATA = 0;LCD_RW = 0;LCD_RS = 0;}void lcd_control(unsigned char command){lcd_busy();LCD_RS = 0;LCD_RW = 0;LCD_DATA = command;LCD_STROBE();}void lcd_data(unsigned char data){lcd_busy();LCD_RS = 1;LCD_RW = 0;LCD_DATA = data;LCD_STROBE();LCD_RS = 0;}void lcd_reset(){delay_ms(20);LCD_DATA = 0b00110000; // function set (8 bits)LCD_STROBE();delay_ms(5);LCD_STROBE(); // function set (8 bits)delay_1ms();LCD_STROBE(); // function set (8 bits)}void lcd_start(){lcd_reset();lcd_control(0b00111000); // 0011NFxxlcd_control(0b00001000); // 00001DCBlcd_control(0b00000001); // clearlcd_control(0b00000110); // 000001IS}void lcd_string(const char *s) {while(*s) {lcd_data(*s++);}}delay.h - delay routines that assume the clock is set at 16 mhz, they can be changed to another value or you can use the internal delays of your compilerCode:// Delay routines for 16 Mhz clock.//// 16 Mhz = 4 Hz per cycle = 4 operations/cycles per uS//#ifndef __DELAYH_INIT#define __DELAYH_INIT#define delay_1tcy() asm("nop")#define delay_2tcy() asm("goto $+1")#define delay_4tcy() asm("goto $+1");asm("goto $+1");#define delay_10tcy() delay_2tcy();delay_4tcy();delay_4tcy();#define delay_500ns() delay_2tcy()#define delay_1us() delay_4tcy()#define delay_4us() delay_1us();delay_1us();delay_1us();delay_1us();#define delay_5us() delay_4us();delay_1us();#define delay_10us() delay_5us();delay_5us();#define delay_5ms() delay_ms(5);#define delay_10ms() delay_ms(10);#define delay_25ms() delay_ms(25);#define delay_50ms() delay_ms(50);#endifextern void delay_25us();extern void delay_50us();extern void delay_100us();extern void delay_1ms();extern void delay_ms(unsigned char ms);delay.cCode:#include "delay.h"void delay_25us(){// function call and return is 4 cycles, on 16Mhz that's 1us// so delay for 24us heredelay_10us();delay_10us();delay_4us();}void delay_50us(){delay_10us();delay_10us();delay_10us();delay_10us();delay_5us();delay_4us();}void delay_100us(){delay_50us();delay_10us();delay_10us();delay_10us();delay_10us();delay_5us();delay_4us();}void delay_1ms(){unsigned char n = 248;do {asm("goto $+1"); asm("goto $+1"); asm("goto $+1");asm("goto $+1"); asm("goto $+1"); asm("goto $+1");asm("nop");// decrease if not zero - decfsz (1 cycle if !=0, 2 cycles otherwise)// goto loop start = 2 cycles} while(--n);// = 16 cycles x [n+1] + 1 (from last decfsz) - 2 (last goto is skipped)// 249x16+1-2 = 3983 cycles (1 = decfsz ), -2 for last goto// + 1 = 3984 cycles (assignment of 248 to n)// + 4 = 3988 cycles (function call and return)delay_2tcy(); // = 3990 cyclesdelay_10tcy(); // = 4000 cycles}// Delay up to 255 milliseconds - approximately (ms + 19 cycles so a few microseconds over the actual value).void delay_ms(unsigned char ms) {unsigned char n;while(ms--) { // time in cycles for the inner loop includingn = 249; // cycles = 19+16*ms*[1+n]// cycles = 4000*ms + 19 for 16MHz clock// cycles = 2000*ms + 19 for 8MHz clockdelay_4tcy();do {asm("goto $+1");asm("goto $+1");asm("goto $+1");asm("goto $+1");asm("goto $+1");asm("goto $+1");asm("nop");// decrease if not zero - decfsz (1 cycle if !=0, 2 cycles otherwise)// goto loop start - 2 cycles} while(--n);// = 16 cycles x [n+1] + 1 (from last decfsz)}}

author: Chaz
author_rank: Newbie
timestamp: February 02, 2013, 02:15:40 pm
content: I picked-up one of these party-packs too - Maplin, by any chance? (called RadioShack if you're in the US)I thought it looked like a 16x2 5v display. Anyhow, I plugged it into a project I'm working on ATM, and hey-presto! it ISN'T 16x2, its 16x1 large characters, and another line, much smaller, of some "other stuff". Check outhttp://www.tgsolarsystems.com/downloads/5224-ampy-meters-user-manual-and-technical-specfication.pdfas an example of this kind of display. Maybe the same one, I don't know. I'm getting some characters displayed on the bottom, but I haven't figured-out yet what they are/how to drive them correctly. I think some are single-use characters, e.g. at the mo I have a single "h" in the lower portion, just left of centre. It isn't bitmapped though, its really quite clear. It looks to me like you can either have an "h" there, or not - nothing else. Over to the right I can get some funny graphics characters which presumably have a meaning in the product for which this LCD panel has obviously been specifically produced.Anyhow - as guessed before, the first line behaves according to the HD44780 standard for a 1x16 display.If I get any further with a definitive description of the second line I'll post it here.Best regards

author: Chaz
author_rank: Newbie
timestamp: February 03, 2013, 01:08:30 am
content: Well, I wouldn't call this definitive but here goes...I've used these 2 tables on a PIC to define the address and data for the 2nd line graphics:posntabaddwf PCL, fdt 0xc1,0xc1,0xc3,0xc3,0xc5,0xc5,0xc7,0xc7,0xc8,0xc8,0xca,0xca,0xcc,0xcc,0xce ;chrtabaddwf PCL, fdt 0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00 ;where you'd use the same index into both. The values in chrtab are just some that I found to work. Possibly there are individual bits to control the graphic characters, but I doubt it because writing zero also causes many (but not all) of them to appear. It doesn't seem to be as simple as some bit having 1=off 0=on though. Or maybe it is - I'm pretty tired now.Here's a little video I just made:http://youtu.be/PQXrQS4AeZAEnjoy.

author: Anobium
author_rank: Regular Contributor
timestamp: February 04, 2013, 11:28:10 am
content: Hi,I have the top line working with a Picaxe routine.A few findings...Seems that only 8-bits LCD addressing works. I tried 4-bit and I gave up.They are HD44780-compatible LCDs with respect initilisationI will use the info @Chaz posted to address the bottom set of chars. @Chaz. Who did you address the second line? If I use HD44780 2nd line instructions I get random chars.

author: jeroen74
author_rank: Frequent Contributor
timestamp: February 04, 2013, 01:05:31 pm
content: The annunciators on the bottom are best controlled with the custom characters. You write fixed character values to the screen memory, but manipulate the custom characters to control the annunciators.

author: Anobium
author_rank: Regular Contributor
timestamp: February 04, 2013, 05:48:41 pm
content: @jereon74. Thank you. My question is really how? I can address and use standard HD44780 codes for line. What is your approach for symbols? I have tried addressing the symbol positions with chars and I get nothing.Anyone got any example code?

author: Anobium
author_rank: Regular Contributor
timestamp: February 05, 2013, 07:30:52 am
content: Information from my work last night. I can now address the 16*1 using a standard LCD driver. Cursor position and all the normal LCD codes work ok. The first line is adddress from 128, this is the same as normal LCD driver.I am using a Picaxe to interface to the LCD, in 8-bit mode. (I think I code you could use 4-bit mode by pulling D0-D3 to ground which I failed to do yesterday - but, it ho hum).I believe the symbols are in two pairs, addressed as pairs of characters. The DRAM addressing is as shown in the routines below.Example, the first two symbols on line two are addressed at position 193 with "D"|"J"|"E"|" " chosing the left, right, both or clear respectively, the space clears the chars. They run in two step until 199 then 1, then back to two step... odd. But, this code does seems to work.Please examine the code as the example is a general rule. There is one adapation to the rule.Works OK for me.Anobium#picaxe 08m2#no_datapause 2000' clear LCDserout C.2,N2400,(254,1)pause 100' pos 1 line 1serout C.2,N2400,(254,128)pause 100' display stringserout C.2,N2400,(#b1, ": Testing")pause 100' Table of information!! i.e. printing a "D" at position 193 with show the L1 symbol only.' First two chars' L1'serout C.2,N2400,(254,193,"D")' L2' serout C.2,N2400,(254,193,"J")' both' serout C.2,N2400,(254,193,"E")' Second two chars' L3' serout C.2,N2400,(254,195,"D")' kw' serout C.2,N2400,(254,195,"J")' both' serout C.2,N2400,(254,195,"E")' Third two chars' h' serout C.2,N2400,(254,197,"D")' kvar' serout C.2,N2400,(254,197,"J")' both' serout C.2,N2400,(254,197,"E")' Forth two chars' h' serout C.2,N2400,(254,199,"D")' (Down chevron)!' serout C.2,N2400,(254,199,"J")' both' serout C.2,N2400,(254,199,"E")' Fifth two chars' Circle' serout C.2,N2400,(254,200,"D")' Square' serout C.2,N2400,(254,200,"J")' both' serout C.2,N2400,(254,200,"E")' sixth two chars' NE Quad' serout C.2,N2400,(254,202,"D")' NW Quad' serout C.2,N2400,(254,202,"J")' both' serout C.2,N2400,(254,202,"E")' seventh two chars' SW Quad' serout C.2,N2400,(254,204,"I")' SE Quad' serout C.2,N2400,(254,204,"H")' both' serout C.2,N2400,(254,204,"E")' last two chars' both = house' serout C.2,N2400,(254,206,"E")' example code. this shows the quadrants by cycling thru the symbols.do' show NE Quadserout C.2,N2400,(254,202,"D")pause 250' show NW Quadserout C.2,N2400,(254,202,"J")pause 250' blank NE quadserout C.2,N2400,(254,202," ")' SW Quadserout C.2,N2400,(254,204,"I")pause 250' SE Quadserout C.2,N2400,(254,204,"H")pause 250' blank SW quadserout C.2,N2400,(254,204," ")loop

author: Anobium
author_rank: Regular Contributor
timestamp: February 05, 2013, 07:34:49 am
content: The setup I used.I used a Picaxe AXE133 LCD driver to interface to the LCD, 8 bit mode. The AXE133 driver is open source and provides very good functionality with full addressing of the LCD, control to the LEDs, control of contrast and more.If anyone needs a program AXE133 chips I will program and send. Send me a private message and we can sort the minor costs.AnobiumPS I now have a working LCD for my Energy Project! Yipee.

author: Chaz
author_rank: Newbie
timestamp: February 05, 2013, 07:22:04 pm
content: I'm using it in 4-bit. I just dropped this into my current project (which is a 16x2). I use the standard sequence to set it to accept 4 bit; Here's my code for that:Code:#ifdef __DEBUGreturn;#endifcallDel20; Wait 20 msecsmovlw0x30;Send the Reset InstructionmovwfLCD_PORT;callPulse_e;Pulse LCD_EcallDel10;Delay 10mscallPulse_e;Pulse LCD_EcallDel01;Delay of 1mscallPulse_e;Pulse LCD_EcallDel01;Delay of 1msmovlw0x20;Send the Data Length SpecificationmovwfLCD_PORT;callPulse_e;Pulse LCD_EcallDel01;Delay of 1msmovlw0x28;Set Interface LengthcallLCDIns;movlw0x10;Turn Off DisplaycallLCDIns;movlw0x06;Set Cursor MovementcallLCDIns;movlw0x0C;Turn on Display/CursorcallLCDIns;callLCD_Clr;Clear the LCDreturn;Addressing the items second line: did you read my post regarding addresses and data values?Best regardsedit : Thanks jeroen74 for explaining the "#" button in the posting editor

author: Chaz
author_rank: Newbie
timestamp: February 05, 2013, 07:30:22 pm
content: Forgot to mention: I've left d0-d3 floating for 4-bit.Further to my address/data posting:1st item on line 2 is "L1". Use address 0xC1, and put 0x07 there. to get the second item "L2" use address 0xC1 (The same address) but with value 0x00. So on and so on with the addresses/data posted previously.Best regards

author: Anobium
author_rank: Regular Contributor
timestamp: February 05, 2013, 08:45:35 pm
content: I now understand. We have solved the mystery!!Most grateful.

author: Anobium
author_rank: Regular Contributor
timestamp: February 07, 2013, 09:17:04 am
content: I thought I would give the 0xC1=07|00 last night. For me this does not work. The method I have working is as follows:0xC1=68|74|69|32: 'L1/l20xC3=68|74|69|32: 'L3/kw0xC5=68|74|69|32: 'h/kvar0xC7=68|74|69|32: 'h/down chevron' note the address...0xC8=68|74|69|32: ' circle/square0xCA=68|74|69|32: ' NE Quad/NW Quad0xCC=73|72|69|32: ' SW Quad/SE Quad0xCE=69|32: 'Housey symbol... its either on or off....

author: telbee
author_rank: Newbie
timestamp: February 09, 2013, 08:54:14 am
content: Quote from: Chaz on February 05, 2013, 07:22:04 pmHi, yes, I got this display from a lucky bag in Maplin, mine has the same characters along the bottom. Checked out the vid - nice job!T

author: Chaz
author_rank: Newbie
timestamp: February 10, 2013, 07:46:47 pm
content: Anobium,Maybe we have subtly different versions of the display. Anyway, if its working for you then its all good, and we've given others a couple of things to try. Personally I'd say that I'd rather put a non-zero value in to mean display something (your version) - I just used zero 'cos it was the first value which worked (for me).If you can figure-out the picaxe necessary to set the display to 4-bit then I think you'd make some people happy. I use a raw PIC16F688 not picaxe, so I can't help. What I can say is that it works a/p my previous post on my setup, which I hope is legible enough to rewrite in picaxe.Note to self - I just noticed that in my code I'm writing to all of LCD_PORT in parts of this routine, but I'm only using 4 bits of that for the LCD. the LCDIns routine masks these off, and so should this initialise routine. Here's LCDIns:Code:LCDIns;Send the Instruction to the LCD;#ifdef __DEBUG;return;;#endifmovwfLCDTemp;Save the ValuemovfLCD_PORT,W;andlw0x0F;these are bits we're NOT usingmovwfLCDHoldPort;so retain themmovfLCDTemp,W;andlw0xF0;Most Significant Nibble firstiorwfLCDHoldPort,W;Restore the bits we're not usingmovwfLCD_PORT;bcfLCD_CPORT, LCD_RS;callPulse_e;swapfLCDTemp, W;Least Significant Nibble Secondandlw0xF0;iorwfLCDHoldPort,W;Restore the bits we're not usingmovwfLCD_PORT;bcfLCD_CPORT, LCD_RS;callPulse_e;callDel01;wait 1 msmovfLCDTemp, W;andlw0xFC;Have to Delay 5 msecs?btfscSTATUS, Z;callDel01;1msreturnIts annoying how my nicely tabbed code gets all squirly when I paste it into this edit boxTelbee,My first YouTube post, so cheers.jeroen74,Thanks very much - edited per your instruction.

author: jeroen74
author_rank: Frequent Contributor
timestamp: February 10, 2013, 07:52:29 pm
content: Use code tags.Code:Because that keeps the formatting intact.Select your text and press the # button ()

author: philthetechie
author_rank: Newbie
timestamp: February 11, 2013, 02:23:24 pm
content: Hi Guys,I also picked one of these AMPY 2011-11 up and am trying to run it from an Arduino.I'm getting power to the LCD fine, and using the Arduino Hitachi Library.Using any 4 or 8 of the data pins and will not make the LCD show data, and I have no way to know if it is even receiving the instructions.All I get is a row or boxes when i hit the power, as as if it is not driven at all. If this is a Hitachi clone, I would have expected to be able to drive it this way.--Any Ideas?What i'm wondering as well is what do i do with pins 11-13? They seem to be powering LEDs and then is that a timer, but i'm not an electronics expert so I must be missing something. There also seems to be NO backlight functionality on these.Can someone simply give a numbered pinout list and a code example to use the arduino LCD library to drive this thing?and explain what the timers are doing.Sorry for demanding it spoonfed to me, I'm pretty useless with this LCD - it has me stumped!Thanks in advance.

author: Chaz
author_rank: Newbie
timestamp: February 11, 2013, 05:11:01 pm
content: philthetechie,Do you still have the datasheet? if not, its athttp://www.kemo-electronic.de/datasheets/s043.pdfYou definitely need pin 11 because its the R/W pin (I notice on the datasheet its labelled as RW, but it should properly be R/W where the W has a bar over, meaning "not W")I also notice that there is a pin marked as R/S, but this should read RS because it means "Register Select"Anyway, the connections you need are:pin 01 is D0pin 02 is D1pin 03 is D2pin 04 is D3pin 05 is D4pin 06 is D5pin 07 is D6pin 08 is D7pin 09 is RS (Register Select)pin 10 is EN (Enable)pin 11 is R/(not W) (Read/not Write)pin 16 to GNDpin 17 to +5VThe others you don't need, and pin 01 to 04 you don't need if you manage to get the 4-bit interface working. I'd get the 8-bit working first, then decide.Looking at the datasheet be careful how you read it - the pin numbers are ABOVE the pin, so where the number 11 it is above a pin which it doesn't show connected to anything, but the pin above the number 11 (which is pin 13) is connected to a transistor used to drive LED2. Don't bother trying to get the LEDs lit just yet.The Arduino Hitachi library should have a document describing the pins D0-D7, RS, EN and R/(not W), and where to connect them.A quick note about R(not W) (and if you already "get" this then I apologise) if this pin is high then you are reading, i.e. not writing. If this pin is low then you are not reading, and you are not not-writing, i.e. you ARE writing. I'm not reading from this board, so I've got pin 11 connected to GND.There aren't any timers I'm aware of. There are a couple of transistors on the board labelled T1 and T2.Interesting that this board doesn't have a VO (Operating Voltage) pin. This is usually used to set the display contrast. I guess they use a fixed resistor on-board.I think you're right that there is no backlight.If you also put a constant 5v onto pin 15 then you can get the LEDs lit by raising pins 11 and/or 13 to 5v. Also, you can read the push-button on pin 14. So you can connect pins 11 & 13 to outputs on the Arduino and it'll light the LEDs when you like, and you can connect pin 14 to an input on the Arduino and you can see if the push-button is pressed.How well do you know the Arduino? you'll either have to poll the button (check very regularly) or connect it to an interrupting input and write the interrupt handler. (much better way)Best regards

author: philthetechie
author_rank: Newbie
timestamp: February 11, 2013, 08:24:05 pm
content: Thankyou Chaz! Your a gent.Going to have a play now, and i'll let you know how i get on.From the sounds of it i've been going off the hitachi example too much and concentrating on 4bit/4pins (+rw, rs and enable) to get the single line working. Going to retry with 8bit and no R/W now.Good to know I can ignore the led's now too thanks.Cheers,Phil.

author: philthetechie
author_rank: Newbie
timestamp: February 11, 2013, 09:34:30 pm
content: I'm pretty sure i have a faulty board now.I've wired up as you have mentioned, using R/W as not-not-write (i.e. to ground), and using the code:LiquidCrystal lcd(12,10, 0, 1, 2, 3, 4, 5, 6, 7); // RS/Enable/d0-d7void setup() {lcd.begin(16,1); // or 16,2 - tested both ways as this board has a 2nd line of symbols.lcd.print("test");}I get a out-of-sync error when uploading the file if the power is going to the LCD-avrdude: stk500_cmd(): programmer is out of syncHave to unplug +5v from the LCD to upload. This makes me wonder about the state of the LCD.When i connect the power, there are just 16 black boxes instead of 4 characters.The layout i'm using I had tried before using the datasheet but im apt to blame my own ineptitude rather than components - but now...Have tried 4 and 8bit, tried connecting R/W to pin 13 and using the formatLiquidCrystal lcd(12, 13, 10, 0, 1, 2, 3, 4, 5, 6, 7);Nothing is getting any data to display.Bit of a bummer... Wonder if they will do an RMA on a lucky bag? Worth a shot.

author: mariush
author_rank: Super Contributor
timestamp: February 11, 2013, 10:14:36 pm
content: You probably didn't connect it properly.If this is the display,pin 1 to 8 is datapin 9 is rspin 10 is enpin 11 is rwpin 12 and 13 are the leds (send 5v or a digital 1 and led lights up)pin 14 is the button ( put a 1-10k resistor between that and your controller pin, set the pin to input and when button is pressed you get 1 on controller pin)pin 15 is voltage to make the leds work and the button (if there's no 3.3v-5v on this pin, button and leds won't work)pin 16 is groundpin 17 is 5vpin 18 is not connectedSo I think you should have LiquidCrystal lcd(8,9, 0, 1, 2, 3, 4, 5, 6, 7); - i'm saying 8 and 9 because you've used 0 to 7 for data, so I assume you used consecutive numbers for the rest.

author: philthetechie
author_rank: Newbie
timestamp: February 11, 2013, 10:29:52 pm
content: Cheers, I know what you are saying.I used 12 for RS. (I did this in desperation of ensuring nothing dodgy was going on with the board. Was on 9 first then i moved it.)10 for Enable.RW to ground.d0-d7 on 0-7.Yet still not displaying using:LiquidCrystal lcd(12,10, 0, 1, 2, 3, 4, 5, 6, 7);Can you think of anything else? There are only 3pins needed for data writing (RS/EN) With R/W to ground. 8 for data (d0-d7)and 2 for power (+5, Gnd) so I'm not sure what i could be getting wrong now.

author: Chaz
author_rank: Newbie
timestamp: February 12, 2013, 09:12:57 am
content: I can't help thinking its a mistake with the pin numbering (mostly 'cos it threw me at first). Here's a clearer diagram...Also, to actually be able to plug this into a breadboard I had to clip off the lower plastic bar which held the legs too close together. Then I could carefully put a kink into the legs to separate them enough to be able to fit them across a dividing space in my breadboard.

author: philthetechie
author_rank: Newbie
timestamp: February 12, 2013, 09:18:48 pm
content: I'm using header terminated data cables - various ones stolen from an old PC.The headers (from a PC power/led/reset button if you know the type i mean) push straight onto the pins i need then onto Arduino.Those cables are absolutely invaluable for testing something like this. (Cables checked for continuity from pin solder on front of LCD to arduino pin solder - with multimeter.)Once running i'd have soldered the board into my project.So you wont believe how many times i've plugged and replugged. Coded and re-coded. i'm absolutely wiring up correctly.Written the code correctly. Still no data displaying on the screen though.back to maplins! And none of you will convince me it's a pebkac or id10t issue any more.Thanks all of you for making it superbly obvious what i'm doing. I though i was being dense but really I must have a dodgy board.It's given me time to play with my direct drive LED grid array though. That's a pointless project that's running nicely now. Bit of a pain in the behind but hand coded the 62 5x3 alphanumeric characters needed for basic communication. It's a 6x4 LED grid, 5x3 of those for a character, the other LEDS for 2 different meters/status indicators.As i'm new to arduino, and i need some sort of feedback from my programs, this is the substitute for the LCD until i pick up another, or until I work out the OLED os96016pp08mb2b10 displays Tiny screens though. Still, be fun to play with. They can run off SPI or 8bit. Should be simple enough to get a driver going.

author: philthetechie
author_rank: Newbie
timestamp: February 14, 2013, 08:31:42 am
content: Swapped, wired, coded.... SUCCESS!I'm glad maplins took a return for a single faulty piece. All good now.Thanks again for everyone's help.

author: 72sonett
author_rank: Newbie
timestamp: March 05, 2013, 07:35:56 pm
content: On a short vacation to Dublin I too could not resist to buy this LCD surprise bag at Maplin's...Thanks to this thread and the Parallax Stampworks Manual I got the LCD working on a Basic Stamp 2 as well.This is the code I used;' {$STAMP BS2sx}' {$PBASIC 2.5}' -----[ Program Description ]---------------------------------------------------------------------------------'' This program demonstrates using a Maplin AMPY 2001/11 (Hitachi-compatible) parallel LCD'' -----[ I/O Definitions ]-------------------------------------------------------------------------------------RS PIN 9 ' LCD Register Select pin (9) (0 = Instruction, 1 = Text) to I/O pin 9 of BS2E PIN 10 ' Enable pin of LCD (10) to I/O pin 10 of BS2RW PIN 11 ' R/W pin (11) of LCD to I/O pin 11 of BS2DB4 PIN 12 ' LCD databus pins 4..7DB5 PIN 13 ' connect to BS2 I/O pins 12..15DB6 PIN 14 ' = 'D'DB7 PIN 15' -----[ variables ]-------------------------------------------------------char VAR Byte ' stuff to send to LCDi VAR Byte ' index, temp variablemaxchar CON 15 ' max nr of characters on one LCD line (16)LCDtext VAR Byte(maxchar) ' array space for LCD text' -----[ instructions ]----------------------------------------------------LCDcls CON $01 ' CLS instruction for LCD' LCDHome CON $02 ' other instructions (not used)' LCDcrsrL CON $10' LCDcrsrR CON $14' LCDdispL CON $18' LCDdispR CON $1C' -----[ EEPROM Data ]-----------------------------------------------------DATA "Hello World!",0 ' Message in EEPROM to send to LCD, 0 = terminator' -----[ Main Program ]----------------------------------------------------Main:PAUSE 2000 ' wait 2 sec to not confuse the PC after connecting USB cableGOSUB InitLcd ' Initialize the LCDi = 0READ i, char ' read first character from EEPROMDO WHILE char > 0 ' last character = 0DEBUG char ' show in debug window on PC screenGOSUB Sendtext ' and send character to LCDi = i+1 ' increment counter/indexREAD i, char ' read next characters from EEPROMLOOPDEBUG CR ' new line in debug windowPAUSE 2000 ' wait a while to show text on LCDLCDtext(0) = "B" ' fill variable array with charactersLCDtext(1) = "a"LCDtext(2) = "s"LCDtext(3) = "i"LCDtext(4) = "c"LCDtext(5) = " "LCDtext(6) = "S"LCDtext(7) = "t"LCDtext(8 ) = "a"LCDtext(9) = "m"LCDtext(10)= "p"LCDtext(11)= " "LCDtext(12)= "2"LCDtext(13)= "s"LCDtext(14)= "x"LCDtext(15)= " "char = LCDcls ' clear LCDGOSUB SendInstFOR i = 0 TO 15 ' read characters from arraychar = LCDtext(i)DEBUG char ' send to PC screenGOSUB sendtext ' send to LCDNEXTDEBUG CR ' new line in debug windowPAUSE 2000 ' wait to show textchar = LCDcls ' clear LCDGOSUB SendInstFOR i = 0 TO maxcharLOOKUP i, ["PARALLAX "], char ' use list to store textDEBUG char ' send to PC screenGOSUB Sendtext ' send character TO LCDNEXTDEBUG CRPAUSE 2000 ' wait to show textchar = LCDcls ' clear LCDGOSUB SendInstFOR i = 0 TO maxcharLOOKUP i, ["STAMPWORKS "], char ' send last text messageDEBUG charGOSUB SendtextNEXTDEBUG CRPAUSE 3000 ' wait to showchar = LCDcls ' clear LCDGOSUB SendInstEND ' done' =====[ Subroutines ] =================================================' -----[ LCD initialization ]--------------------------------------------------InitLcd:LOW RW ' set to write modeLOW RS ' set to instruction modeDIRD = %1111 ' D is all outputOUTD = %0100 ' Set to 4-bit OperationPULSOUT E,3 ' enable command' -----------------char = %00101000 ' Function set (2-Line Mode), 5x8 fontGOSUB SendInstchar = %00001110 ' Turn on cursorGOSUB SendInstchar = %00000110 ' Set auto-incrementGOSUB SendInstchar = LCDcls ' Clear displayGOSUB SendInstchar = 14 ' Set cursor to underlineGOSUB SendInstHIGH RS ' Set LCD to text mode; 1 = R/W dataRETURN ' initLCD' -------------------SendInst:LOW RS ' Set instruction mode; 0 = Write instructionGOSUB sendtext ' send to LCDHIGH RS ' Set LCD to text mode; 1 = R/W dataRETURN' -------------------Sendtext:OUTD = char.HIGHNIB ' Send high nibble to LCDPULSOUT E,3OUTD = char.LOWNIB ' Send low nibble to LCDPULSOUT E,3PAUSE 150RETURN' ===========================================================As shown in these pics;Now to get the second LCD line to work...

author: Ian.M
author_rank: Super Contributor
timestamp: September 17, 2016, 07:15:25 pm
content: The diagram including the switch, transistors and LEDs is not entirely accurate as there is actually a 10K pulldown for the switch (R9, next to the J2 header). Also its a P.I.T.A.working with a pin view diagram when breadboarding, so I flipped it and corrected it to get a top view version.