마이크로프로세서응용. ATmega128 7 Segment Driving

Size: px
Start display at page:

Download "마이크로프로세서응용. ATmega128 7 Segment Driving"

Transcription

1 마이크로프로세서응용 ATmega128 7 Segment Driving

2 7 Segment Pin Assignment b g a c X f X X Front Side EN1 EN2 d X e EN3 dp EN4 EN4 EN3 EN2 EN1 f d a g d b c dp

3 7 Segment Connection with AVR128 U1 PB.7 PB.6 PB.5 PB.4 f d a g d b c dp ATmega 128 PC.0 PC.1 PC.2 PC.3 PC.4 PC.5 PC.6 PC.7 R(330 Ohm) dp g f e d cb a

4 7 Segment Drive Example Code (1) 첫번째 7 세그먼트에 0~9 까지돌아가면서표시하는프로그램.include "m128def.inc".def temp = r16.def leddata = r17.def segen = r18.def segcnt = r19 rjmp RESET ;Reset Handle.ORG 0x0046; RESET: ldi temp,low(ramend) ; Load low byte address of end of RAM into register R16 out SPL,temp ; Initialize stack pointer to end of internal RAM ldi temp,high(ramend) ; Load high byte address of end of RAM into register R16 out SPH, temp ; Initialize high byte of stack pointer to end of internal RAM ldi temp, $0F ; Set lower 4 bits of port A as output out DDRA, temp ; ldi temp, $F0 ; Set upper 4 bits of port B as output out DDRB, temp ; ser temp ; out DDRC, temp ; Set Port C as outputs

5 7 Segment Drive Example Code (2) 첫번째 7 세그먼트에 0~9 까지돌아가면서표시하는프로그램 ldi leddata, $0F ; ldi segen, $10 ; Enable signal for the first character of 7 segment array out PORTB, segen ; forever : out PORTA, leddata ; com leddata ; complement leddata ; Load start address of segment data in program memory pointed by segdata ldi ZH, HIGH(2*segdata) ; Since program memory is 16 bit (2 byte) ldi ZL, LOW(2*segdata) ; we have to multiply 2 at the starting index loop10: ldi segcnt, 10 ; lpm r0, Z+ ; Get first segment data, increase the pointer out PORTC, r0 ; Put the data to port B rcall delay1s ; subi segcnt, 1 ; brne loop10 ; Check if loop count is zero or not rjmp forever

6 7 Segment Drive Example Code (3) 첫번째 7 세그먼트에 0~9 까지돌아가면서표시하는프로그램 delay1s: loop: segdata: ldi r20, 40 ldi r21, 255 ldi r22, 255 dec brne dec brne dec brne ret r22 loop r21 loop r20 loop.db $03, $9f, $25, $0d, $99, $49, $41, $1f, $01, $09

7 마이크로프로세서응용 7 ATmega128 Assembly Language Programming

8 Lab #1 : Swap Data 8 bit DATA swap : Input : value1 ($0100) = $73 value2 ($0101) = $74 Output: ($0100) = $74 ($0101) = $73 value result $73 $74 value result $74 $73

9 Lab #2 : Find Maximum Find the Maximum data in $0100, $0101, and $0102. Store the result to $0103. Input : ($0100) = $12 ($0101) = $34 ($0102) = $56 $0100 $0101 $0102 $12 $34 $56 Output: ($0103) = $ Input : ($0100) = $56 ($0101) = $34 $0100 ($0102) = $12 $0101 Output: ($0103) = $56 $0102 $0103 $12 $34 $56 $56

10 Lab #3 : Accumulate Odd number Calculate the sum = Output : Result ($0100) = $37 $0100???? $0100 $37

11 Lab #4 : Accumulate Even number (16bit) Calculate the sum = Output : Result ($0100) = $37 $0100???? $0100 $0101 $BA $13

12 Lab #5 : Find Negative number Determine the number of negative elements : Input : Length ($0100) = 03 data ($0101) = $84 ($0102) = $25 ($0103) = $96 Total ($0104) = 1($84)+0($25)+1($96) = 2 $0100 $0101 $0102 $0103 $0100 $0101 $0102 $0103 $ $84 $25 $96 03 $84 $25 $96 2

13 Lab #6 : Find the number of 1s Determine the number with most 1s: Input : Length ($0100) = 03 ( )=>2 data ($0101) = $84 ( )=>2 ($0102) = $25 ( )=>3 ($0103) = $96 ( )=>4 result ($0104) = $96 $0100 $0101 $0102 $ $84 $25 $96 $0100 $0101 $0102 $0103 $ $84 $25 $96 $96

14 8 수고하셨습니다

15 [GEC] Green Electronics company GEC09B-1 Case: Noryl,Black Pin:Tin-plated copper TYPE UNIT GEC09B-1 Min. Sound Output at 10cm db 85 Rated Voltage V 0-p 1.5 Operating Voltage V 0-p 1 2 Resonant Frequency Hz 2730 Max. Current Consumption ma 80 Coil Resistance Ω 6 1 Coil Impedance Ω 15 Operating Temperature Storage Temperature Weight g 0.7 Value applying at (rated voltage, 2730 Hz, 1/2 duty square wave) Value applying at (2730 Hz, sine wave,measuring current 60 A) DIMENSIONS : (Unit: mm) FREQUENCY RESPONSE: kklist101@hanmail.net Home page :

16 SPECIFICATION SHEET CUSTOMER: PRODUCT: ELECTROMAGNETIC TRANSDUCER MODEL NUMBER: G09B-1 [GEC] GREEN ELECTRONICS CO., LTD. TEL: FAX: ADD: POST CODE:

17 WE HERE APPLY FOR AUTHORIZATION TO SUPPLY THE ABOVE MENTIONED ON THE BASIS OF THE FOLLOWING SPECIFICATIONS. 1. SCOPE THESE SPECIFICATIONS APPLIED TO THE ABOVE MENTIONED ELECTROMAGNETIC TRANSDUCER. 2. MECHANICAL CHARACTERISTICS 2-1 EXTERNAL DIMENSION THE EXTERNAL DIMENSION, INDICATION ARE AS SHOWN IN DRAWING SHEETS. 2-2 APPEARANCE THE FINISHING SHALL NOT BE ACCOMPANIED BY REMARKABLE RUST,DISTORTION, CREAK,ETC. 2-3 TENSILE STRENGTH OF TERMINAL PINS EACH TERMINAL PIN SHALL BE NO ABNORMALITY WHEN THE EQUIPMENT IS PROPERLY FIXED AND 1kg OF LOAD IS GIVEN FOR 30 5 SECONDS IN AXIS DIRECTION OF TERMINAL. 3. ELECTRICAL CHARACTERISTICS(AT 25 ) 3-1 OPERATING VOLTAGE : 1-2V 3-2 RATED VOLTAGE : 1.5V 3-3 RESONANT FREQUENCY : 2730 Hz 3-4 RATED CURRENT : 80mA MAX. 3-5 SOUND PRESSURE LEVEL : 85dB MIN. 3-6 COIL RESISTANCE : 6 1 OHM 3-7 COIL IMPEDANCE : 15 OHM 3-8 OPERATING TEMPERATURE : STORAGE TEMPERATURE : DATE: PAGE:1/5 PRODUCT SPECIFICATION G09B-1 (ELECTROMAGNETIC TRANSDUCER) CUSTOMER: PRODUCER:

18 4. RELIABILITY TEST NO. ITEM TESTING CONDITION VARIANCE AFTER TEST 4-1 HUMIDITY 55 5,95 3%RH 96HRS 4-2 HIGH TEMP ,96HRS 4-3 LOW TEMP ,96HRS MINUTES 4-4 TEMPERATURE CYCLING ROOM TEMP ROOM TEMP. 10 MINUTES SOUND PRESSURE LEVEL INITIAL VALUE 10% 30 MINUTES 10 MINUTES 5 CYCLES 4-5 DROP TEST 3 TIMES FROM HEIGHT OF 50CM ON CONCRETE FLOOR NOTE: 1. TEST ITEM 4-4 AND 4-5 SHALL BE CONDUCTED WITH CIRCUIT STATE. 2. TEST SPECIMENS SHALL BE KEPT FOR 4 HRS,25 BEFORE MEASUREMENT. DATE: PAGE:2/5 PRODUCT SPECIFICATION G09B-1 (ELECTROMAGNETIC TRANSDUCER) CUSTOMER: PRODUCER:

19 5. ELECTRICAL CHARACTERISTICS TEST METHOD C.MIC C.CC S.A. 10 cm Q.S.C. F.C. T.S. A.V.M. A.A.M. S.R. S.A. : SPECTRUM ANALYAER F.C. : FREQUENCY COUNTER A.A.M.: AC AMPERE METER S.R. : SOUNDPROOF ROOM A.V.M.: AC VOLT. METER C.MIC : CONDENSER MIC T.S. : TEST SAMPLE Q.S.C.: OSCILLATOR DATE: PAGE:3/5 PRODUCT SPECIFICATION G09B-1 (ELECTROMAGNETIC TRANSDUCER) CUSTOMER: PRODUCER:

20 6.DIMENSION (UNIT:mm) DATE: PAGE:4/5 PRODUCT SPECIFICATION G09B-1 (ELECTROMAGNETIC TRANSDUCER) CUSTOMER: PRODUCER:

21

22

23 마이크로프로세서응용 9 ATmega128 Assembly Language Programming Character LCD Module Control

24 Outline 2 AVR LCD Module Connection We will examine several subroutines Delay n usec subroutine Delay 1usec subroutine Delay n msec subroutine Delay 1msec subroutine LCD Initialization subroutine LCD write4 subroutine LCD write_command, LCD write_data subroutines

25 Outline 3 Delay n usec subroutine Delay 1usec subroutine Delay n msec subroutine Delay 1msec subroutine LCD Initialization subroutine LCD write4 subroutine LCD write_command, LCD write_data subroutines

26 AVR LCD Connection Diagram(Port C) 4 LCD Module ATmega 128 VSS VDD VL RS R/W E D0 D1 D2 D3 D4 D5 D6 D7 A K GND +5V?V Port C0 GND Port C2 Port C4 Port C5 Port C6 Port C7 +5V GND Port C0 Port C1 Port C2 Port C3 Port C4 Port C5 Port C6 Port C7 ; LCD interface ; Port C is used for LCD Module Control.equ lcd_d7_port = PORTC ; lcd D7 connection.equ lcd_d7_bit = PORTC7.equ lcd_d7_ddr = DDRC.equ lcd_d6_port = PORTC ; lcd D6 connection.equ lcd_d6_bit = PORTC6.equ lcd_d6_ddr = DDRC.equ lcd_d5_port = PORTC; lcd D5 connection.equ lcd_d5_bit = PORTC5.equ lcd_d5_ddr = DDRC.equ lcd_d4_port = PORTC; lcd D4 connection.equ lcd_d4_bit = PORTC4.equ lcd_d4_ddr = DDRC.equ lcd_e_port = PORTC; Enable pin.equ lcd_e_bit = PORTC2.equ lcd_e_ddr = DDRC.equ lcd_rs_port = PORTC ; Register Select pin.equ lcd_rs_bit = PORTC0.equ lcd_rs_ddr = DDRC +5V?V GND

27 AVR LCD Connection Diagram(Port D) 5 LCD Module ATmega 128 VSS VDD VL RS R/W E D0 D1 D2 D3 D4 D5 D6 D7 A K GND +5V?V Port D0 GND Port D2 Port D4 Port D5 Port D6 Port D7 +5V GND Port D0 Port D1 Port D2 Port D3 Port D4 Port D5 Port D6 Port D7 ; LCD interface ; Port D is used for LCD Module Control.equ lcd_d7_port = PORTD ; lcd D7 connection.equ lcd_d7_bit = PORTD7.equ lcd_d7_ddr = DDRD.equ lcd_d6_port = PORTD ; lcd D6 connection.equ lcd_d6_bit = PORTD6.equ lcd_d6_ddr = DDRD.equ lcd_d5_port = PORTD; lcd D5 connection.equ lcd_d5_bit = PORTD5.equ lcd_d5_ddr = DDRD.equ lcd_d4_port = PORTD; lcd D4 connection.equ lcd_d4_bit = PORTD4.equ lcd_d4_ddr = DDRD.equ lcd_e_port = PORTD; Enable pin.equ lcd_e_bit = PORTD2.equ lcd_e_ddr = DDRD.equ lcd_rs_port = PORTD ; Register Select pin.equ lcd_rs_bit = PORTD0.equ lcd_rs_ddr = DDRD +5V?V GND

28 LCD Initialization Routine 6 START Wait 80 us Write LCD Entry Mode Command (CMD = 0x06) Wait 100 ms Write Function Reset Command (CMD = 0xC0) Wait 10 ms Write Function Reset Command (CMD = 0xC0) Wait 200 us Write Function Set Command (4 Bit Mode, 2 line LCD, 5x7 font) (CMD = 0x20) Write Function Set Command (2) (4 Bit Mode, 2 line LCD, 5x7 font) (CMD = 0x20) Wait 80 us Write LCD OFF Command (CMD = 0x08) Wait 80 us Write LCD CLR Command (CMD = 0x01) Wait 4 ms Wait 80 us Write LCD ONCommand (CMD = 0x0C) END

29 LCD Command Table 7 0x01 0x06 0x08/ 0x0C 0xC0 0x28

30 LCD Test Program Architecture 8 Main Program LCD_Init LCD_Write_String LCD_Write4 LCD_Command LCD_Command LCD_Write_Character LCD_Write4 LCD_Write4 LCD_Write4

31 Main Program for Simple LCD Display.include "m128def.inc".equ fclk = ; system clock frequency (for delays) ; register usage.def temp = R16 ; temporary storage ; LCD interface (should agree with the diagram above) ; make sure that the LCD RW pin is connected to GND.equ lcd_d7_port = PORTC ; lcd D7 connection.equ lcd_d7_bit = PORTC7.equ lcd_d7_ddr = DDRC.equ lcd_d6_port = PORTC ; lcd D6 connection.equ lcd_d6_bit = PORTC6.equ lcd_d6_ddr = DDRC.equ lcd_d5_port = PORTC ; lcd D5 connection.equ lcd_d5_bit = PORTC5.equ lcd_d5_ddr = DDRC.equ lcd_d4_port = PORTC ; lcd D4 connection.equ lcd_d4_bit = PORTC4.equ lcd_d4_ddr = DDRC.equ lcd_e_port = PORTC ; lcd Enable pin.equ lcd_e_bit = PORTC2.equ lcd_e_ddr = DDRC.equ lcd_rs_port = PORTC ; lcd Register Select pin.equ lcd_rs_bit = PORTC0.equ lcd_rs_ddr = DDRC

32 Main Program for Simple LCD Display (2) ; LCD module information.equ lcd_lineone = 0x00 ; start of line 1.equ lcd_linetwo = 0x40 ; start of line 2 ; LCD instructions.equ lcd_clear = 0b ; replace all characters with ASCII 'space'.equ lcd_home = 0b ; return cursor to first position on first line.equ lcd_entrymode = 0b ; shift cursor from left to right on read/write.equ lcd_displayoff = 0b ; turn display off.equ lcd_displayon = 0b ; display on, cursor off, don't blink character.equ lcd_functionreset = 0b ; reset the LCD.equ lcd_functionset4bit = 0b ; 4-bit data, 2-line display, 5 x 7 font.equ lcd_setcursor = 0b ; set cursor position.cseg.org 0x000 ; JMP RESET ;.ORG 0x0046; ;*********************************************** ;* Main Program ;*********************************************** RESET: ; initialize the stack pointer to the highest RAM address ldi temp,low(ramend) out SPL,temp ldi temp,high(ramend) out SPH,temp ldi temp, $FF ; out DDRC, temp ;

33 Main Program for Simple LCD Display (3) ; initialize the LCD controller as determined by the equates (LCD instructions) call LCD_Init ; initialize the LCD display for a 4-bit interface ; display the first line of information ldi ZH, high(version) ; point to the information that is to be displayed ldi ZL, low(version) ldi temp, lcd_lineone ; point to where the information should be displayed call lcd_write_string ; display the second line of information ldi ZH, high(author) ; point to the information that is to be displayed ldi ZL, low(author) ldi temp, lcd_linetwo ; point to where the information should be displayed call lcd_write_string ; endless loop HERE: rjmp HERE AUTHOR:.db write author info",0,0 VERSION:.db write version info",0,0

34 Subroutine : LCD Initialization ; ; Name: LCD_Init ; Purpose: LCD initialization for 4 Bit Data I/F ; Entry: No parameters ; Notes: Use time delays instead of checking ; the busy flag LCD_Init: ldi temp, 100 ; initial 100ms delay call delay_tms ; Set up the RS and E lines for the 'lcd_write_4' subroutine. ; select the Instruction Register (RS low) ; make sure E is initially low cbi lcd_rs_port, lcd_rs_bit cbi lcd_e_port, lcd_e_bit ; Reset the LCD controller. ldi temp, lcd_functionreset call lcd_write_4bit ldi temp, 10 call delay_tms ldi temp, lcd_functionreset call lcd_write_4bit ldi temp, 200 call delay_tus ldi temp, lcd_functionreset call lcd_write_4 ldi temp, 200 call delay_tus ; Preliminary Function Set instruction - used only to set the 4-bit mode. ; The number of lines or the font cannot be set at this time since ; the controller is still in the ; 8-bit mode, but the data transfer mode can be changed since this ;parameter is determined by one of the upper four bits of the instruction. ldi temp, lcd_functionset4bit ; set 4-bit mode call lcd_write_4bit ldi temp, 80 ; 80 us delay call delay_tus ; Function Set instruction ldi temp, lcd_functionset4bit ; set mode, lines, and font call lcd_write_command ldi temp, 80 ; 80 us delay call delay_tus ; Display On/Off Control instruction ldi temp, lcd_displayoff ; turn display OFF call lcd_write_command ldi temp, 80 ; 80 us delay call delay_tus ; Clear Display instruction ldi temp, lcd_clear ; clear display RAM call lcd_write_command ldi temp, 4 ; 4 ms delay call delay_tms ; Entry Mode Set instruction ldi temp, lcd_entrymode ; set desired shift ;characteristics call lcd_write_command ldi temp, 80 ; 80 us delay call delay_tus

35 Subroutine : LCD Initialization (2) ; This is the end of the LCD controller initialization as specified in the data sheet, but the display ; has been left in the OFF condition. This is a good time to turn the display back ON. ; Display On/Off Control instruction ldi temp, lcd_displayon ; turn the display ON call lcd_write_command ldi temp, 80 ; 80 us delay call delaytx1us ret

36 Subroutine : LCD_Write_4Bit.include "m128def.inc.def temp = r16.equ FCLK = ; LCD interface ; make sure that the LCD RW pin is GND.equ lcd_d7_port = PORTC ; lcd D7 connection.equ lcd_d7_bit = PORTC7.equ lcd_d7_ddr = DDRC.equ lcd_d6_port = PORTC ; lcd D6 connection.equ lcd_d6_bit = PORTC6.equ lcd_d6_ddr = DDRC.equ lcd_d5_port = PORTC; lcd D5 connection.equ lcd_d5_bit = PORTC5.equ lcd_d5_ddr = DDRC.equ lcd_d4_port = PORTC; lcd D4 connection.equ lcd_d4_bit = PORTC4.equ lcd_d4_ddr = DDRC.equ lcd_e_port = PORTC; lcd Enable pin.equ lcd_e_bit = PORTC2.equ lcd_e_ddr = DDRC.equ lcd_rs_port = PORTC ; lcd Register Select pin.equ lcd_rs_bit = PORTC0.equ lcd_rs_ddr = DDRC ; ; Name: LCD_Write_4Bit ; Purpose: send a nibble (4-bits) of information to the ; LCD module ; Entry: (temp) contains a byte of data with the ; desired 4-bits in the upper nibble ; (RS) is configured for the desired LCD register ; (E) is low ; (RW) is low LCD_Write_4Bit: ; set up D7 sbi lcd_d7_port, lcd_d7_bit ; sbrs temp, 7 ; cbi lcd_d7_port, lcd_d7_bit ; ; set up D6 sbi lcd_d6_port, lcd_d6_bit sbrs temp, 6 cbi lcd_d6_port, lcd_d6_bit ; set up D5 sbi lcd_d5_port, lcd_d5_bit sbrs temp, 5 cbi lcd_d5_port, lcd_d5_bit ; set up D4 sbi lcd_d4_port, lcd_d4_bit sbrs temp, 4 cbi lcd_d4_port, lcd_d4_bit

37 Subroutine : LCD_Write_4Bit ; write the data ; 'Address set-up time' (40 ns) sbi lcd_e_port, lcd_e_bit ; Enable pin high call delay1us ; implement 'Data set-up time' (80 ns) and 'Enable pulse width' (230 ns) cbi lcd_e_port, lcd_e_bit ; Enable pin low call delay1us ; implement 'Data hold time' (10 ns) and 'Enable cycle time' (500 ns) ret ;

38 Subroutine : LCD Write Command (4Bitx2) ; ; Name: LCD_write_command ; Purpose: send a byte of information to the LCD instruction register ; Entry: (temp) contains the data byte ; Exit: no parameters ; Notes: does not deal with RW (busy flag is not implemented) LCD_write_command: cbi lcd_rs_port, lcd_rs_bit ; select the Instruction Register (RS low) cbi lcd_e_port, lcd_e_bit ; make sure E is initially low call lcd_write_4 ; write the upper 4-bits of the instruction swap temp ; swap high and low nibbles call lcd_write_4 ; write the lower 4-bits of the instruction ret

39 Subroutine : LCD Write Character (4Bitx2) ; ; Name: lcd_write_character ; Purpose: send a byte of information to the LCD data register ; Entry: (temp) contains the data byte ; Exit: no parameters ; Notes: does not deal with RW (busy flag is not implemented) LCD_write_character: sbi lcd_rs_port, lcd_rs_bit ; select the Data Register (RS high) cbi lcd_e_port, lcd_e_bit ; make sure E is initially low call lcd_write_4 ; write the upper 4-bits of the data swap temp ; swap high and low nibbles call lcd_write_4 ; write the lower 4-bits of the data ret

40 Subroutine : LCD_write_String ; ; Name: lcd_write_string_4d ; Purpose: display a string of characters on the LCD ; Entry: ZH and ZL pointing to the start of the string ; (temp) contains the desired DDRAM address at which to start the display ; LCD_write_string: ; set up the initial DDRAM address ori temp, lcd_setcursor ; convert the plain address to a set cursor instruction call LCD_write_command ; set up the first DDRAM address ldi temp, 80 ; 80 us delay call delay_tus ; write the string of characters lcd_write_string_01: lpm temp, Z+ ; get a character cpi temp, 0 ; check for end of string breq lcd_write_string_02 ; done ; arrive here if this is a valid character call lcd_write_character ; display the character ldi temp, 80 ; 80 us delay call delay_tus rjmp lcd_write_string_01 ; not done, send another character ; arrive here when all characters in the message have been sent to the LCD module lcd_write_string_4d_02: ret

41 Subroutine : Delay_1uS.include "m128def.inc.def temp = r16 ;.CSEG.ORG 0x0000 ; JMP RESET ;*********************************************** ;* Main Program ;***********************************************.ORG 0x0046; RESET: ldi r16,low(ramend) ; out SPL,r16 ; ldi r16,high(ramend); out SPH, r16; call forever: Delay_1uS; rjmp forever ; ; ; Name: delay1us ; Purpose: provide a delay of 1 us with a 16 MHz clock ; frequency ; Entry: no parameters ; Exit: no parameters delay1us: push temp ; [2] pop temp ; [2] push temp ; [2] pop temp ; [2] ret ; [4] ; usec in 16 Mhz clock requires 16 clock cycle. Since the subroutine call consumes 4 clock cycles, only 12 cycles should be consumed in the delay subroutine.

42 Subroutine : Delay_TuS.include "m128def.inc.def temp = r16.cseg.org 0x0000 ; JMP RESET ;*********************************************** ;* Main Program ;***********************************************.ORG 0x0046; RESET: ldi r16,low(ramend) ; out SPL,r16 ; ldi r16,high(ramend); out SPH, r16; ldi temp, 10 ; call Delay_TuS; ; ; Name: Delay_Tus ; Purpose: provide a delay of (temp) x 1 us with ; a 16 MHz clock frequency ; Entry: (temp) = delay time in usec ; Exit: no parameters Delay_Tus: call delay_1us ; delay for 1 us (16) dec temp ; decrement the delay counter (1) brne Delay_Tus ; counter is not zero (2) ; arrive here when delay counter is zero ret ; (4) ; Delay_T usec does not guarantee the exact T usec. Note that additional 3 cycles are consumed in a loop. So this subroutine can not be used in measuring exact timing. forever: rjmp forever ;

43 Subroutine : Delay_1mS.include "m128def.inc.def temp = r16.equ FCLK = CSEG.ORG 0x0000 ; JMP RESET ;*********************************************** ;* Main Program ;***********************************************.ORG 0x0046; RESET: ldi r16,low(ramend) ; out SPL,r16 ; ldi r16,high(ramend); out SPH, r16; call forever: Delay_1mS; rjmp forever ; ; ; Name: Delay_1mS ; Purpose: provide a delay of 1 ms ; Entry: no parameters ; Exit: no parameters ; Notes: chews up FCLK/1000 clock cycles ; (including the 'call') Delay1mS: push YL ; [2] push YH ; [2] ldi YL, low (((FCLK/1000)-18)/4) ; [1] ldi YH, high(((fclk/1000)-18)/4) ; [1] delay1ms_01: sbiw YH:YL, 1 ; [2] brne delay1ms_01 ; [2] ; arrive here when delay counter is zero pop YH ; [2] pop YL ; [2] ret ; [4] ; FCLK/1000 means the number of cycles (clocks) in 1 msec. 18 means the cycles in a subroutine execpt the loop cycles. Note that subroutine call & return instruction need 4 cycles each.

44 Subroutine : Delay_TmS.include "m128def.inc.def temp = r16.equ FCLK = CSEG.ORG 0x0000 ; JMP RESET ;*********************************************** ;* Main Program ;***********************************************.ORG 0x0046; RESET: ldi r16,low(ramend) ; out SPL,r16 ; ldi r16,high(ramend); out SPH, r16; ; ; Name: Delay_TmS ; Purpose: provide a delay of (temp) x 1 ms ; Entry: (temp) = delay in msec ; Exit: no parameters Delay_TmS : call Delay_1mS ; delay for 1 ms dec temp ; update the delay counter brne delay_tms ; counter is not zero ret ; ldi temp, 10 ; call Delay_TmS; forever: rjmp forever ;

45 23 수고하셨습니다

Embedded Systems and Software. LCD Displays

Embedded Systems and Software. LCD Displays Embedded Systems and Software LCD Displays Slide 1 Some Hardware Considerations Assume we want to drive an LED from a port. The AVRs can either source or sink current. Below is a configuration for sourcing.

More information

;Compiler Options.NOLIST.INCLUDE "C:\Program Files (x86)\atmel\avr Tools\AvrAssembler2\Appnotes\m8515def.inc"

;Compiler Options.NOLIST.INCLUDE C:\Program Files (x86)\atmel\avr Tools\AvrAssembler2\Appnotes\m8515def.inc ;* CharTest.asm ;* ;* Created: 28/06/2017 9:37 p.m. ;* Author: ob1 ;ST7820 128 x 64 graphics mode character display 8 lines x 21 characters ;Modification and redistribution under provisions of GNU general

More information

COMP2121: Microprocessors and Interfacing. I/O Devices (II)

COMP2121: Microprocessors and Interfacing. I/O Devices (II) COMP2121: Microprocessors and Interfacing I/O Devices (II) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Overview Keyboard LCD (Liquid Crystal Display) 2 2 Input Switches (1/2)

More information

Module 8: Atmega32 Stack & Subroutine. Stack Pointer Subroutine Call function

Module 8: Atmega32 Stack & Subroutine. Stack Pointer Subroutine Call function Module 8: Atmega32 Stack & Subroutine Stack Pointer Subroutine Call function Stack Stack o Stack is a section of RAM used by the CPU to store information temporarily (i.e. data or address). o The CPU needs

More information

Input/Output Devices. Lecturer: Sri Parameswaran Notes by: Annie Guo

Input/Output Devices. Lecturer: Sri Parameswaran Notes by: Annie Guo Input/Output Devices Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview Input devices Input switches Basics of switches Keypads Output devices LCD 2 Input Switches Most basic binary input

More information

Microprocessors & Interfacing

Microprocessors & Interfacing Lecture Overview Microprocessors & Interfacing Input/Output Devices Input devices Input switches Basics of switches Keypads Output devices LCD Lecturer : Dr. Annie Guo S2, 2008 COMP9032 Week8 1 S2, 2008

More information

ET-BASE AVR ATmega64/128

ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 which is a Board Microcontroller AVR family from ATMEL uses MCU No.ATmega64 and ATmega128 64PIN. Board ET-BASE AVR ATmega64/128 uses MCU s resources on

More information

Interrupts (II) Lecturer: Sri Parameswaran Notes by: Annie Guo

Interrupts (II) Lecturer: Sri Parameswaran Notes by: Annie Guo Interrupts (II) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 External Interrupts The external interrupts are triggered by the INT7:0 pins. If enabled, the interrupts will trigger even if the INT7:0

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Review Part I Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA February 15, 2018 Aly El-Osery (NMT) EE 308:

More information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture

More information

Microprocessors & Interfacing

Microprocessors & Interfacing Lecture Overview Microprocessors & Interfacing Interrupts (II) Interrupts in AVR External interrupts Internal interrupts Timers/Counters Lecturer : Dr. Annie Guo S2, 2008 COMP9032 Week7 1 S2, 2008 COMP9032

More information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture

More information

AVR ISA & AVR Programming (I)

AVR ISA & AVR Programming (I) AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo Week 1 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation Week 1 2 1 Atmel AVR 8-bit

More information

USER S GUIDE ATM4004A

USER S GUIDE ATM4004A USER S GUIDE ATM4004A Liquid Crystal Display Module CONTENTS 1.0 Mechanical Diagram. 3 2.0 Absolute Maximum Ratings 4 3.0 Description of Terminals. 4 4.0 Optical Characteristics 5 5.0 Electrical Characteristics

More information

ATmega128 Assembly Language Programming

ATmega128 Assembly Language Programming 마이크로프로세서응용 7 ATmega128 Assembly Language Programming Assembly Language g Field Delimiter Field structure a space or colon after a label a space after the operation code a comma between operands in the

More information

By: Dr. Hamed Saghaei

By: Dr. Hamed Saghaei By: Dr. Hamed Saghaei The AVR RISC Microcontroller supports powerful and efficient addressing modes for access to the program memory (Flash) and data memory (SRAM). This section describes the different

More information

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction Order this document by /D Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas Introduction More and more applications are requiring liquid crystal displays

More information

Embedded Systems and Software

Embedded Systems and Software Embedded Systems and Software Timers and Counters F-35 Lightning II Electro-optical Targeting System (EOTS Lecture 1, Slide-1 Timers and Counters Very important peripherals on microcontrollers ATtiny45

More information

ECED 3204 Microprocessor Midterm Reference Solution

ECED 3204 Microprocessor Midterm Reference Solution ECED 3204 Microprocessor Midterm Reference Solution Date: October 26 2017 Time: 7:00pm-9:00pm Room: B225, B227, B229 Student name ID 1) Problem one has following two sub problems: a. Write an instruction

More information

The EE 109 LCD Shield

The EE 109 LCD Shield EE 109 Unit 9 LCD 1 LCD BOARD 2 3 The EE 109 LCD Shield The LCD shield is a 16 character by 2 row LCD that mounts on top of the Arduino Uno. The shield also contains five buttons that can be used as input

More information

Objectives. I/O Ports in AVR. Topics. ATmega16/mega32 pinout. AVR pin out The structure of I/O pins I/O programming Bit manipulating 22/09/2017

Objectives. I/O Ports in AVR. Topics. ATmega16/mega32 pinout. AVR pin out The structure of I/O pins I/O programming Bit manipulating 22/09/2017 Objectives The AVR microcontroller and embedded systems using assembly and c I/O Ports in AVR List all the ports of the AVR microcontroller Describe the dual role of the AVR pins Code assembly language

More information

中显液晶 技术资料 中显控制器使用说明书 2009年3月15日 北京市海淀区中关村大街32号和盛大厦811室 电话 86 010 52926620 传真 86 010 52926621 企业网站.zxlcd.com

中显液晶 技术资料 中显控制器使用说明书 2009年3月15日 北京市海淀区中关村大街32号和盛大厦811室 电话 86 010 52926620 传真 86 010 52926621   企业网站.zxlcd.com http://wwwzxlcdcom 4 SEG / 6 COM DRIVER & CONTROLLER FOR DOT MATRIX LCD June 2 Ver Contents in this document are subject to change without notice No part of this document may be reproduced or transmitted

More information

6.1. EE 109 Unit 6. LCD Interfacing

6.1. EE 109 Unit 6. LCD Interfacing 6.1 EE 109 Unit 6 LCD Interfacing LCD BOARD 6.2 6.3 The EE 109 LCD Shield The LCD shield is a 16 character by 2 row LCD that mounts on top of the Arduino Uno. The shield also contains five buttons that

More information

The modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca.

The modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca. LCD Modules A common output display device used with low cost embedded systems is a character LCD display. The displays are available as complete modules with a standard microprocessor parallel interface.

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Timers Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA April 2, 2018 Aly El-Osery (NMT) EE 308: Microcontrollers

More information

Embedded Systems and Software

Embedded Systems and Software Embedded Systems and Software Lab 4 Considerations Formatting for LCD Slide 1 Lab 4 Issues Displaying the Frequency and Duty Cycle on the LCD Formatting for LCD Slide 2 F = 2 5 H z D C = 7 5. 6 % Formatting

More information

The EE 109 LCD Shield

The EE 109 LCD Shield EE 109 Unit 7 LCD 1 LCD BOARD 2 3 The EE 109 LCD Shield The LCD shield is a 16 character by 2 row LCD that mounts on top of the Arduino Uno. The shield also contains five buttons that can be used as input

More information

Today s Menu. >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory

Today s Menu. >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory Today s Menu Methods >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory Look into my See examples on web-site: ParamPassing*asm and see Methods in Software and

More information

COMP2121: Microprocessors and Interfacing. I/O Devices (I)

COMP2121: Microprocessors and Interfacing. I/O Devices (I) COMP2121: Microprocessors and Interfacing I/O Devices (I) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Overview I/O Ports AVR Ports 2 2 What is I/O? I/O is Input or Output (Input/Output).

More information

LCD. Configuration and Programming

LCD. Configuration and Programming LCD Configuration and Programming Interfacing and Programming with Input/Output Device: LCD LCD (liquid crystal display) is specifically manufactured to be used with microcontrollers, which means that

More information

AVR Subroutine Basics

AVR Subroutine Basics 1 P a g e AVR Subroutine Basics READING The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 3: Branch, Call, and Time Delay

More information

LCM NHD-0440CI-YTBL. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD CI- Y- T- B- L-

LCM NHD-0440CI-YTBL. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD CI- Y- T- B- L- User s Guide NHD-0440CI-YTBL LCM (Liquid Crystal Display Module) RoHS Compliant NHD- 0440- CI- Y- T- B- L- Newhaven Display 4 Lines x 40 Characters C: Display Series/Model I: Factory line STN Yellow/Green

More information

SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY PART NUMBER: MGD1602A-FL-YBW DATE: MAY 26,2005 1.0 MECHANICAL SPECS MGD1602A SERIES LCD MODULE 1. Overall Module Size 80.0mm(W) x 36.0mm(H) x max 14.0mm(D) for

More information

16COM/80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM/80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD 6COM/80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION The is a dot matrix LCD driver & controller LSI which is fabricated by low power CMOS technology It is capable of displaying or 2 lines with

More information

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY PART NUMBER: ACM 4002E SERIES DATE: October 8, 2002 1.0 MECHANICAL SPECS ACM4002E SERIES LCD MODULE 1. Overall Module

More information

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY PART NUMBER: ACM1602B (WHITE EDGELIGHT) SERIES DATE: APRIL 28, 2003 1.0 MECHANICAL SPECS 1. Overall Module Size 84.0mm(W)

More information

Microprocessors & Interfacing

Microprocessors & Interfacing Lecture Overview Microprocessors & Interfacing Interrupts (I) Lecturer : Dr. Annie Guo Introduction to Interrupts Interrupt system specifications Multiple sources of interrupts Interrupt priorities Interrupts

More information

Logic Instructions and Programs READING

Logic Instructions and Programs READING 1 P a g e Logic Instructions and Programs READING The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 5: Arithmetic, Logic

More information

Speed and Size-Optimized Implementations of the PRESENT Cipher for Tiny AVR Devices

Speed and Size-Optimized Implementations of the PRESENT Cipher for Tiny AVR Devices Speed and Size-Optimized Implementations of the PRESENT Cipher for Tiny AVR Devices Kostas Papagiannopoulos Aram Verstegen July 11, 2013 Papagiannopoulos and Verstegen July 11, 2013 Speed and Size-Optimized

More information

16COM/40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM/40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD 6COM/4SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION is a dot matrix LCD driver & controller LSI which is fabricated by low power CMOS technology It can display, 2-line with 5 x 8 or 5 x dots

More information

Interrupts (I) Lecturer: Sri Notes by Annie Guo. Week8 1

Interrupts (I) Lecturer: Sri Notes by Annie Guo. Week8 1 Interrupts (I) Lecturer: Sri Notes by Annie Guo Week8 1 Lecture overview Introduction to Interrupts Interrupt system specifications Multiple Sources of Interrupts Interrupt Priorities Interrupts in AVR

More information

Review on Lecture-1. ICT 6641: Advanced Embedded System. Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming

Review on Lecture-1. ICT 6641: Advanced Embedded System. Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming ICT 6641: Advanced Embedded System Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming Prof. S. M. Lutful Kabir Session: April, 2011 Review on Lecture-1 Three parts of a computer : CPU, Memory

More information

LINPO TECHNOLOGY LTD SPECIFICATIONS OF LCD MODULE

LINPO TECHNOLOGY LTD SPECIFICATIONS OF LCD MODULE LINPO TECHNOLOGY LTD SPECIFICATIONS OF LCD MODULE PART NUMBER TECH1602B SERIES DATE JULY 28, 1998 CONTENTS Mechanical Diagram 2 Absolute Maximum Ratings 3 Description of Terminals 3 Optical Characteristics

More information

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY PART NUMBER: ACM 1602B SERIES DATE: August 9, 1999 1.0 MECHANICAL SPECS ACM1602B SERIES LCD MODULE 1. Overall Module Size

More information

AGH University of Science and Technology Cracow Department of Electronics

AGH University of Science and Technology Cracow Department of Electronics AGH University of Science and Technology Cracow Department of Electronics Microprocessors laboratory Tutorial A Using Arduino UNO for laboratory tutorials Author: Paweł Russek http://www.fpga.agh.edu.pl/upt

More information

DISPLAYTRONIC A DIVISION OF ZE XIAMEN SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

DISPLAYTRONIC A DIVISION OF ZE XIAMEN SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY DISPLAYTRONIC A DIVISION OF ZE XIAMEN SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY PART NUMBER: ACM 1602K SERIES DATE: August 9, 1999 1.0 MECHANICAL SPECS 1. Overall Module Size 80.0mm(W) x 36.0mm(H) x max

More information

LMB202DBC LCD Module User Manual

LMB202DBC LCD Module User Manual LMB202DBC LCD Module User Manual Shenzhen TOPWAY Technology Co., Ltd. Rev. Descriptions Release Date 0.1 Prelimiay release 2005-03-01 URL Document Name LMB202DBC-Manual-Rev0.1.doc Page 1 of 11 Table of

More information

Introduction to Assembly language

Introduction to Assembly language Introduction to Assembly language 1 USING THE AVR MICROPROCESSOR Outline Introduction to Assembly Code The AVR Microprocessor Binary/Hex Numbers Breaking down an example microprocessor program AVR instructions

More information

COMP2121 Experiment 4

COMP2121 Experiment 4 COMP2121 Experiment 4 1. Objectives In this lab, you will learn AVR programming on Parallel input/output; Some typical input/output devices; and Interrupts 2. Preparation Before coming to the laboratory,

More information

16COM / 40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM / 40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION KS0066U is a dot matrix LCD driver & controller LSI whichis fabricated by low power CMOS technology It can display 1or 2 lines with the 5 8 dots format or 1 line with the 5 11 dots format

More information

User s Guide ATM1602B

User s Guide ATM1602B User s Guide ATM1602B Liquid Crystal Display Module CONTENTS Mechanical Diagram. 2 Absolute Maximum Ratings 3 Description of Terminals... 3 Optical Characteristics 4 Electrical Characteristics 4 DC Characteristics.

More information

Robosoft Systems in association with JNCE presents. Swarm Robotics

Robosoft Systems in association with JNCE presents. Swarm Robotics Robosoft Systems in association with JNCE presents Swarm Robotics What is a Robot Wall-E Asimo ABB Superior Moti ABB FlexPicker What is Swarm Robotics RoboCup ~ 07 Lets Prepare for the Robotics Age The

More information

CHW 469 : Embedded Systems

CHW 469 : Embedded Systems CHW 469 : Embedded Systems Instructor: Dr. Ahmed Shalaby http://bu.edu.eg/staff/ahmedshalaby4# I/O Ports in AVR The AVR microcontroller and embedded systems using assembly and c Topics AVR pin out The

More information

AT90S Bit Microcontroller with 1K bytes Downloadable Flash AT90S1200. Features. Description. Pin Configuration

AT90S Bit Microcontroller with 1K bytes Downloadable Flash AT90S1200. Features. Description. Pin Configuration Features Utilizes the AVR Enhanced RISC Architecture 89 Powerful Instructions - Most Single Clock Cycle Execution 1K bytes of In-System Reprogrammable Downloadable Flash - SPI Serial Interface for Program

More information

16COM / 80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM / 80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION KS0070B is a dot matrix LCD driver & controller LSI which is fabricated by low power CMOS technology. It is capable of displaying 1 or 2 lines with the 5 7 format or 1 line with the 5 10 dots

More information

shown in Figure 3. An example where the command 0x35 is sent to system 5 is shown in Figure 4. Figure 2. RC5 Frame Format Figure 3.

shown in Figure 3. An example where the command 0x35 is sent to system 5 is shown in Figure 4. Figure 2. RC5 Frame Format Figure 3. AVR410: RC5 IR Remote Control Receiver Features Low-cost Compact Design, Only One External Component Requires Only One Controller Pin, Any AVR device Can Be Used Size-efficient Code Figure 1. RC5 Receiver

More information

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax: NHD-0108HZ-FSW-GBW Character Liquid Crystal Display Module NHD- Newhaven Display 0108-1 Line x 8 Characters HZ- Model F- Transflective SW- Side White LED Backlight G- STN- Gray B- 6:00 Optimal View W-

More information

Item Symbol Standard Unit Power voltage VDD-VSS Input voltage VIN VSS - VDD

Item Symbol Standard Unit Power voltage VDD-VSS Input voltage VIN VSS - VDD SPECIFICATIONS OF LCD MODULE Features 1. 5x8 dots with cursor 2. Built-in controller (S6A0069 or equivalent) 3. Easy interface with 4-bit or 8-bit MPU 4. +5V power supply (also available for =3.0V) 5.

More information

JUL. 27, 2001 Version 1.0

JUL. 27, 2001 Version 1.0 S SPLC782A 6COM/8SEG Controller/Driver JUL. 27, 2 Version. SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLOGY CO. is

More information

SPECIFICATIONS FOR LCD MODULE

SPECIFICATIONS FOR LCD MODULE SPECIFICATIONS FOR LCD MODULE CUSTOMER CUSTOMER PART NO. ORIENT DISPLAY NO. OD-AMC162A SERIES DESCRIPTION APPROVED BY DATE PREPARED BY CHECKED BY APPROVED BY PAGE 1 OF 23 DOCUMENT REVISION HISTORY: DATE

More information

[TUT] Newbie's Guide to AVR Interrupts

[TUT] Newbie's Guide to AVR Interrupts This tutorial is about interrupt driven USART receive and transmit routines written in AVR assembly. The hardware is: Arduino Mega2560 Adafruit Ultimate GPS IBM PC Atmel JTAGICE3 Software: Atmel AS6.1

More information

IAS0430 MICROPROCESSOR SYSTEMS

IAS0430 MICROPROCESSOR SYSTEMS IAS0430 MICROPROCESSOR SYSTEMS Fall 2018 Arduino and assembly language Martin Jaanus U02-308 martin.jaanus@ttu.ee 620 2110, 56 91 31 93 Learning environment : http://isc.ttu.ee Materials : http://isc.ttu.ee/martin

More information

// sets the position of cursor in row and column

// sets the position of cursor in row and column CODE: 1] // YES_LCD_SKETCH_10_14_12 #include //lcd(rs, E, D4, D5, D6, D7) LiquidCrystal lcd(8, 9, 4, 5, 6, 7); int numrows = 2; int numcols = 16; void setup() Serial.begin(9600); lcd.begin(numrows,

More information

LCM NHD-0440AZ-FSW -FBW. User s Guide. (Liquid Crystal Display Character Module) RoHS Compliant FEATURES

LCM NHD-0440AZ-FSW -FBW. User s Guide. (Liquid Crystal Display Character Module) RoHS Compliant FEATURES User s Guide NHD-0440AZ-FSW -FBW LCM (Liquid Crystal Display Character Module) RoHS Compliant FEATURES Display format: 4 Lines x 40 Characters (A) Display Series/Model (Z) Factory line (F) Polarizer =

More information

COG (Chip-on-Glass) Liquid Crystal Display Module

COG (Chip-on-Glass) Liquid Crystal Display Module NHD-C0220AZ-FSW-FTW COG (Chip-on-Glass) Liquid Crystal Display Module NHD- Newhaven Display C0220- COG, 2 Lines x 20 Characters AZ- Model F- Transflective SW- Side White LED Backlight F- FSTN Positive

More information

COMP2121: Microprocessors and Interfacing

COMP2121: Microprocessors and Interfacing Interfacing Lecture 9: Program Control Instructions http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 1, 2006 Program control instructions in AVR Stacks Overview Sample AVR assembly programs

More information

University of Florida EEL 4744 Spring 2013 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 28 March Jun-13 6:18 PM

University of Florida EEL 4744 Spring 2013 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 28 March Jun-13 6:18 PM University of Florida EEL 4744 Spring 2013 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 2 March 2013 12-Jun-13 6:1 PM Page 1/14 Exam 2 Instructions: Turn off cell phones beepers

More information

Parallel Display Specifications Revision 1.0

Parallel Display Specifications Revision 1.0 MOP-AL162A Parallel Display Specifications Revision 1.0 Revision History Revision Description Author 1.0 Initial Release Clark 0.2 Updates as per issue #333 Clark 0.1 Initial Draft Clark 1 Contents Revision

More information

Embedded Systems and Software

Embedded Systems and Software Embedded Systems and Software Lecture 11 Interrupts Interrupts Slide 1 Interrupts One way to think of interrupts is that they are hardwaregenerated functions calls Internal Hardware When timer rolls over,

More information

Specification for BT 41605VSS-SRE-06

Specification for BT 41605VSS-SRE-06 BATRON Specification for BT 41605VSS-SRE-06 Version April 2003 DATA MODUL AG Landsberger Str. 322 80687 München Tel.: 089/ 56017-00 Fax 089/ 56017-119 PAGE 2 OF 12 DOCUMENT REVISION HISTORY 1: DOCUMENT

More information

LCD MODULE DEM SBH-PW-N

LCD MODULE DEM SBH-PW-N DISPLAY Elektronik GmbH LCD MODULE DEM 16228 SBH-PW-N Version: 3 09/Oct/2008 GENERAL SPECIFICATION MODULE NO. : DEM 16228 SBH-PW-N CUSTOMER P/N VERSION NO. CHANGE DESCRIPTION DATE 0 ORIGINAL VERSION 05.05.2008

More information

SPECIFICATIONS FOR LCD MODULE

SPECIFICATIONS FOR LCD MODULE A M P I R E SPECIFICATIONS FOR LCD MODULE CUSTOMER CUSTOMER PART NO. AMPIRE PART NO. -204AYILY-70H-A(R) APPROVED BY DATE APPROVED BY CHECKED BY ORGANIZED BY 2006/3/9 AMPIRE CO., LTD. 1 RECORD OF REVISION

More information

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax: NHD-0220WH-MTGH-JT#E Character Liquid Crystal Display Module NHD- Newhaven Display 0220-2 Lines x 20 Characters WH- Display Type: Character M- Model T- White LED Backlight G- STN- Gray H- Transflective,

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Motorola M68HC11 Specs Assembly Programming Language BUFFALO Topics of Discussion Microcontrollers M68HC11 Package & Pinouts Accumulators Index Registers Special Registers Memory Map I/O Registers Instruction

More information

8-Bit MCU with Downloadable Flash. Application Note AVR100. AVR100: Accessing the EEPROM. Features. Introduction. Random Write - Subroutine EEWrite

8-Bit MCU with Downloadable Flash. Application Note AVR100. AVR100: Accessing the EEPROM. Features. Introduction. Random Write - Subroutine EEWrite AVR100: Accessing the EEPROM Features Random Read/Write Sequential Read/Write Runable Test/Example Program Introduction This application note contains routines for access of the EEPROM memory in the AVR

More information

SPECIFICATIONS FOR LCD MODULE

SPECIFICATIONS FOR LCD MODULE 145 Royal Crest Court Unit 42 Markham, ON, Canada L3R 9Z4 Tel: 95-477-1166 Fax: 95-477-1782 http://www.orientdisplay.com SPECIFICATIONS FOR LCD MODULE CUSTOMER CUSTOMER PART NO. ACMMI PART NO. AMC161A

More information

LABORATORY 1 INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEM BOARD

LABORATORY 1 INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEM BOARD LABORATORY 1 INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEM BOARD 1. INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEMS. The basic components of the 8085 Microprocessor Development System

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Introduction to the Assmbly Language Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 25, 2018 Aly

More information

Buses and Parallel Input/Output

Buses and Parallel Input/Output Buses and Parallel Input/Output Lecturer: Sri Parameswaran Notes by: Annie Guo Week7 1 Lecture Overview Buses Computer buses I/O Addressing Memory mapped I/O Separate I/O Parallel input/output AVR examples

More information

LCM NHD-0116AZ-FL-GBW. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD AZ- F- L- G- B- W-

LCM NHD-0116AZ-FL-GBW. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD AZ- F- L- G- B- W- User s Guide LCM (Liquid Crystal Display Module) RoHS Compliant NHD- 0116- AZ- F- L- G- B- W- Newhaven Display 1 Lines x 6 Characters Version Line Transflective Yellow/Green LED B/L STN-Gray 6:00 View

More information

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580 LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F458 1. OBJECTIVES: 1.1 To learn how to interface LCD 16x2, Keypad 4x4 and 7Segment Display to the microcontroller. 1.2 To

More information

Programming Microcontroller Assembly and C

Programming Microcontroller Assembly and C Programming Microcontroller Assembly and C Course Number CLO : 2 Week : 5-7 : TTH2D3 CLO#2 Student have the knowledge to create basic programming for microcontroller [C3] Understand how to program in Assembly

More information

LCD MODULE DEM TGH

LCD MODULE DEM TGH DISPLAY Elektronik GmbH LCD MODULE DEM 16102 TGH Version : 1.1.0 26.09.2008 GENERAL SPECIFICATION MODULE NO. : DEM 16102 TGH VERSION NO. CHANGE DESCRIPTION DATE 0 ORIGINAL VERSION 12.03.2007 1.1.0 CHANGE

More information

Microprocessor Fundamentals. Topic 7 Timing: the Timer/Counter

Microprocessor Fundamentals. Topic 7 Timing: the Timer/Counter Microprocessor Fundamentals Topic 7 Timing: the Timer/Counter Objectives Examine the Timer/Counter Register: TCNT0 Examine the Timer/Counter Control Register: TCCR0 Write a time delay for the previous

More information

HT1628 RAM Mapping LCD Driver

HT1628 RAM Mapping LCD Driver RAM Mapping 116 2 LCD Driver Features Logic voltage 2.4V~5.5V LCD operating voltage (VLCD) 2.4V~5.5V LCD display 2 commons, 116 segments Support a maximum of 58 4 bit Display RAM Duty Static, 1/2; Bias

More information

LCM SPECIFICATIONS. LCM MODE: CHARACTER PRODUCTION CODE: LCM2002A REVISION: ver1.1 DATE: 2004/9/6. (using) LCM 2002A Sep 6th, 2004

LCM SPECIFICATIONS. LCM MODE: CHARACTER PRODUCTION CODE: LCM2002A REVISION: ver1.1 DATE: 2004/9/6. (using) LCM 2002A Sep 6th, 2004 LCM SPECIFICATIONS (using) LCM MODE: CHARACTER PRODUCTION CODE: LCM2002A REVISION: ver1.1 DATE: 2004/9/6 010-62168698 62168699 www.qingyun-it.com P.1 of 14 PHYSICAL DATA Item Contents Unit LCD type STN

More information

ECED3204: Microprocessor Part III--Clock, I/O and Interrupt

ECED3204: Microprocessor Part III--Clock, I/O and Interrupt ECED3204: Microprocessor Part III--Clock, I/O and Interrupt Jason J. Gu Department of 1 Outline i. Part III.1 System Clock Configuration ii. Part III.2 Parallel I/O iii. Part III.3 Interrupt Handling,

More information

Lab Experiment 9: LCD Display

Lab Experiment 9: LCD Display Lab Experiment 9: LCD Display 1 Introduction Liquid Crystal Displays (LCDs) provide an effective way for processors to communicate with the outside world. The LPC2148 board used in the lab is equipped

More information

DATE DESCRIPTION CHANGED BY

DATE DESCRIPTION CHANGED BY PAGE 2 OF 12 DOCUMENT REVISION HISTORY 1: DOCUMENT REVISION FROM TO DATE DESCRIPTION CHANGED BY A 2002.01.08 First Release (Based on the test specification VL-TS-MDLS16268CSP-04, REV. A, 2001.03.01) PHILIP

More information

DOCUMENT REVISION HISTORY 1:

DOCUMENT REVISION HISTORY 1: PAGE 2 OF 12 DOCUMENT REVISION HISTORY 1: DOCUMENT REVISION FROM TO DATE DESCRIPTION CHANGED BY A 2008.11.19 First Release. (Based on LCD counter drawing: COG-DEMO1003 (Rev.0)) PHILIP CHENG CHECKED BY

More information

NHD 0216K1Z NS(RGB)FBW REV1

NHD 0216K1Z NS(RGB)FBW REV1 NHD 0216K1Z NS(RGB)FBW REV1 Character Liquid Crystal Display Module NHD Newhaven Display 0216 2 lines x 16 characters K1Z Model NS Transmissive ( ) RGB Side backlight RED, GREEN, BLUE F FSTN ( ) B 6:00

More information

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) (Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

More information

8-bit Microcontroller with 8K Bytes Programmable Flash AT90C8534. Preliminary

8-bit Microcontroller with 8K Bytes Programmable Flash AT90C8534. Preliminary Features Utilizes the AVR RISC Architecture AVR High-performance and Low-power RISC Architecture 118 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General-purpose Working Registers Up

More information

Specification of Vacuum Fluorescent Display NORITAKE ITRON CORPORATION Sheet 1/19 DS25404

Specification of Vacuum Fluorescent Display NORITAKE ITRON CORPORATION Sheet 1/19 DS25404 Specification of Vacuum Fluorescent Display NORITAKE ITRON CORPORATION Sheet 1/19 DS2544 Rev. Spec. No. Date(M-D-Y) Item No. P-R Aug-1-7 DS1625M 1 P-R1 Dec-1-7 2 P-R2 Dec-19-7 3 T-R Dec-26-7 4 T-R1 Jan-7-8

More information

COMP3221: Microprocessors and Embedded Systems

COMP3221: Microprocessors and Embedded Systems Embedded ystems Overview Arithmetic and Logic nstructions in AR ample AR Assembly Programs Using AL instructions Lecture 7: Arithmetic and logic nstructions http://www.cse.unsw.edu.au/~cs3221 Lecturer:

More information

Introduction to AVR-STUDIO

Introduction to AVR-STUDIO DEPARTAMENTO DE TECNOLOGÍA ELECTRÓNICA ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA INFORMÁTICA Introduction to AVR-STUDIO Computer Structure 1.Introduction and goals The goals of this session are the following:

More information

SPECIFICATIONS FOR LCD MODULE

SPECIFICATIONS FOR LCD MODULE SPECIFICATIONS FOR LCD MODULE CUSTOMER CUSTOMER PART NO. ACMMI PART NO. OD-AMC164A SERIES DESCRIPTION APPROVED BY DATE PAGE 1 OF 23 DOCUMENT REVISION HISTORY: DATE PAGE DESCRIPTION 1999.8. 25.3. 25.12

More information

LCD MODULE DEM FGH-LR

LCD MODULE DEM FGH-LR DISPLAY Elektronik GmbH LCD MODULE DEM 16217 FGH-LR Version : 3 15/Aug/2010 GENERAL SPECIFICATION MODULE NO: DEM 16217 FGH-LR CUSTOMER P/N Version No. Change Description Date 0 Original Version 26.07.2010

More information

commodore semiconductor group NMOS 950 Rittenhouse Rd., Norristown, PA Tel.: 215/ TWX: 510/ (MEMORY, I/O, TIMER ARRAY)

commodore semiconductor group NMOS 950 Rittenhouse Rd., Norristown, PA Tel.: 215/ TWX: 510/ (MEMORY, I/O, TIMER ARRAY) commodore semiconductor group NMOS 950 Rittenhouse Rd., Norristown, PA 19403 Tel.: 215/666-7950 TWX: 510/660-4168 6532 (MEMORY, I/O, TIMER ARRAY) THE 6532 CONCEPT- The 6532 is designed to operate in conjunction

More information

SPECIFICATIONS FOR LCD MODULE

SPECIFICATIONS FOR LCD MODULE SPECIFICATIONS FOR LCD MODULE CUSTOMER CUSTOMER PART NO. ORIENT DISPLAY NO. YHC162A-XX DESCRIPTION APPROVED BY DATE PREPARED BY CHECKED BY APPROVED BY PAGE 1 OF 22 DOCUMENT REVISION HISTORY: DATE PAGE

More information