View previous topic :: View next topic |
Author |
Message |
andreluizeng
Joined: 04 Apr 2006 Posts: 117 Location: Brasil
|
Problems with 18f4525 |
Posted: Fri Jun 23, 2006 7:09 pm |
|
|
Hi people,
im having some weird problem with this pic.
its just stops working...
im using a LCD on PORTD which controls pins are connecteds on PORTE (RE0, RE1 and RE2)...
the project was working fine but suddenly stops working..
im tried everything.. i changed the crystal (20mhz), i changed capacitors. but LCD doesnt working anymore..
but when i use pic 16f877 the project starts working again..
i buy another 18f4525 and didnt work either..
i dont know why it just working on 16f877 now..
all peripheral on portd are disabled...
please.. heeeeeeeeeeeeeeelp.
regards. _________________ Andre |
|
|
andreluizeng
Joined: 04 Apr 2006 Posts: 117 Location: Brasil
|
|
Posted: Fri Jun 23, 2006 7:24 pm |
|
|
i already now that is problem with my hardware and not with pic...
because i did half of circuit on protoboard and it works fine..
but.. the question is.. why works with 16f877 and doesnt work with 18f4525 ??? _________________ Andre |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Jun 24, 2006 12:18 am |
|
|
The most likely reason for the LCD not working when moving from 16F
to 18F is the i/o Port addresses in the LCD driver. For example, in the
16F877, Port D has the address of 0x08, but in the 18F4525 it's 0xF83.
Also, the addresses for Port E are 0x09 and 0xF84, respectively.
CCS has taken care of this problem by using #ifdef statements in their
LCD.C driver to select the proper address for PCM or PCH. You didn't
say what LCD driver you are using. If you're not using the CCS
driver or if you are using an older driver, then this could be the problem. |
|
|
andreluizeng
Joined: 04 Apr 2006 Posts: 117 Location: Brasil
|
|
Posted: Sat Jun 24, 2006 7:43 am |
|
|
PCM,
i took care about this..
as i said..
i was working.. then.. it stops..
i found the problem.. maybe is my power suply (switched) but i have filters and regulators in my hardware.
but, why it still working with 16f877 and 18f4525 not ? _________________ Andre |
|
|
|