|
|
View previous topic :: View next topic |
Author |
Message |
acid Guest
|
Struct & lcd |
Posted: Tue Jun 10, 2003 3:10 am |
|
|
HELLO,
I do use lcd.c old example for my application.
I tested the code by PIC18F252, but the lcd doesn't function
because lcd struct doesn't function..
For test it I wrote a routine like this:
//Compiler Vers. 3.148
.......
#byte lcd=7; //port C
do {
lcd=0;
delay_ms(1);
lcd=255;
delay_ms(1);
} while (1);
The portc is always to low level
Some idea?
Thank in advance
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515140 |
|
|
R.J.Hamlett Guest
|
Re: Struct & lcd |
Posted: Tue Jun 10, 2003 8:38 am |
|
|
:=HELLO,
:=
:=I do use lcd.c old example for my application.
:=I tested the code by PIC18F252, but the lcd doesn't function
:=because lcd struct doesn't function..
:=
:=For test it I wrote a routine like this:
:=
:=//Compiler Vers. 3.148
:=
:=.......
:=#byte lcd=7; //port C
:=do {
:=lcd=0;
:=delay_ms(1);
:=lcd=255;
:=delay_ms(1);
:=} while (1);
:=
:=The portc is always to low level
:=Some idea?
:=Thank in advance
Yes. Read the manual for the chip...
PortC, is _not_ at address 6, on the 18 family. The output latch is at 0xF8B, and the port itself, at 0xF82. You are writing straight into the area used for things like the register store, and scratch memory by the compiler...
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515147 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|