i don't understand with what you mean..is it my source code have mistake? may i know which part of code should i correct it??
i only program this file inside PIC, no any other file...
yap, before that, i had go through Nigel's LCD tutorial 3..
since i had to use PICDEM 2 PLUS to program it and display on its LCD, i had to change the code inside the tutorial(for the port pin)..
since i new to LCD step source code, i fail to make the LCD work...the LCD display seen like didn't have any respond...
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
This last bit of code looks like Nigel's.
This is why I can't follow your code. It switches from 8 bit to 4 bit. It cannot be both.
I would suggest modifying Nigel's code and get that working first.
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!.
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!.
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!.
But W has 8 bits, so are you loading it's top 6 bits?, or it's bottom 6 bits? - like I said, I'd be MUCH happier to see 8 bits so you KNOW it's correct.
You can't load W with only 6 bits, so make sure it's loading the bits in the place you want.
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.
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.
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.
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.
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
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
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