IS01BFRGB LCD SmartDisplay from NKK Switches Simple implementation featuring the ATmega88PA from Atmel Complete software solution

Similar documents
IS01BFRGB LCD SmartDisplay from NKK Switches Low cost implementation featuring the ATtiny13A from Atmel Complete software solution

AN2415 Application note

Part Number Terminals LCD Mode LED Color. * Simultaneous RGB illumination achieves infinite colors. Forward Current I F 20mA Power Dissipation P d mw

Hitachi Europe Ltd. ISSUE : app084/1.0 APPLICATION NOTE DATE : 28/04/99

SmartSwitch TM. Wide View LCD 36 x 24 Pushbutton DISTINCTIVE CHARACTERISTICS PART NUMBER & DESCRIPTION

Compact Size Perfect for rack mount router and other applications with space limitations.

Lecture 14: Computer Peripherals

HT8 MCU Integrated LCD Application Example (2) C Type Bias

SmartSwitch. Wide View LCD 36 x 24 Pushbuttons & Display DISTINCTIVE CHARACTERISTICS PART NUMBERS & DESCRIPTIONS

ECE 372 Microcontroller Design

USER MANUAL Nokia 5110 LCD

Figure 1: AHK1421 Evaluation Board Pictures.

Programmable Switches & Displays.

Alice EduPad Board. User s Guide Version /11/2017

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

NS8050U MICROWIRE PLUSTM Interface

8-BIT MCU WITH SINGLE VOLTAGE FLASH MEMORY, DATA EEPROM, ADC, TIMERS, SPI

RF4432 wireless transceiver module

Programmable High Resolution LCD Switches

Experiment 7 Fall 2012

16 Stage Bi-Directional LED Sequencer

AN4178 Application note

SPI Serial Communication and Nokia 5110 LCD Screen

Alice EduPad for Tiva or MSP432 TI ARM Launchpad. User s Guide Version /23/2017

Serial Peripheral Interface

uresearch GRAVITECH.US GRAVITECH GROUP Copyright 2007 MicroResearch GRAVITECH GROUP

STA2051E VESPUCCI 32-BIT SINGLE CHIP BASEBAND CONTROLLER FOR GPS AND TELEMATIC APPLICATIONS 1 FEATURES. Figure 1. Packages

LED Array Board.

Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li

Part 2 -- A digital thermometer or talk I2C to your atmel microcontroller

SmartSwitch TM. Wide View Compact LCD 64 x 32 Pushbutton DISTINCTIVE CHARACTERISTICS PART NUMBER & DESCRIPTION

Memec Spartan-II LC User s Guide

4.3inch 480x272 Touch LCD (B) User Manual

HCS08 SG Family Background Debug Mode Entry

MSP430-HG2231 development board Users Manual

IS Series Expanded Viewing Area

DMC550 Technical Reference

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

Chrontel CH7015 SDTV / HDTV Encoder

BASCOM-TV. TV Code Features: ICs supported: BASCOM versions:

Evaluation Board For ADF Integrated VCO & Frequency Synthesizer

APPLICATION NOTE. Atmel AVR32850: ATSAM4L-EK User Guide. Atmel SAM4L. Features. Introduction

Specification V1.1. NLC320F240BTM4 (Status: June 2010) Approval of Specification. Approved by. Admatec Customer

HT9B92 RAM Mapping 36 4 LCD Driver

Using the Siemens S65 Display

ABOV SEMICONDUCTOR 11 SEGMENT X 7 GRID LED DRIVER WITH KEYSCAN MC2302. Data Sheet (Ver. 1.20)

Universal ByteBlaster

Using the HT1628 for Washing Machine Panel Display

OLED Display Full Screen Color Pushbutton

EECS145M 2000 Midterm #1 Page 1 Derenzo

DESIGN AND DEVELOPMENT OF A MICROCONTROLLER BASED PORTABLE ECG MONITOR

VFD Driver/Controller IC

Senior Design Project: Blind Transmitter

GM60028H. DisplayPort transmitter. Features. Applications

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

RF4432F27 wireless transceiver module

AT18F Series Configurators. Application Note. Stand-alone or In-System Programming Applications for AT18F Series Configurators. 1.

JTAGcable II In Circuit Emulator for Atmel AVR microcontrollers. User s Guide REV 1.0. Many ideas one solution

FEATURES APPLICATIONS BLOCK DIAGRAM. PT6311 VFD Driver/Controller IC

XTAL Bank DDS Version 0.02 Sept Preliminary, highly likely to contain numerous errors

ABOV SEMICONDUCTOR 10 SEGMENT X 7 GRID LED DRIVER WITH KEYSCAN MC2102. Data Sheet (Ver. 1.21)

OLED Display Frameless Pushbutton

This document describes a program for 7-segment LED display (dynamic lighting).

This document describes a program for 7-segment LED display (dynamic lighting) and key matrix and input.

Interfacing the TLC5510 Analog-to-Digital Converter to the

FEATURES DESCRIPTION APPLICATION BLOCK DIAGRAM. PT6311 VFD Driver/Controller IC

DLP Pico Chipset Interface Manual

VFD Driver/Controller IC

LED Driver IC IK2108A TECHNICAL DATA. Description

GEKCO SUBCARRIER REFERENCE OSCILLATOR MODEL SRO10 OPERATION/SERVICE MANUAL

Very low-noise, high-efficiency DC-DC conversion circuit

Bill of Materials: Magic Color PART NO

An Introduction to CY8C22x45

Multi-channel LED driver with integrated boost controller for medium, large LCD panel backlight based on LED7708 and STM32F103C6T6A

Published in A R DIGITECH

AT03716: Implementation of SAM L Configurable Custom Logic (CCL) Peripheral. Description. SMART ARM-based Microcontrollers APPLICATION NOTE

2.13inch e-paper HAT (D) User Manual

Obsolete Product(s) - Obsolete Product(s)

GM68020H. DisplayPort receiver. Features. Applications

UM0534 User manual. STEVAL-MKI014V1 demonstration kit for the LIS344ALH. Introduction

GM69010H DisplayPort, HDMI, and component input receiver Features Applications

Revision: August 11, E Main Suite D Pullman, WA (509) Voice and Fax. 8 LEDs. Doc: page 1 of 9

Device: LDP This document Version: 1.1. Date: July Description: 64x16 1R1G LED Display Panel

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

1. Overview. SSI-1016G interfaces with 24, 25 and 26 bit Temposonics SSI sensor. Block diagram. as PNP open collector output

ITEM CONTENTS UNIT. Note 1: RoHS compliant. Note 2: LCM weight tolerance: ± 5%.

Using the Siemens S65 Display

Multi-Media Card (MMC) DLL Tuning

SparkFun Camera Manual. P/N: Sense-CCAM

Analog to Digital Conversion

Uni700 LCD Controller

WM8725 EVALUATION BOARD USER HANDBOOK. The WM8725 is high performance Stereo DAC.

MF 644 MULTIFUNCTION I/O DEVICE USER'S MANUAL

深圳市天微电子有限公司 LED DRIVER

Application Note. RTC Binary Counter An Introduction AN-CM-253

7inch Resistive Touch LCD User Manual

ADC0804C, ADC BIT ANALOG-TO-DIGITAL CONVERTERS WITH DIFFERENTIAL INPUTS

Configuring and using the DCU2 on the MPC5606S MCU

Comparing JTAG, SPI, and I2C

Transcription:

DKAN0003A Controlling the SmartDisplay with a SPI Peripheral 09 June 009 Features IS01BFRGB LCD SmartDisplay from NKK Switches Simple implementation featuring the ATmega88PA from Atmel Complete software solution Introduction The IS01BFRGB SmartDisplay is NKK s standard LCD, used in every 36x4 LCD SmartSwitch. It features a 36x4 pixel monochrome LCD with red, green, and blue LED backlights. This application note describes the display s interface and provides an example implementation using a SPI peripheral. Complete C source code for Atmel s AVR ATmega88PA is provided. Application LCD The IS01BFRGB LCD requires two supply voltages: 5VDC for logic (V DD ) and 7.3VDC typical for LCD contrast (V LC ). Each LCD row requires that 40 data bits be serially clocked into the data-in (Din) pin on the falling edge of the serial clock pulse (SCP). The LCD only displays the last 36 data bits; the first 4 data bits are ignored. After a row of data is received, the latch pulse (LP) pin is pulsed to load the data. The LP-to-LP timing diagram in Figure 1 shows a row of data bits latched by an LP pulse. Pulsing the LP while the first line marker (FLM) pin is high latches data into the first row. Each subsequent LP pulse latches the following row. Every 4 th row, the FLM resets the display to the first row. The LP-to-LP timing determines the refresh rate. NKK recommends a maximum LP-to-LP timing of 1.ms to avoid flicker. The supplied code, with the ATmega88PA s 1MHz internal oscillator, achieves this. Figure shows the timing diagram for a complete frame. Consult the datasheet for the timing specifications. It has been observed that a V LC of more than 8VDC enables a slower refresh rate (approximately 1.8ms) without flicker. Since this requires fewer computational resources, a slower microcontroller can be used, or more tasks can be completed. Beyond 8VDC and 1.8ms, this relationship between V LC and the refresh rate diminishes, and no advantage is gained. Page 1 of 7

Figure 1. LP-to-LP Timing Diagram Figure. Frame Timing Diagram Digi-Key Corporation Page of 7

Backlight The LCD s backlight consists of red, green, and blue LEDs. Figure 3 shows an example circuit. The current-limiting resistors and duty cycle of each PWM on the ATmega88PA control the backlight LEDs color and brightness. Refer to the datasheet for LED specifications. Vdd IS01BFRGB 10 Blue Red Green 1 8 R4 R5 R6 1 11 15 PD6 PD5 PB1 ATmega88PA Figure 3. LED Backlight Circuit Example Circuit Figure 4 shows an example circuit using the ATmega88PA to control the NKK IS01BFRGB SmartDisplay. An LM703 from National Semiconductor boosts V DD to 7.3VDC for the LCD contrast (V LC ). The ATmega88PA controls the LM703 shutdown pin, and the rheostat R controls V LC. Vdd C1 4.7uF 1 3 L1 10uH U1 5 SW Vin GND FBSHDN 4 LM703-M D1 SR10 R1 0K C 1.0uF 1 3 5 7 9 11 U Vlc LED(-) "G" 4 GND Vdd 6 Din SCP 8 LP LED(-) "R" 10 FLM LED (+) 1 Dout LED (-) "B" IS01BFRGB R4 8 R6 8 R5 150 R 50K C3.1uF Figure 4. Example Circuit SW1 N.O. R3 10K 1 3 4 5 6 7 8 9 10 11 1 13 14 U3 PC6 PD0 PD1 PD PD3 PD4 VCC GND PB6 PB7 PD5 PD6 PD7 PB0 8 PC5 7 PC4 6 PC3 5 PC 4 PC1 3 PC0 GND 1 AREF AVCC 0 19 PB5 18 PB4 17 PB3 16 PB 15 PB1 ATmega88PA-P Digi-Key Corporation Page 3 of 7

Code Figure 5 illustrates the program flow chart. Figure 5. Program Flow Chart Initialization The program begins with the initialization of the GPIO pins, interrupts, Timer0, Timer1, and the SPI peripheral. A pin change interrupt is enabled on PD, and the global interrupts are enabled. Timer0 and Timer1 are configured in a PWM mode to control the LED backlights. The SPI peripheral is configured for communication with the SmartDisplay. Table 1. Port IO ATmega88PA Pin Direction IS01BFRGB LM703 PB0 Output LP --- PB1 Output LED(-) "G" --- PB3 Output Din --- PB5 Output SCP --- PD7 Output FLM --- PD6 Output LED(-) "B" --- PD5 Output LED(-) "R" --- PD4 Output --- SHDN PD Input SW1 --- Digi-Key Corporation Page 4 of 7

PWM Timer0 and Timer1 control the LED backlight s brightness. Once the timers are configured as 8-bit inverted PWM outputs during initialization, each timer runs continuously. The timers have no prescaling, so they run at the same frequency as the CPU. Each PWM s duty cycle is set in the corresponding output compare register (OC0B, OC0A, or OC1A), providing individual LED control. Some PWM values are predefined in the code. SPI Port The SmartDisplay does not implement a standard SPI interface. However, a SPI port can communicate with it via its MOSI and SCK pins. The SPI peripheral is configured as a SPI Master in mode (Clock Polarity = 1, Clock Phase = 0). It is set up to transmit the LSB first and run at 6.5kHz. Pin Change Interrupt An interrupt is generated on both a button press and a button release. After a button release, the interrupt service routine switches to the alternate bitmap and resets the bit, column, and row pointers to start a new image. Bitmap The display is a 36x4 pixel format, but the bitmaps have a 40x4 format to incorporate the ignored bits. Each bit sets a pixel state (1=on, 0=off). In this example, each 10-byte bitmap is stored in internal Flash. (Note: the program inverts the OFF bitmap for visual differentiation.) Figure 6 illustrates the bitmap format. unsigned char IS01BFRGB_bitmap_1[4][5] PROGMEM = { { 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 }, / / Line #1 { 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 }, / / Line # { 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 }, / / Line #3 { 0b00000000, 0b01111000, 0b00000110, 0b00000110, 0b00000000 }, / / Line #4 { 0b00000000, 0b11111100, 0b00000110, 0b00000110, 0b00000000 }, / / Line #5 { 0b00000001, 0b10000110, 0b00000111, 0b00000110, 0b00000000 }, / / Line #6 { 0b00000011, 0b00000011, 0b00000111, 0b10000110, 0b00000000 }, / / Line #7 { 0b00000110, 0b00000001, 0b10000111, 0b10000110, 0b00000000 }, / / Line #8 { 0b00000110, 0b00000001, 0b10000111, 0b11000110, 0b00000000 }, / / Line #9 { 0b00000110, 0b00000001, 0b10000110, 0b11000110, 0b00000000 }, / / Line #10 { 0b00000110, 0b00000001, 0b10000110, 0b11100110, 0b00000000 }, / / Line #11 { 0b00000110, 0b00000001, 0b10000110, 0b01100110, 0b00000000 }, / / Line #1 { 0b00000110, 0b00000001, 0b10000110, 0b01110110, 0b00000000 }, / / Line #13 { 0b00000110, 0b00000001, 0b10000110, 0b00110110, 0b00000000 }, / / Line #14 { 0b00000110, 0b00000001, 0b10000110, 0b00111110, 0b00000000 }, / / Line #15 { 0b00000110, 0b00000001, 0b10000110, 0b00011110, 0b00000000 }, / / Line #16 { 0b00000011, 0b00000011, 0b00000110, 0b00011110, 0b00000000 }, / / Line #17 { 0b00000001, 0b10000110, 0b00000110, 0b00001110, 0b00000000 }, / / Line #18 { 0b00000000, 0b11111100, 0b00000110, 0b00000110, 0b00000000 }, / / Line #19 { 0b00000000, 0b01111000, 0b00000110, 0b00000110, 0b00000000 }, / / Line #0 { 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 }, / / Line #1 { 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 }, / / Line # { 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 }, / / Line #3 { 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 }, / / Line #4 }; Figure 6. Example Bitmap Digi-Key Corporation Page 5 of 7

Conclusion This application note presents a method of using the SPI interface to control the NKK SmartDisplay. It provides a complete software solution utilizing an ATmega88PA, allowing a simple, effective implementation. Additional Information DKAN000A: Bit-banging the SmartDisplay. Digi-Key Corporation. 09 June 009. Appendix: Parts List Part DK Part Number Description Mfg Part Number R1 10KQBK-ND RES 10K OHM 1/4W 5% CARBON FILM CFR-5JB-10K R 335H-503LF-ND POT 50K OHM THUMBWHEEL CERM ST 335H-1-503LF R3 0KQBK-ND RES 0K OHM 1/4W 5% CARBON FILM CFR-5JB-0K R4 330QBK-ND RES 330 OHM 1/4W 5% CARBON FILM CFR-5JB-330R R5 1.1KQBK-ND RES 1.10K OHM 1/4W 5% CARBON FILM CFR-5JB-1K1 R6 330QBK-ND RES 0K OHM 1/4W 5% CARBON FILM CFR-5JB-330R L1 811-1309-ND INDUCTOR RADIAL 10UH 1.6A R103C C1 445-867-ND CAP CER 4.7UF 16V Y5V RAD FK4Y5V1C475Z C 445-85-ND CAP CER 1UF 16V Y5V RAD FK8Y5V1C105Z C3 445-480-ND CAP CER.10UF 50V Y5V RAD FK8Y5V1H104Z D1 SR10DICT-ND DIODE SCHOTTKY 0V 1.0A DO-41 SR10-T U1 LM703MF-ADJCT-ND IC CONV DC/DC MICPWR SOT3-5 LM703MF-ADJ/NOPB U3 ATMEGA88PA-PU-ND MCU AVR 8K ISP FLASH MEM 8-DIP ATmega88PA-PU U 360-334-ND SMARTDISPLAY RED/GREEN/BLUE IS01BFRGB SW1 P8014S-ND 6MM LIGHT TOUCH SW W/GND H=5 EVQ-PBC05R or SW1/U 360-33-ND SMARTSWITCH STANDARD RGB IS15ABFP4RGB Digi-Key Corporation Page 6 of 7

Disclaimer This document is for informational use only and is subject to change without prior notice. Digi-Key makes no commitment to update or keep current the information contained herein. Digi-Key does not guarantee or warrant that any information provided is accurate, complete, or correct and disclaims any and all liability associated with the use of the information contained herein. The use of this information and Digi-Key s liability is subject to Digi-Key s standard Terms & Conditions which can be found at www.digi-key.com by clicking on the Terms & Conditions link at the bottom of the web page. No license, whether express, implied, arising by estoppel or otherwise is granted under any intellectual property or other rights of Digi-Key or others. Trademarks DIGI-KEY is a registered trademark of Digi-Key Corporation. All other trademarks, service marks and product names contained herein are the sole property of their respective owner and their use is for informational purposes only and does not imply any endorsement, recommendation, sponsorship or approval by the trademark owner of the contents. Copyright Use of this document is limited to customer s internal business use for the evaluation and purchase of products. No permission is granted to the user to copy, print, store, distribute, transmit, display in public or modify the content of this document in any way for any other purpose. Copyright 009 Digi-Key Corporation. All rights reserved. Digi-Key Corporation Page 7 of 7