Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem related to PIC 18F452

Status
Not open for further replies.

designer

Newbie level 4
Joined
Nov 4, 2003
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
85
#define data portebits.re0

PROBLEMS ENCOUNTERED IN DEVELOPMENT OF AN EMBEDED SYSTEM USING PIC 18F452
PROBLEM NO (1)
WHEN PORT E IS USED AS CONTROL PORT FOR LCD MODULE AND PINS ARE DEFINED AS FOLLOWS

#define RS PORTEbits.RE0
#define RW PORTEbits.RE1
#define E PORTEbits.RE2
#define DATAPORT PORTC

WHEN RS IS 1 ,RW DONT CARE,
AND PORTC IS DEFINED AS OP PORT AND DATA IS PUT ON PORTC
THEN---
IF STROBE IS PUT HIGH THEN DATA ON PORT C GOES Logic '0' AND WHEN STROBE IS PUT LOW THEN DATA AGAIN APPEARS ON PORTC

WE TESTED IF THE PORTE IS FAULTY BUT SINCE THE COUNTER PROGRAMS RUN SUCCESSFUL ON PORTE THIS QUESTION DOES NOT ARISE.


CHANGING THE LCD CONTROL PINS TO PORTD AS
#define RS PORTDbits.RD3
#define RW PORTDbits.RD4
#define E PORTDbits.RD5

OR

#define RS PORTDbits.RD0
#define RW PORTDbits.RD1
#define E PORTDbits.RD2

THE PRBLEM DOES NOT ARISE

PROBLEM NO (2)

WHILE GIVING ASCII 'a' THE DATA AVAILABLE ON PORTB ='a' (i.e 0x61)
butWHILE GIVING ASCII 'A' THE DATA AVAILABLE ON PORTB ='a' (i.e 0x61) again
so that the data put on lcd is small character even if the data is capital ascii
ie there is problem in the PORTBbits.RB5.


IS THERE ANY ONE WHO HAS FACED SUCH PROBLEN AND CAN HELP US


THE CONFIGURATION BITS SET ARE AS FOLLOWS
F9FF
FEFC
FFFF
FFFF
FFFF
FFFF
FFFF
 

#define rs portebits.re0 lcd

Point 1:

Port E is also used as analog port or strobe signal for parallel slave port.
Are either of these functions used or enabled?

Point 2:

Do you have an In-Circuit Programmer (ICSP) like ICD from Microchip or CCS connected when you have the problems with PORTB ??

Because RB7, RB6 and RB5 are used by the ICD when you program and debug your program and are not useable by your program in this case!!

RB5 is used for Low Voltage Programming (LVP)!

hope this helps
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top