로그인회원등록 내글장바구니주문조회현재접속자
 상품 검색








 게시판 검색





 
 
회원등록 비번분실


온라인 입금계좌
ㆍ기업은행
ㆍ219-043192-01-028
ㆍ이건영

      거래은행 바로가기
 
 SX, MPU Applications
SX, MPU 자료실
작성자 leeky        
작성일 2006/02/20
첨부#2 lcd_sx_sch.jpg (0KB) (Down:37)
Link#1 www.parallax.com (Down:37)
ㆍ추천: 30  ㆍ조회: 2744   
  SX 칩 4비트 LCD 소스

LCD Hardware Interface and Assembler Source.

문자 표시용 LCD 핀의 기능과 설명
핀   기능      설명
1     GND     Ground
2     +5         + 5 V Power
3     C         Contrast voltage
4     RS        Reg. Select
5     R/W      Read/Write
6     E          Enable
7     DB0       Data Bit 0
8     DB1       Data Bit 1
9     DB2       Data Bit 2
10   DB3       Data Bit 1
11   DB4       Data Bit 4
12   DB5       Data Bit 5
13   DB6       Data Bit 6
14   DB7       Data Bit 7
.
Some LCDs have 14-pin male single inline package (SIP) headers,
and they can be plugged directly into a breadboard.
Other LCDs have these pins arranged
with a piece of ribbon cable that ends in a dual-row header.
This isn't very handy for breadboarding. In this case,
jumper wires can be used to connect the header pins/sockets to the breadboard.
Figure 1.5 shows a connection diagram for operating a 14 pin LCD in 4-bit mode.
.
Hitachi’s data sheet shows a signal sequence that can be sent to the LCD to reset it
and force it into 4-bit mode.
Once in 4-bit mode, RS can be asserted, then ASCII characters can be sent.
In 4-bit mode, the four most
significant bits are sent first, and the lower four bits are sent second.
RS is taken low for sending command
codes. Each 4-bit transfer occurs when the E pin is pulsed.
.
If the LCD doesn’t appear to work,
try varying the contrast voltage on pin 3 of the LCD’s 14-pin connector.
Adjust the potentiometer connected to pin 3 until faint boxes
or characters become visible.

4 비트 LCD 구동 소스
; 4-bit LCD driver by Al Williams
device         SX28L,turbo,stackx_optionx,oscxt5,bor42
freq         4000000 ; Run at 4MHz to simplify timing.
reset         start ; Go to 'start' on reset.
;
                org $0c
dlyctr         ds         1 ; Main delay counter.
dlymult        ds         1 ; Delay multiplier.
tmp         ds         1 ; Temp storage.
work         ds         1 ; More temp storage.
i                 ds         1 ; Loop counter.
;
ebit         equ ra.1 ; I/O: Enable and Register Select.
rsbit         equ ra.0 ; Assumes DB4 to DB7 connect to RB.0-RB.3.

                org 0
ldelay         mov dlymult,#5 ; Long delay (5x256). Enter here if you want
delaym         clr dlyctr ; to set your own dlymult.
:delay         nop
                djnz dlyctr,:delay
                djnz dlymult,delaym
                ret
;
init         mov ra,#0 ; Call to init the LCD.
                mov        rb,#0 ; Set all bits to zero.
                mov !rb,#%11110000 ; Set outputs.
                mov !ra,#%00
                call ldelay ; Give LCD some time to catch up.
                mov rb,#$3 ; Write a 3 out to the display 3 times.
                call pulsee
                call pulsee
                call pulsee
                mov rb,#$2 ; Now go to 4-bit mode (twice).
                call pulsee
                call pulsee
                mov rb,#$8
; Set 2-line mode (remove next 2 lines if display has 1 line).
                call pulsee
                mov w,#14 ; Non blink cursor (use 15 for blinking).
                call lcdout
                mov w,#6 ; Activate the cursor.
                call lcdout
clear ; Clear the screen (init falls Into this routine).
                mov w,#1 ; Send a command (clear falls Into this routine).
                cmd clrb rsbit
                call lcdout
                setb rsbit
                ret
;
lcdout         mov tmp,w ; Write to the LCD (4 bits at a time).
                mov work,w
                rr work ; Get top 4 bits first.
                rr work
                rr work
                rr work
                and work,#$F
                mov rb,work
                call pulsee
                mov w,tmp ; Then bottom 4 bits.
                and w,#$F
                mov rb,w
pulsee         setb ebit
; Pulse the E bit (lcdout falls into this).
                call ldelay
                clrb ebit
                ret
;                
; Set the cursor to the specified pos note that all displays think that
; line 2 starts at pos 40 even if they don't have 40 characters.
setcursor
                mov work,w
                mov w,#$80
                add w,work
                jmp cmd
                lookup mov w,i ; Get a byte from the string to display.
                jmp pc+w
;
msg         retw 'Assembly Language I/O '
                retw 'with the SX-Key',13
                retw 'by Al Williams and Parallax',0
;
start         call init ; Here is the main program.
                call ldelay
                clr i ; Loop for each character.
ploop         call lookup
; exit if 0
                test w
                jz :loop
                inc i
                mov work,w ; If 13 then go to line #2.
                cje work,#13,nl
                mov w,work
                call lcdout ; Not 0 or 13 so print it.
; this delay gives a "teletype" effectcomment the following 2 lines
; for full speed.
                clr dlymult
                call delaym
                jmp ploop ; Keep going.
;
; This look waits for about 5 seconds or so and then starts the whole
; thing over.

:loop         mov tmp,#64
:loop1         clr dlymult
                call delaym
                djnz tmp,:loop1
                jmp start
                nl mov w,#40 ; Move to line 2.
                call setcursor
                jmp ploop
;

AVRTOOLS™

   
윗글 병렬포트(LPT1) 시험 소프트웨어
아래글 SxSim (UBICOM의 SASM 어셈블러를 지원)
    N         제목    글쓴이 작성일 조회 추천
48 SXB 무료 Basic 컴파일러 SX18/20/28 avrtools™ 2008/12/03 (수) 1447 0
47 SX28 IR-Remote Signal Analyzer avrtools™ 2016/01/22 (금) 318 0
46 삼성 안드로이드폰 GT-i5700 무선 오실로스코프 avrtools™ 2011/09/10 (토) 2718 10
45 SX28 Clock Timer 소스 avrtools™ 2008/12/03 (수) 1720 0
44 SX28 Scanning a 4x4 Keypad 소스 avrtools™ 2008/12/03 (수) 1852 0
43 SX28 Thermometer 소스 avrtools™ 2008/12/03 (수) 1542 0
42 SX28 Serial LCD 소스 avrtools™ 2008/12/03 (수) 1534 0
41 SX28 Digital Dice 소스 avrtools™ 2008/12/03 (수) 1383 0
40 IDE51-C 8051 C컴파일러 (사용제한 없음) avrtools™ 2008/12/03 (수) 2192 0
39 uc51 검파일러 8K 무료버전 avrtools™ 2008/12/03 (수) 1586 0
38 SXC Demo avrtools™ 2008/12/02 (화) 1290 0
37 SxSim (UBICOM의 SASM 어셈블러를 지원) avrtools™ 2008/12/02 (화) 1470 0
36 SXkey52.exe SX48, SX52 전용 소프트 avrtools™ 2008/12/02 (화) 1343 0
35 SX 칩 프로그래머/인서킷 에뮬레이터 SXKey v3.0 avrtools™ 2008/12/02 (화) 1325 0
34 Serial port keyboard stuffer avrtools™ 2008/11/09 (일) 2028 0
33 IBM AT Keyboard의 Hexa 값 leeky 2007/11/12 (월) 2036 0
32 PC 소프트웨어 오실로스코프 avrtools™ 2008/10/07 (화) 2419 0
31 저항 읽는 방법과 저항 소프트웨어 avrtools™ 2008/09/26 (금) 2265 0
30 BMP to LCD avrtools™ 2008/09/22 (월) 1986 0
29 SX18/20/28용 무료 베이직 SXB V3.1 leeky 2006/03/03 (금) 3273 22
28 절연 RS232C 회로 avrtools™ 2008/08/29 (금) 2486 0
27 문자표시 LCD 모듈의 사용방법 leeky 2006/04/06 (목) 4238 0
26 Bin2Hex.exe leeky 2007/11/12 (월) 2535 0
25 LPT Port Tester leeky 2007/11/12 (월) 2441 0
24 PC 프린터 포트의 사용법 leeky 2007/11/12 (월) 2641 0
23 병렬포트(LPT1) 시험 소프트웨어 leeky 2007/11/12 (월) 2362 0
22 SX 칩 4비트 LCD 소스 leeky 2006/02/20 (월) 2744 30
21 SxSim (UBICOM의 SASM 어셈블러를 지원) leeky 2006/02/13 (월) 2191 27
20 SXkey52.exe leeky 2006/02/13 (월) 1977 28
19 SX 프로그래머/에뮬레이터 SXKey v3.0 leeky 2006/02/13 (월) 2143 24
18 SXC Demo Version leeky 2006/03/16 (목) 2057 27
17 SX52 웹서버 + 겜보이 카메라 leeky 2006/03/16 (목) 2284 5
16 CMUcam2 (Cam + 5 Servo) leeky 2006/03/16 (목) 2642 3
15 CMUcam Vision Sensor KIT with SX28 leeky 2006/03/16 (목) 3027 4
14 SX52 이더넷 평가기판의 소스 (iSX 소프트) leeky 2006/03/16 (목) 2878 1
13 SX52-이더넷 평가기판 (하드웨어) leeky 2006/03/16 (목) 2304 1
12 SX52 MMC(메모리카드) WAV화일 녹음과 재생 leeky 2006/03/16 (목) 2856 5
11 SX28 USB 분석장치 (SX-Atpapch) leeky 2006/03/16 (목) 2642 5
10 SX color TV 게임기 leeky 2006/03/16 (목) 2838 4
9 SX28 Serial to TV leeky 2006/03/16 (목) 2366 3
8 SX18 영상(NTSC) 동기검출 leeky 2006/03/16 (목) 2108 2
7 SX28 디지털 스코프 leeky 2006/03/16 (목) 2487 3
6 SX28 500KHz DDS 신호발생기 leeky 2006/03/16 (목) 2572 0
5 SX Morse Code Keyer avrtools 2006/03/16 (목) 1862 2
4 SX28 Video OSD Module leeky 2006/03/16 (목) 2760 0
3 1.2MHz/2.4GHz Exciter leeky 2006/02/25 (토) 2154 0
2 16F84 G3RUH 9600BPS Modem leeky 2006/02/25 (토) 2242 2
1 16F84 Morse Decoder leeky 2006/02/25 (토) 3068 1
1

바구니 : 0
 보관함 : 0
오늘뷰 : 0
HOME   |   회사소개   |   제휴안내   |   회사위치   |   서비스이용 약관   |   개인정보 보호정책   |   사이트맵
17015 경기도 용인시 기흥구 동백중앙로16번길 16-25, 508호. 전화 : 031-282-3310
사업자 등록번호 : 697-47-00075 / 대표 : 이건영 / 업태 : 제조업 / 종목 : LED조명, LED전원, 제어장치.
개인정보 관리책임자 : 홈페이지 관리자 . Copyright ⓒ2016 아크레즈 (ACLEDS INC.)
HOME TOP PREVNEXT 0 0 0