PIC16F876 4 bits Display in 16x2 LCD
Discussion in "PIC Microcontroller Discussion" started by pappuneelam May 1, 2011.
Tue May 10 2011, 12:41 pm
Mr. Ajay,
All instructions (like 0Fh,0Eh,C0h..) are working. Wrongly, I put one 'Delay' in between the Instruction subroutines. Its now functioning all in Simulator. Let me burn my code in PIC16F876A.
Thanks a LOT !!!!!!!!
PappuNeelam
; *********** Clear the screen **************
Sc_Clear
movlw 00h
movwf PORTC
call Command_control
;call Delay1
movlw 01h
movwf PORTC
call Command_control
return
All instructions (like 0Fh,0Eh,C0h..) are working. Wrongly, I put one 'Delay' in between the Instruction subroutines. Its now functioning all in Simulator. Let me burn my code in PIC16F876A.
Thanks a LOT !!!!!!!!
PappuNeelam
; *********** Clear the screen **************
Sc_Clear
movlw 00h
movwf PORTC
call Command_control
;call Delay1
movlw 01h
movwf PORTC
call Command_control
return
Wed May 11 2011, 11:46 am
Hallo!
My code is working fine in the simulator. but, when i burnt the same in the PIC16F876A, I`m not getting any display in 16x2 LCD.
Only the Solid block.
Attach herewith my schematic diagram. Please help, if there is any fault in my connection.
PappuNeelam
My code is working fine in the simulator. but, when i burnt the same in the PIC16F876A, I`m not getting any display in 16x2 LCD.
Only the Solid block.
Attach herewith my schematic diagram. Please help, if there is any fault in my connection.
PappuNeelam
Thu May 12 2011, 04:57 pm
@ pappuneelam
solid blocks means that lcd is not configuring properly
see lcd connections once again
and insert 250 ms delay in power start up
also change the contrast pin if u not see any thing on lcd
solid blocks means that lcd is not configuring properly
see lcd connections once again
and insert 250 ms delay in power start up
also change the contrast pin if u not see any thing on lcd
Tue May 17 2011, 10:05 pm
Hallo !
I tried with 50mS powerup delay before initialisation. But, having no display. I tied the control pin 3 to 10k variable resistor.
I am in doublt whether my PIC is Ok or 4Mhz crystal is Ok ?
How to debug the hardware to detect any hardware fault.
PappuNeelam
I tried with 50mS powerup delay before initialisation. But, having no display. I tied the control pin 3 to 10k variable resistor.
I am in doublt whether my PIC is Ok or 4Mhz crystal is Ok ?
How to debug the hardware to detect any hardware fault.
PappuNeelam
Wed May 18 2011, 12:49 am
@ pappuneelam
make a simple led blinking program to test ur pic
toggle any port and see is pic is doing or not
also disable watch dog timer
make a simple led blinking program to test ur pic
toggle any port and see is pic is doing or not
also disable watch dog timer
Mon May 23 2011, 09:49 pm
I tried with this program to blink a LED, but has a constant light on LED with the connection from RB0 pin.
I also used new 4Mhz crystal [KDS make]. Is my PIC16F876A is a damaged one ?
I also used new 4Mhz crystal [KDS make]. Is my PIC16F876A is a damaged one ?
; LED Blink in PIC16F876A ; Crystal used : 4Mhz ;------------------------------- ; Declaration and Configuration of the processor PROCESSOR PIC16F876A #include <P16F876A.inc> __CONFIG H'39B1'; set the configuration word ;******* Macros & Constants ****** BANK0 macro Bcf STATUS,RP0 ;Select memory bank 0 Endm BANK1 macro Bsf STATUS,RP0 ;Select memory bank 1 Endm COUNT1 equ 20h ;counter1 for delay loop COUNT2 equ 21h ;counter2 for delay loop COUNT3 equ 22h ;counter3 for delay loop ;*********** ORG 00h goto Main Main BANK1 movlw 00h movwf TRISA ; set PortA to output mode movlw 00h movwf TRISB ; set PortB to output mode movlw 00h movwf TRISC ; set PortC to output mode BANK0 call Delay bsf PORTB,RB0 call Delay bcf PORTB,RB0 goto Main ;********* Delay subroutine :3 Sec ********* Delay movlw 0Fh movwf COUNT3 loop1 decfsz COUNT1,1; decrease 1 from 255 goto loop1 decfsz COUNT2,1 goto loop1 decfsz COUNT3,1 goto loop1 return end
Powered by e107 Forum System