When JP1 is cut, baud rate is Otherwise, baud rate is Factory default is that JP1 is shorted. (JP1 is jumper type in some model)

Similar documents
Embedded Systems. PIC16F84A Sample Programs. Eng. Anis Nazer First Semester

PIC 16F84A programming (II)

EEE111A/B Microprocessors

UNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2001/2002 RESIT. Year 2 MICROCONTROLLER SYSTEMS. Module Code: EEE305J1. Time allowed: 3 Hours

Lecture (04) PIC16F84A (3)

UNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2001/2002. Semester 2. Year 2 MICROCONTROLLER SYSTEMS. Module Code: EEE305J2. Time allowed: 3 Hours

ALCD (Advance LCD) SERIES

ME 6405 Introduction to Mechatronics

Dept. of Computer Engineering Final Exam, First Semester: 2016/2017

Flow Charts and Assembler Programs

Learning Objectives:

NH-67, TRICHY MAIN ROAD, PULIYUR, C.F , KARUR DT. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING COURSE MATERIAL

AN587. Interfacing to an LCD Module. Interfacing to an LCD Module INTRODUCTION OPERATION CONTROL SIGNAL FUNCTIONS TABLE 2: CONDITIONAL ASSEMBLY FLAGS

EE6008-Microcontroller Based System Design Department Of EEE/ DCE

M PIC16F84A. 18-pinEnhanced FLASH/EEPROM 8-Bit Microcontroller. High Performance RISC CPU Features: Pin Diagrams. Peripheral Features:

University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory

Lesson 14. Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27)

Assembly Language Instructions

LAB WORK 2. 1) Debugger-Select Tool-MPLAB SIM View-Program Memory Trace the program by F7 button. Lab Work

Embedded System Design

Outlines. PIC Programming in C and Assembly. Krerk Piromsopa, Ph.D. Department of Computer Engineering Chulalongkorn University

PIC16C84. 8-bit CMOS EEPROM Microcontroller PIC16C84. Pin Diagram. High Performance RISC CPU Features: CMOS Technology: Peripheral Features:

Weekly Report: Interactive Wheel of Fortune Week 4 02/014/07-02/22/07 Written by: Yadverinder Singh

which means that writing to a port implies that the port pins are first read, then this value is modified and then written to the port data latch.

PIC16F8X. 8-Bit CMOS Flash/EEPROM Microcontrollers PIC16F8X PIC16CR8X. Pin Diagram. Devices Included in this Data Sheet:

Jordan University of Science and Technology Electrical Engineering Department Microcontrollers and Embedded Systems Spring 2011

EE 361L Digital Systems and Computer Design Laboratory

DERTS Design Requirements (1): Microcontroller Architecture & Programming

Laboratory Exercise 5 - Analog to Digital Conversion

Chapter 4 Sections 1 4, 10 Dr. Iyad Jafar

PIC16C432 OTP 8-Bit CMOS MCU with LIN bus Transceiver

PIC16F8X 18-pin Flash/EEPROM 8-Bit Microcontrollers

The University of Texas at Arlington Lecture 5

PIC Discussion. By Eng. Tamar Jomaa

CONNECT TO THE PIC. A Simple Development Board

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Instuction set

Embedded Systems Design (630470) Lecture 4. Memory Organization. Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

PIC PROGRAMMING START. The next stage is always the setting up of the PORTS, the symbol used to indicate this and all Processes is a Rectangle.

Timer2 Interrupts. NDSU Timer2 Interrupts September 20, Background:

PIC16F84A. 18-pin Enhanced Flash/EEPROM 8-Bit Microcontroller. Devices Included in this Data Sheet: Pin Diagrams. High Performance RISC CPU Features:

ECE Test #1: Name

APPLICATION NOTE 2361 Interfacing an SPI-Interface RTC with a PIC Microcontroller

PICDEM-1 USER S GUIDE

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application...

PIC16F87X 13.0 INSTRUCTION SET SUMMARY INSTRUCTIONS DESCRIPTIONS

Embedded Systems Programming and Architectures

Week1. EEE305 Microcontroller Key Points

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4

Section 11. Timer0. Timer0 HIGHLIGHTS. This section of the manual contains the following major topics:

Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar

16.317: Microprocessor Systems Design I Fall 2013 Exam 3 Solution

CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT. Spring 2006

16.317: Microprocessor-Based Systems I Spring 2012

Discrete Logic Replacement A Keypad Controller for Bi-directional Key Matrix

Micro II and Embedded Systems

These 3 registers contain enable, priority,

Designed to GO... Universal Battery Monitor Using the bq2018 Power Minder IC. Typical Applications. Features. Figure 1. bq2018 Circuit Connection

Chapter 5 Sections 1 6 Dr. Iyad Jafar

Application Note - PIC Source Code v1.1.doc

Binary Outputs and Timing

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE Microcontroller Based System Design

D:\PICstuff\PartCounter\PartCounter.asm

CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK

PIC16C62X Data Sheet. EPROM-Based 8-Bit CMOS Microcontrollers Microchip Technology Inc. DS30235J

EECE.3170: Microprocessor Systems Design I Summer 2017 Homework 5 Solution

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE6008 Microcontroller based system design

TOPIC 3 INTRODUCTION TO PIC ASSEMBLY LANGUAGE. E4160 Microprocessor & Microcontroller System. Prepared by : Puziah Yahaya JKE, POLISAS / DEC 2010

Chapter 11: Interrupt On Change

Hardware Interfacing. EE25M Introduction to microprocessors. Part V. 15 Interfacing methods. original author: Feisal Mohammed

Outline. Micriprocessor vs Microcontroller Introduction to PIC MCU PIC16F877 Hardware:

Section 13. Timer0 HIGHLIGHTS. Timer0. This section of the manual contains the following major topics:

/* PROGRAM FOR BLINKING LEDs CONEECTED TO PORT-D */

Done 1 NVB THF TLF T/R POL 1SHOT. Figure 1: Status register

SOLUTIONS!! DO NOT DISTRIBUTE!!

APPLICATION NOTE Wire Communication with a Microchip PICmicro Microcontroller

Fortune. Semiconductor Corporation 富晶半導體股份有限公司. 8-bit MCU with 1k program ROM, 64-byte RAM, 1 R2F module and 3 13 LCD driver. TD Rev. 1.

PIC16F8X PIC16F8X. 18-pin Flash/EEPROM 8-Bit Microcontrollers

Experiment 7:The USART

Section 16. Basic Sychronous Serial Port (BSSP)

Chapter 13. PIC Family Microcontroller

ECE 354 Computer Systems Lab II. Interrupts, Strings, and Busses

PTK8756B 8 Bit Micro-controller Data Sheet

A Better Mouse Trap. Consumer Appliance, Widget, Gadget APPLICATION OPERATION: Ontario, Canada

ECE 354 Introduction to Lab 2. February 23 rd, 2003

movwf prevcod ; a new button is pressed - rcnt=3 movwf (mtx_buffer+1) movlw 3 movwf rcnt

Section 4. Architecture

SOLUTIONS!! DO NOT DISTRIBUTE PRIOR TO EXAM!!

More (up a level)... Connecting the Nokia 3510i LCD to a Microchip PIC16F84 microcontroller

LPTCOM. Bruce Misner Lakehead University h d3 RD2 pin 21. RD3 pin h d4. RD4 pin 27 RD5 pin h d5. RD6 pin 29 RD7 pin H d6

Explanation of PIC 16F84A processor data sheet Part 1: overview of the basics

PIC16F /40-Pin 8-Bit CMOS FLASH Microcontrollers. Devices Included in this Data Sheet: Pin Diagram PDIP. Microcontroller Core Features:

ECE Homework #3

PIC Discussion By Eng. Tamar Jomaa

Input/Output Ports and Interfacing

Discrete Logic Replacement Message Dispatch Engine

PIC16C52. EPROM-Based 8-Bit CMOS Microcontroller PIC16C52. Pin Diagrams. Feature Highlights. High-Performance RISC CPU. Peripheral Features

SOLAR TRACKING SYSTEM USING PIC16F84A STEPPER MOTOR AND 555TIMER

16.317: Microprocessor-Based Systems I Summer 2012

Chapter 3: Further Microcontrollers

Transcription:

ELCD SERIES INTRODUCTION ALCD is Serial LCD module which is controlled through Serial communication. Most of existing LCD adopts Parallel communication which needs lots of control lines and complicated control. On the other hand, ALCD adopts Serial communication which needs only one or two lines to transmit data and display it on LCD. In addition, ALCD allows users to use LCD with easy even they don t have comprehensive knowledge of LCD module. GENERAL DESCRIPTION Various size from 6x lines to 0x4lines lines-interface (, 5V, RX) 5V level of RSC protocol (select one of 900 and 4800 baud rate) Built-in functions such as location-control, screen-clear, cursor management and etc. MODEL Model Range of display Backlight ELCD-6 6 BY N/A ELCD-6-BL 6 BY LED ELCD-64 6 BY 4 N/A ELCD-64-BL 6 BY 4 LED ELCD-04 0 BY 4 N/A ELCD-04-BL 0 BY 4 LED ELCD-6-BIG 6 BY N/A ELCD-6-BIG-BL 6 BY LED LAYOUT & OUTLINE JP ERX RX <Piicture-> Front view <Picture-> Rear view When JP is cut, baud rate is 4800. Otherwise, baud rate is 900. Factory default is that JP is shorted. (JP is jumper type in some model) COMFILE Technology

ELCD SERIES ERX is port receiving 0V of RS signal directly. You can make direct control from PC with connection shown as the following picture. RX ELCDxxx PC RS (9 PIN) RD TD 4 5 6 7 8 9 ERX DIMENSION 80 75 64.5 98 9 76.5PIE 5 99 60 55 5. 44 7 4 6.6 ELCD6 or ELCD6-BL ELCD64 or ELCD64-BL ELCD04 or ELCD04-BL.5PIE ELCD6-BIG or ELCD6-BIG-BL Comfile Technology

ELCD SERIES COMFILE Technology CIRCUIT DRAWING VSS VDD VO RS R/W E B0 B B B B4 B5 B6 B7 A K U PIC6C7 RA RA RTCC MCLR 4 VSS 5 RB0 6 RB 7 RB 8 RB 9 RB4 0 RB5 RB6 RB7 VDD 4 OSC 5 OSC 6 RA0 7 RA 8 J CON R R J4 LCD 4 5 6 7 8 9 0 4 5 6 J 4800/900 R R R5 R R R4 R RESONATER X X

ELCD SERIES HOW TO USE Connect kines connector attached to LCD module to HOST. (Microcontroller and PC can be used as HOST), and connect 5V and, connect RX line to TX terminal of PC or I/O port of PICmicro. RX I/O Port ELCD module If you need to connect to RSC port of PC or other devices, you have to organize extra level conversion circuit as the following picture. Because that 0V flows through RSC line, you need to convert it into 5V level. If you use ERX port, it is same as using the following circuit. VCC_CIRCLE VCC_CIRCLE RSC TX 0K ohm RX 0Kohm NPN ELCD module Send 5V level of signal in the forms of 8bit, NONE parity, STOP bit to RX terminal of ELCD module. Bit Time 5V Start B0 B B B B4 B5 B6 B7 Stop Comfile Technology 4

ELCD SERIES Bit Time determines baud rate. When Bit Tine is 5mS, related baud rate is 900. When 04mS, then 4800 baud rate. To display characters on ELCD screen, you have to send data in the forms of command and data. For instance, when you send LOCATE command, you have to send 0AH, command code, first, and send two bytes of location data (X axis, Y axis) continuously. A0 0 0 The following table describes command code and format of ELCD. Command (Hexadecimal) Example Transmitte d bytes Execution time Description A0 A0 0mS A 0 A 0 A X Y A 0 0 A String 0 A 4 4 00 variable Initialize LCD There needs 0mS of delay at least after sending command. Clear LCD screen Display location is set at (0,0) automatically. Appoint location of display (X axis is from 0 to 0. Y axis is from 0 to ) Display characters on LCD screen 0 must be sent at end of string. (End Code) A 0C A 0C Cursor OFF A 0E A 0E Cursor ON (Default) A4 Code Data 8 A4 08 0 0 0B A0 AA A 80 0 0 Eight character code, from 8 to 5, is available for user-defined area. By sending certain BITMAP data to the area, users can display special codes. 5 COMFILE Technology

ELCD SERIES USAGE IN PICBASIC Because that PICBASIC has dedicated command for control serial LCD, users don t have to take care of LCD command code. They can use serial LCD module with ease by only LOCATE, PRINT, CLS, etc. (Refer to PICBASIC databook for detailed information). Refer to the following simple example. SET PICBUS HIGH CLS LOCATE 0,0 PRINT SERIAL LCD MOD. LOCATE 9, PRINT COMFILE HOW TO USE USER-DEFINED AREA ELCD has eight user-defined areas and users can stored certain BITMAP data in the area, and display on LCD screen. In order the process, PICBASIC uses BUSOUT command. The following example show how to display arrow mark on LCD. (BITMAP has 5*8 of size.) SET PICBUS HIGH LCDINIT BUSOUT &HA5,8,0,0,0,5,5,0,0,0 BUSOUT &HA5,9,0,&H0,&H8,&HC,&HC,&H8,&H0,0 LOCATE 0,0 PRINT 8,9 USAGE WITH PICMICRO (ASSEMBLY LANGUAGE) The following example is to control serial LCD by PICmicro in Assembly language. Although some devices which have built-in UART such as PIC6C7X can make it by hardware TX function, it is recommended to make it by software. In order to execute the following program, RX terminal of serial LCD must be connected to port0 of PORTB. (Device is PIC6C7 using 4MHz clock) The delay time used in the following program is for execution at 48 baud rate, 4MHz. : If you execute it at 900 baud rate, you should adjust the delay time. When you execute the program, 6x of serial LCD displays follows LINE : COMFILE TECHNOLO LINE : LCD CONTROLLER.. LIST P=6C7, F=INHX8M FILE DEFINITION INDIR EQU 00H PAGE 0 RTCC EQU 0H PC EQU 0H STATUS EQU 0H FSR EQU 04H PORTA EQU 05H PORTB EQU 06H PCLATH EQU 0AH Comfile Technology 6

ELCD SERIES OPTIONR EQU 0H PAGE PCL EQU 0H TRISA EQU 05H TRISB EQU 06H VARIABLE LOOP_CNT = 0CH VARIABLE BF = 0DH VARIABLE DELAY_TIMER = 0EH VARIABLE DELAY_TIMER = 0FH VARIABLE FETCH_SEQ = 0H #DEFINE IO_TX PORTB,0 BIT DEFINITION CF EQU.0 STATUS DC EQU. ZF EQU. PD EQU. TO EQU.4 RP0 EQU.5 RBIF EQU.0 INTCON REGISTER INTF EQU. RTIF EQU. RBIE EQU. INTE EQU.4 RTIE EQU.5 EEIE EQU.6 GIE EQU.7 INTEDG EQU.6 RBPU EQU.7 MAIN ROUTINE ORG 0 GOTO GOTO GOTO GOTO SIJAK SIJAK SIJAK SIJAK SIJAK RAM_CLEAR MOVLW 0CH MOVWF FSR RAM_ CLRF INDIR INCF FSR BTFSS FSR,6 GOTO RAM_ BSF MOVLW MOVWF STATUS,RP0 B'00000000' TRISA 7 COMFILE Technology

ELCD SERIES MOVLW B'00000000' MOVWF TRISB MOVLW B'0000' Enable Watch-dog,:8 MOVWF OPTIONR BCF STATUS,RP0 CLRF PCLATH ----------- MAIN PROC ----------- MOVLW 0A0H LCD initialization command MOVLW.00 DELAY aroud 600US DELAY_US MAIN_LOOP LINE_0 MOVLW 0AH LOCATE 0,0 MOVLW 00H ROW 0 MOVLW 00H COL 0 MOVLW 0AH String command (PRINT) NEXT_0 BTFSC FETCH_SEQ,4 GOTO NEXT_0 DATA0_TBL INCF FETCH_SEQ GOTO NEXT_0 NEXT_0 CLRF FETCH_SEQ MOVLW 00H End of string LINE_ MOVLW MOVLW MOVLW MOVLW 0AH TX_PROC 00H TX_PROC 0H TX_PROC 0AH TX_PROC NEXT_ BTFSC FETCH_SEQ,4 GOTO NEXT_ DATA_TBL INCF FETCH_SEQ GOTO NEXT_ NEXT_ CLRF FETCH_SEQ MOVLW 00H GOTO MAIN_LOOP Comfile Technology 8

ELCD SERIES 9 COMFILE Technology DATA0_TBL MOVF FETCH_SEQ,W ANDWF 0FH ADDWF PC 'C' 'O' 'M' 'F' 'I' 'L' 'E' ' ' 'T' 'E' 'C' 'H' 'N' 'O' 'L' 'O' DATA_TBL MOVF FETCH_SEQ,W ANDWF 0FH ADDWF PC 'L' 'C' 'D' ' ' 'C' 'O' 'N' 'T' 'R' 'O' 'L' 'L' 'E' 'R' '.' '.' TX_PROC MOVWF BF MOVLW.8 Because 8BIT transmission, MOVWF LOOP_CNT BCF IO_TX DELAY_ONE TX_ CLRWDT RRF BF BTFSS STATUS,CF BCF IO_TX BTFSC STATUS,CF BSF IO_TX DELAY_ONE DECFSZ LOOP_CNT GOTO TX_ BSF IO_TX DELAY_ONE

ELCD SERIES RETURN DELAY_ONE 4800-> 08US Delay(64), 9000->5US Delay (4) MOVLW.4 900 Baud Rate MOVLW.64 4800 Baud Rate DELAY_US MOVWF DELAY_TIMER DL_0 DECFSZ DELAY_TIMER GOTO DL_0 RETURN END USAGE WITH PICMICRO (C LANGUAGE) If you use C language, you can control serial LCD much simpler. The following example is for controlling serial LCD by CCS-C (PICmicro C-compiler, CCS) (Device is PIC6C7 using 4MHz clock) #include <6c7.h> #use delay(clock=4000000) // When 4MHz #use rs(baud = 900, xmit = PIN_B, rcv= PIN_B0) #byte TRISB = 0x85 #byte PORTB = 5 void main() { } char i TRISB = delay_ms(00) printf("%c%c",0xa,0xa) while() { // Wait for initialization of LCD // cls printf("%c%c%c",0xa,0,0) // locate 0,0 printf("%ccomfile SERIAL %c",0xa,0) printf("%c%c%c",0xa,0,) // locate 0, printf("%clcd MODULE%d %c",0xa,i,0) i++ } Comfile Technology 0