LCD_Cmd(LCD_CLEAR)
LCD_Cmd(LCD_CURSOR_OFF)
LCD_Out(1,1,"******WELCOME******")
LCD_Out(2,1," H.M.H HOME ")
LCD_Out(3,1," AUTOMATED SYSTEM ")
i attached the DSN file in the rar fileHi,
Cannot see the part number clearly on your pngs, posting your .dsn would be better.
2. NOWDT, POR_ENABLE, XT_OSC, NO_LVD, mmmm i think they are the most important.
how to make POR_ENABLE i cannot find it in mikrobasic configuration bits
also XT_OSC would it harm if it was HS_OSC as i use 4MHZ and i might increase it to 6MHZ
thank u again
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ;========================================================================== ;----- CONFIG Options from MPlab Include files -------------------------------------------------- _FOSC_LP EQU H'3FFC' ; LP oscillator _LP_OSC EQU H'3FFC' ; LP oscillator _FOSC_XT EQU H'3FFD' ; XT oscillator _XT_OSC EQU H'3FFD' ; XT oscillator _FOSC_HS EQU H'3FFE' ; HS oscillator _HS_OSC EQU H'3FFE' ; HS oscillator _FOSC_EXTRC EQU H'3FFF' ; RC oscillator _RC_OSC EQU H'3FFF' ; RC oscillator _WDTE_OFF EQU H'3FFB' ; WDT disabled _WDT_OFF EQU H'3FFB' ; WDT disabled _WDTE_ON EQU H'3FFF' ; WDT enabled _WDT_ON EQU H'3FFF' ; WDT enabled _PWRTE_ON EQU H'3FF7' ; PWRT enabled _PWRTE_OFF EQU H'3FFF' ; PWRT disabled _BOREN_OFF EQU H'3FBF' ; BOR disabled _BODEN_OFF EQU H'3FBF' ; BOR disabled _BOREN_ON EQU H'3FFF' ; BOR enabled _BODEN_ON EQU H'3FFF' ; BOR enabled _LVP_OFF EQU H'3F7F' ; RB3 is digital I/O, HV on MCLR must be used for programming _LVP_ON EQU H'3FFF' ; RB3/PGM pin has PGM function; low-voltage programming enabled _CPD_ON EQU H'3EFF' ; Data EEPROM code-protected _CPD_OFF EQU H'3FFF' ; Data EEPROM code protection off _WRT_HALF EQU H'39FF' ; 0000h to 0FFFh write-protected; 1000h to 1FFFh may be written to by EECON control _WRT_1FOURTH EQU H'3BFF' ; 0000h to 07FFh write-protected; 0800h to 1FFFh may be written to by EECON control _WRT_256 EQU H'3DFF' ; 0000h to 00FFh write-protected; 0100h to 1FFFh may be written to by EECON control _WRT_OFF EQU H'3FFF' ; Write protection off; all program memory may be written to by EECON control _DEBUG_ON EQU H'37FF' ; In-Circuit Debugger enabled, RB6 and RB7 are dedicated to the debugger _DEBUG_OFF EQU H'3FFF' ; In-Circuit Debugger disabled, RB6 and RB7 are general purpose I/O pins _CP_ON EQU H'1FFF' ; All program memory code-protected _CP_ALL EQU H'1FFF' ; All program memory code-protected _CP_OFF EQU H'3FFF' ; Code protection off
main:
trisd=%00000000
portc.2=0
delay_ms(1000)
lcd_config(portd,7,6,5,4,portd,3,2,1)
delay_ms(1000)
lcd_cmd(lcd_clear)
delay_ms(1000)
hamza:
delay_ms(1000)
lcd_out(1,1,"WELCOME")
delay_ms(1000)
setbit(portc,2)
delay_ms(300)
clearbit(portc,2)
delay_ms(300)
goto hamza
end.
hello agian ......sorry for being late
i tried each idea of the above and this is what i did
i used several other codes (note mine) only to show the word WELCOME on the LCD and to make a LED blink and when i start up the hardware the LCD shows nothing except for black areas in the first and some times second row and the LED on the other hand works as i programed
samples of the code used and connection are attached her
pleaaaaaaaaaaaaaaaaase if any one can give a working LCD code in mikrobasic and a valid and tested hardware connection with risistance and capacitance values and hardware connection and supply value and connection it would be helpfull pleeeeeeease help
program lcdtest
first code tested
Code:main: trisd=%00000000 portc.2=0 delay_ms(1000) lcd_config(portd,7,6,5,4,portd,3,2,1) delay_ms(1000) lcd_cmd(lcd_clear) delay_ms(1000) hamza: delay_ms(1000) lcd_out(1,1,"WELCOME") delay_ms(1000) setbit(portc,2) delay_ms(300) clearbit(portc,2) delay_ms(300) goto hamza end.
i also tried the above code wih
lcd_config(portd,7,6,5,4,portb,3,2,1) or lcd_config(portb,7,6,5,4,portb,3,2,1) or LCD_init(portb)or LCD_init(portd) insteade of lcd_config(portd,7,6,5,4,portd,3,2,1) and other connecions
and i connect as follow
for LCD_init(portb)
RW,d0,d1,d2,d3 ------------------> ground direct without pull or down resistances
d4------->RB4 direct without pull or down resistances
d5------->RB5 direct without pull or down resistances
d6------->RB6 direct without pull or down resistances
d7------->RB7 direct without pull or down resistances
Vee through 4.7 kohm potentiometer or directlygrounded
vcc ,ground as usual to 5v and ground
about OSC ---->4MHZ through two 22Mfarad capacitors to ground
MCLR through 10 Kohm Resistance to 5 volt
Vss and Vdd as usual with a capacitor connecting them
please help me............
keypad_init(portd)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?