Does anyone have any PIC assembly code for controlling the 633. My generic Rs232 code is just not cutting the mustard. Here it is.
;Set up serial port.
SetupSerial: Bank1 ;select bank 1
movlw 0xc0 ;set tris bits for TX and RX
iorwf TRISC,F
movlw SPBRG_VAL ;set baud rate
movwf SPBRG
movlw 0x65 ;enable nine bit tx and high baud rate
movwf TXSTA
Bank0 ;select bank 0
movlw 0xd0 ;enable serial port and nine bit rx
movwf RCSTA
clrf Flags ;clear all flags
return
then i send my text, which works when connected to hyperterminal:
TransmitSerialma: Bank0 ;select bank 0
btfss PIR1,TXIF ;check if transmitter busy
goto $-1 ;wait until transmitter is not busy
movlw 0x56 ; data movwf TXREG ;transmit the data
nop
I looked at the DATA SHEETs command codes, and read how the PACKETS are sent. <type><valid data length 0-16><data><crc>. I want to just clear the LCD. Your code is:
type = 6
valid data_length is 0
The return packet will be:
type = 0x40 | 6
data_length = 0
How do I send this command in Assembly language?
movlw 0x????????????? ;data
Any help would be aprreciated
Thanks,
Eric
;Set up serial port.
SetupSerial: Bank1 ;select bank 1
movlw 0xc0 ;set tris bits for TX and RX
iorwf TRISC,F
movlw SPBRG_VAL ;set baud rate
movwf SPBRG
movlw 0x65 ;enable nine bit tx and high baud rate
movwf TXSTA
Bank0 ;select bank 0
movlw 0xd0 ;enable serial port and nine bit rx
movwf RCSTA
clrf Flags ;clear all flags
return
then i send my text, which works when connected to hyperterminal:
TransmitSerialma: Bank0 ;select bank 0
btfss PIR1,TXIF ;check if transmitter busy
goto $-1 ;wait until transmitter is not busy
movlw 0x56 ; data movwf TXREG ;transmit the data
nop
I looked at the DATA SHEETs command codes, and read how the PACKETS are sent. <type><valid data length 0-16><data><crc>. I want to just clear the LCD. Your code is:
type = 6
valid data_length is 0
The return packet will be:
type = 0x40 | 6
data_length = 0
How do I send this command in Assembly language?
movlw 0x????????????? ;data
Any help would be aprreciated
Thanks,
Eric
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.