CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Struct & lcd

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
acid
Guest







Struct & lcd
PostPosted: Tue Jun 10, 2003 3:10 am     Reply with quote

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
PostPosted: Tue Jun 10, 2003 8:38 am     Reply with quote

:=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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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