LCDInfo.com
http://forum.lcdinfo.com/

CODE FOR CFAG12864B-TMI-V
http://forum.lcdinfo.com/viewtopic.php?f=9&t=228
Page 1 of 1

Author:  MYSTICALYUTE [ Tue Apr 29, 2003 6:39 ]
Post subject:  CODE FOR CFAG12864B-TMI-V

IM USING A MOTOROLA BOARD AND IM INTERFACING IT TO THE CFAG12864B-TMI-V LCD BUT MY PROGRAM IS NOT WORKING ANY AT ALL
HELP!!!!!!!!!!!!!

THIS IS WHAT I GOT SO FAR

REGBAS EQU $1000
PORTC EQU $3
PORTA EQU $0
DDRC EQU $7

ORG $100

JSR DISPON
JSR DISPSL
JSR SETSTP
JSR STYADR

HERE BRA HERE

DISPON LDX #REGBAS
BSET DDRC,X %11111111 ;SET ALL PORTC PINS FOR OUTPUT
LDAA #%00000000
STAA PORTA,X
LDAA #%00111111 ;TURN DISPLAY ON
STAA PORTC,X
RTS

DISPSL LDX #REGBAS
BSET DDRC,X %11111111 ;SET ALL PORTC PINS FOR OUTPUT
LDAA #%00000000
STAA PORTA,X
LDAA #%11000000 ;SETS STARTLINE TO 0
STAA PORTC,X
RTS

SETSTP LDX #REGBAS
BSET DDRC,X %11111111 ;SET ALL PORTC PINS FOR OUTPUT
LDAA #%00000000
STAA PORTA,X
LDAA #%10111000 ;SETS STARTPAGE TO 0
STAA PORTC,X
RTS

STYADR LDX #REGBAS
BSET DDRC,X %11111111 ;SET ALL PORTC PINS FOR OUTPUT
LDAA #%00000000
STAA PORTA,X
LDAA #%01000000 ;SETS Y ADDRESS TO 0
STAA PORTC,X
RTS

WRDATA LDX #REGBAS
BSET DDRC,X %11111111 ;SET ALL PORTC PINS FOR OUTPUT
LDAA #%01000000
STAA PORTA,X
LDAA #%01001000 ;SETS DATA TO 46
STAA PORTC,X
RTS

STREAD LDX #REGBAS
BSET DDRC,X %00000000 ;SET ALL PORTC PINS FOR INPUT
LDAA #%00000000
STAA PORTA,X
LP: LDAA PORTC,X ;CHECK IF BUSY
BRSET PORTC,X %10000000 LP
RTS

Author:  stef [ Fri Jul 11, 2003 16:41 ]
Post subject: 

helloooo ,

i don't know too much the motorola , but i don't understand your "main" program ( i know doen't exict in assembler)

if i read your prog step by step :

org $100 -> go to address 100 in rom prg ( ok )

JSR DISPON -> jump to dispon function (RTS mean return ?)
JSR DISPSL
JSR SETSTP
JSR STYADR -> here problem , what do you do after ? i think you have to make infinit loop to not read again dispon .

stop me if i have wrong .

as well , you have to send "display on" went you want display the data in memory and went the data are ready in memory .

try to check the busy bit between all function .

i am may be completly wrong , tell me .

Page 1 of 1 All times are UTC + 2 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/