??? 05/14/08 06:42 Read: times |
#154755 - code i used, Responding to: ???'s previous message |
hi
i tried with all the 89c52's i have and all are giving the same problem. i wonder if there is any thing wrong with my code. i will connect the lcd to some other pins and try again. however i am posting the code i used. maybe you could suggest some changes. ...;lcd display for 16 pin ;RS :- (12) P3.2 ;R/W :- (13) P3.3 ;E :- (14) P3.4 ;D0 -D7 :- (21-28) P2 ;PIN 15 :- ;PIN 16 :- rs equ p3.2 rw equ p3.3 enb equ p3.4 dio equ p2 org 0x0000 prog_strt: ;following delay is required lcall delay lcall delay lcall delay ;initialization of a 2 lines 5x7 matrix clr p1.3 mov a,#0x38 lcall cmnd lcall delay lcall delay ;display off cursor off mov a,#0x0e lcall cmnd lcall delay ;clear display screen mov a,#0x01 lcall cmnd lcall delay ;shift cursor to right mov a,#0x06 lcall cmnd lcall delay ;address of the location on lcd mov a,#0x84 lcall cmnd lcall delay lcall delay ;send 'ready' mov a,#'a' lcall daataa mov a,#'2' lcall daataa mov a,#'z' lcall daataa setb p1.3 inf:sjmp inf cmnd: mov dio,a clr rs clr rw setb enb nop nop nop nop nop clr enb lcall delay ret daataa: mov dio,a setb rs clr rw setb enb nop nop nop nop nop nop clr enb lcall delay ret delay: mov 0x46,#0xff g1: djnz 0x46,g1 ret end... |
Topic | Author | Date |
16 pin lcd working with at89s52 but not at89c52 | 01/01/70 00:00 | |
Data pointer | 01/01/70 00:00 | |
try this | 01/01/70 00:00 | |
code i used, | 01/01/70 00:00 | |
schematic? | 01/01/70 00:00 | |
Please ground the rw pin in your circuit.![]() | 01/01/70 00:00 | |
modify a little | 01/01/70 00:00 | |
another suggestion would be | 01/01/70 00:00 | |
still doesnt work | 01/01/70 00:00 | |
Check your SI | 01/01/70 00:00 |