Anand Kr. Singh
Newbie level 4
- Joined
- Jul 30, 2014
- Messages
- 6
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 43
At First,i have used pic16f877a every thing is working fine
code:
but now i have use pic18f452...but the lcd display is not show ..i thick there will be in declaration of hex...please help me. i m use ccs compiler and pickit2.
code for 18f452:
please reply soon....
code:
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include<16f877a.h> #include<string.h> #use delay(clock=4000000) #fuses NOLVP,NOWDT,NOPROTECT,HS #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, BITS=8, PARITY=N,stream=PUMP,ERRORS) #bit LCD_RS = 0x8.2 //RD2 #bit LCD_RW = 0x8.0 //RD0 #bit LCD_EN = 0x8.3 //RD3 #bit RELAY1 = 0x5.0 //RA1 #bit RELAY2 = 0x5.1 //RA2 #bit RELAY3 = 0x5.2 //RA3 #bit RELAY4 = 0x5.3 //RA4 #byte LCD_DATA = 8 #define LCD_STROBE() (( LCD_EN = 1),(LCD_EN=0))
code for 18f452:
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include<18f452.h> #include<string.h> #use delay(clock=4000000) #fuses NOLVP,NOWDT,NOPROTECT,HS #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, BITS=8, PARITY=N,stream=PUMP,ERRORS) //#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,BITS=8,PARITY=N,stream=PUMP,FORCE_SW,RESTART_WDT) #bit LCD_RS = 0x83.2 //PORTDbits.RD2 //RD2 #bit LCD_RW = 0x83.0 //0xF83.0 //RD0 #bit LCD_EN = 0x83.3 //0xF83.3 //RD3 #bit RELAY1 = 0xF80.0 //RA1 #bit RELAY2 = 0xF80.1 //RA2 #bit RELAY3 = 0xF80.2 //RA3 #bit RELAY4 = 0xF80.3 //RA4 #byte LCD_DATA = 8 #define LCD_STROBE() (( LCD_EN = 1),(LCD_EN=0))
please reply soon....
Last edited by a moderator: