MILFORD INSTRUMENTS Ltd Rev 1.1 24/4/01 BPK LCD Driver Board Part 6-201 This note accompanies the following products: BPK LCD Driver Board- Part Number 6-201, Serial LCD 2x16, Part number 6-111 Serial LCD 2x20, Part number 6-121 Serial LCD 2x40, Part number 6-131 Serial LCD 4x20, Part number 6-141. Suitability The BPK Serial Driver Board is a daughterboard that attaches to LCD modules and converts the standard 4 or 8-bit parallel interface to a more easily managed serial interface at either 2,400 or 9,600 baud. It is compatible with all Hitachi 44780 controllers (or equivalents by OKI, Samsung etc) with up to 80 on-screen characters. It is not suitable for 4x40 displays. Connecting the BPK Board LCD Connection- Non Backlit LCDs The BPK board is supplied with SIL and DIL connectors- select the most appropriate connector for your LCD. Non-backlit LCDs will have either a 14x1 pin or 7x2 pin arrangement- the supplied connectors are 16x1 and 8x2- trim these down to suit the LCD. Solder the selected connector to the BACK (component, non-display side) of the LCD using the shorter length pins. Place the two double-sided foam pads on the back of the LCD to prevent the LCD and driver boards from touching. Position the driver board over the header- ensure that pin 1 is connected to pin 1 and that BPK pins 15 and 16 remain un-connected. Solder in place LCD Connection- LCDs with Backlighting The BPK board is supplied with SIL and DIL connectors- select the most appropriate connector for your LCD. Backlit LCDs will have either a 16x1 pin or 8x2 pin arrangement- the BPK board assumes the back-lighting will be connected to pins 15 (Anode) and 16 (Kathode) check this configuration is correct before proceeding further. Solder the selected connector to the BACK (component, non-display side) of the LCD using the shorter length pins. Place the two double-sided foam pads on the back of the LCD to prevent the LCD and driver boards from touching. Position the driver board over the header- ensure that pin 1 is connected to pin 1. Solder in place Connecting up the Driver Board/LCD The Driver Board requires just 3 connections, incoming signal, ground and +5v at approximately 2mA (excluding back-lighting) making it suitable for driving from either of the BASIC Stamps. DB-9 Socket Connect the signal line to pin 3 and ground to pin 5. Some PC software requires handshaking so you may need to make the following connections: 1 to 4 to 6 7 to 8 DB-25 Socket Connect the signal line to pin 2 and ground to pin 7. Additional connections that may be needed are: Pin 4 to 5 Pin 6 to 8 to 20. Reg OfficeReg Office: Milford House, 120 High Street, South Milford, LEEDS LS25 5AQ United Kingdom: Milford House, 120 High Street, South Milford, LEEDS LS25 5AQ United Kingdom Reg NumberReg Number: 4222329 Tel: 01977 683665 Fax 01977 681465 www.milinst.com: 4222329 Tel: 01977 683665 Fax 01977 681465 www.milinst.com Configuration Back-Lighting (if fitted) Power for the back-lighting is supplied via the 3-pin header. The back-lighting is selected On or OFF by the B/L jumper. The back-lighting current is set by resistor RBL to approximately 200mA (0.8V/3R9) or 170mA (0.8V/4R7) for the 6-111 and 6-201 products. RBL may be adjusted to suit particular LCDs but always ensure the maximum back-lighting current is not exceeded. The Driver Board includes two jumpers to configure the LCD. Note the configuration is read on power-up and is retained until powered up again. One or Two Lines The LCD can be configured to operate with either 1 or 2 lines of display. With the line jumper installed the display uses 2 lines. Baud Rate The Driver Board will accept RS-232 signals at either 2400 Baud (jumper missing) or 9600 Baud (jumper installed). Display The potentiometer on the BPK board adjusts the display contrast- it has been adjusted at the factory but may be further adjusted to suit local lighting conditions. Self-Test Connect the serial input pin to the +5V pin and switch on to display the firmware version. Programming Text for display on the LCD must be sent serially at either 2400 or 9600 baud, no parity, 8 bits, 1 stop bit and inverted format. Instructions to the LCD must be prefixed by the single byte <254> which will put the LCD into Instruction mode. The LCD automatically reverts to Display mode once an instruction is received. Note that LCDs require approximately 500ms to settle down after powering up and data/control codes should not be sent to it during this period. Similarly a pause of 10ms should be inserted after a Clear Screen or Home command before other data is sent. Programming examples are listed below: Parallax BASIC Stamps With the LCD serial line connected to pin 0 the following programme line should display the wordHell SEROUT 0, N2400, Hell) -Make sure the LCD is set for 2400Baud transfer and for the Stamp2: SEROUT 0,84+ 4000,Hell -Make sure the LCD is set for 9600 Baud transfer The LCD will accept all the common control codes. To differentiate between control codes and normal characters the LCD must first be sent the code 254. To clear the LCD screen therefore (control code 1): SEROUT 0,N2400,(254,1) Once the control code has been received the LCD will revert back to normal operation (ie expect to receive a normal character). The other control codes you may need are as follows: Instruction/Action Code Clear Screen 1 Reg OfficeReg Office: Milford House, 120 High Street, South Milford, LEEDS LS25 5AQ United Kingdom: Milford House, 120 High Street, South Milford, LEEDS LS25 5AQ United Kingdom Reg NumberReg Number: 4222329 Tel: 01977 683665 Fax 01977 681465 www.milinst.com: 4222329 Tel: 01977 683665 Fax 01977 681465 www.milinst.com