Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
INIT_LCD
BCF PORTA,3
MOVLW b'00101000' ;10h + 08h
MOVWF PORTD
LCD_Char movwf templcd
swapf templcd,w ;send upper nibble
andlw 0x0f ;clear upper 4 bits of W
movwf PORTD
bsf PORTA,3 ;RS line to 1
call Pulse_e ;Pulse the E line high
movf templcd,w ;send lower nibble
andlw 0x0f ;clear upper 4 bits of W
movwf PORTD
meera83 said:that Nigel's code is it just need to load with one file?don't need load other file?
movlw b'110001'
movwf TRISA
House0Fwax said:Code:movlw b'110001' movwf TRISA
I may well be wrong here, but that doesn't look right to me.
Nigel Goodwin said:I would be much happier with 8 bits in the binary value - I'm always concerned that I'm not 100% sure which way the assembler might justify the 6 to 8!.
Nigel Goodwin said:I would be much happier with 8 bits in the binary value - I'm always concerned that I'm not 100% sure which way the assembler might justify the 6 to 8!.
meera83 said:movlw b'110001'
movwf TRISA
the PIC16F877 got only 6 bits RA0-RA5, so i just b'110001' not b'8 bit'...
thanks..
eng1 said:Obviously he would be on the safe side using 8 bits (I do that every time), but actually he's loading the six less significant bits of the TRISA register.
Pommie said:I assumed everyone was talking tongue in cheek and joking around.
If you see movlw 0x9 (only 4 bits) do you assume it will add a trailing zero and load 0x90 into W.
When I posted above, "It would of course take B'1' as 128." I was joking.
I don't think I have ever come across a situation where you add trailing zeroes.
meera83 said:Help!Help! i really don't know what can i do with the source code..
I had make some changing to Nigel's LCD tutorial according to my port pin,
from PICDEM 2 PLUS circuit shcematic, the port pin
RA1 - E
RA2 - RW
RA3 - RS
DB4 - RD0
DB5 - RD1
DB6 - RD2
DB7 - RD3
but the LCD still don't have any respond..
Your attachment is only this:meera83 said:this is the changing code that i program in PIC..
list p=16f877 ; list directive to define processor
#include <p16f877.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _LP_OSC & _WRT_ENABLE_OFF & _LVP_OFF & _DEBUG_OFF & _CPD_OFF
; '__CONFIG' directive is used to embed configuration data within .asm file.
; The labels following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configur