Searching \ for 'I need some direction.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=need+direction
Search entire site for: 'I need some direction.'.

Truncated match.
PICList Thread
'I need some direction.'
1996\04\13@173259 by Shawn Hickman

flavicon
face
I have a Optrex LCD attached to a PIC16C54
ra.0    Enable Bit on Disp.
rb.0    DB0
rb.1    DB1
rb.2    DB2
rb.3    DB3
rb.4    DB4
rb.5    DB5
rb.6    DB6
rb.7    RS
       R/W tied low
       DB7 tied low

I just want to transmit one character to it and I can't get to work.  I am
using the Parallax
Assembler.  I have both type of code (Parallax and Micro) in my prog.  When
I try to assem.
I get Illegal Mnemonic Errors starting at my WAIT5MS label.

If somebody would please stear me in the right direction I would greatly
appreciate it.

My program is listed below.

TIA

Shawn

; PROGRAM: MAGIC.SRC

; April 10, 1996

UP              =       ra.3            ;Up count input
DOWN            =       ra.2            ;Down count input
SPARE           =       ra.1            ;0 = instruction, 1 = data
EBIT            =       ra.0            ;0 = disable, 1 = enable
DATA            =       rb              ;Data to LCD
DELAY1          =       10h
DELAY2          =       11h

CLEAR           =       1               ;Clears the display (fills with blanks)
HOME            =       2               ;Returns display to the home position.
CRSR_L          =       16              ;Moves cursor to the left.
CRSR_R          =       20              ;Moves cursor to the right.
NO_CRSR         =       8               ;Turns off the cursor.

; Device data   ***************************************************************

               device  pic16c54,xt_osc,wdt_off,protect_off
               reset   start

; DELAY ***********************************************************************

WAIT5MS
               MOV     DELAY1,#11111111b
       :OUTER  MOV     DELAY2,#11111111b
       :INSIDE DECFSZ  DELAY2,1
               JMP    :INSIDE
               DECFSZ  DELAY1
               JMP    :OUTER
               RETURN

; LINE 35 FLASH ENABLE PIN ON DISPLAY   ***************************************

ENABLE
               BSF     5, 1            ;ENABLE RA.0
               CALL    WAIT5MS
               BCF     5, 1            ;DISABLE RA.0
               CALL    WAIT5MS
               RETURN

; DISPLAY INITIALIZE    *******************************************************

DISPINIT
               CALL    WAIT5MS
               CALL    WAIT5MS
               CALL    WAIT5MS
               MOVLW   B'00110000'
               MOVWF   DATA
               CALL    ENABLE          ;1 TIME
               CALL    ENABLE          ;2 TIMES
               CALL    ENABLE          ;3 TIMES THE CHARM
               MOVLW   B'00111000'
               MOVWF   DATA
               CALL    ENABLE
               MOVLW   B'00001000'
               MOVWF   DATA
               CALL    ENABLE
               MOVLW   B'00000001'
               MOVWF   DATA
               CALL    ENABLE
               MOVLW   B'00000110
               MOVWF   DATA
               CALL    ENABLE
               RETURN

; BEGIN MAIN PROGRAM    *******************************************************

               ORG     0
START
               MOVLW   B'00000000'
               TRIS    DATA            ;MAKE RB0-RB7 PORT PINS OUTPUTS
               MOVLW   B'00001110'
               TRIS    ra              ;MAKE RA.0 A OUTPUT THE REST INPUTS
MAIN
               MOVLW   B'11111110'     ;Arrow pointing right.
               MOVWF   DATA            ;Transmit
               CALL    ENABLE
DONE
               GOTO    $
               ORG     1FFH
               GOTO    START
               END

1996\04\13@174958 by John Payson

flavicon
face
>
> I have a Optrex LCD attached to a PIC16C54
> ra.0    Enable Bit on Disp.
> rb.0    DB0
> rb.1    DB1
> rb.2    DB2
> rb.3    DB3
> rb.4    DB4
> rb.5    DB5
> rb.6    DB6
> rb.7    RS
>         R/W tied low
>         DB7 tied low
>
> I just want to transmit one character to it and I can't get to work.

One problem is that you won't be able to use the display with the wires as
you have indicated them.  You MUST have DB4-DB7 to access the display at all,
and you need DB0-DB3 as well if you want to use 8-bit mode rather than 4-bit
mode.  I'd suggest you pinout your display as:

RB0: E
RB1: RS
RB2-3: Use for whatever you want
RB4-RB7: DB4-DB7

and then use the display in 4-bit mode.

1996\04\13@233344 by Todd Peterson

picon face
Shawn:
At 05:34 PM 4/13/96 -0400, you wrote:
>I have a Optrex LCD attached to a PIC16C54
>ra.0    Enable Bit on Disp.
>rb.0    DB0
>rb.1    DB1
>rb.2    DB2
>rb.3    DB3
>rb.4    DB4
>rb.5    DB5
>rb.6    DB6
>rb.7    RS
>        R/W tied low
>        DB7 tied low
>
>I just want to transmit one character to it and I can't get to work.  I am
>using the Parallax
>Assembler.  I have both type of code (Parallax and Micro) in my prog.  When
>I try to assem.
>I get Illegal Mnemonic Errors starting at my WAIT5MS label.

Why are you tying DB7 low?  This will only let you display 1/2 the alphabet!
(For instance, the letters "p" and "q" require DB7 raised on the Optrex
displays.  Also, try putting the line labels on actual opcode lines.  I've
had this trouble with a couple of compilers; I don't recall if PASM is that
picky but it's worth a try.

By the way, my company, E-LAB Digital Engineering, Inc., manufactures a
board that might solve some of your problems.  It takes a PIC16C57 chip and
has, among many other things, a direct connection port to popular optrex LCD
display modules.  Included high-speed driver routines link easily into your
program and literally save days of troubleshooting.  Send your snail mail
address (anybody) to me and I'll send a free information packet right out to
you.

Good luck with your project!

Todd Peterson   spam_OUTtpetersonTakeThisOuTspamnetins.net
E-LAB Digital Engineering, Inc.
(712) 944-5344



===========================================================
*** Developers of the PICPlus(TM) Microcontroller Board ***

Todd Peterson, Computer Engineer   (.....tpetersonKILLspamspam@spam@netins.net)
E-LAB Digital Engineering, Inc.

P.O. Box 246
Lawton, IA 51030-0246
(712) 944-5344

Visit us at: http://www.netins.net/showcase/elab/

E-Mail Now for Your Free PICPlus(TM) Information Packet!
TO: tpetersonspamKILLspamnetins.net   (include POSTAL mailing address)
===========================================================

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...