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

Line 82: Error #118: Invalid conversion from LONG INT to INT

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







Line 82: Error #118: Invalid conversion from LONG INT to INT
PostPosted: Fri Dec 06, 2002 1:38 am     Reply with quote

I transfered version 1.03 from 16F877 to 18F452, I use PCWH v3.110. Make the follwing changes:

In file p16web.c

change or add address of timer1 register

16F877
//#byte TIMER_1_HIGH= 0x0f

18F452
#byte TIMER_1_HIGH= 0xfcf
#bit RD16 = 0xfcd.7 // this bit is new in 18F452 in register T1CON and controls read/write operations of timer1

change addresses of port a-c

16F877
//#byte PORTA = 5 // Main I/O ports
//#byte PORTB = 6
//#byte PORTC = 7

18F452
#byte PORTA = 0xf80 // Main I/O ports
#byte PORTB = 0xf81
#byte PORTC = 0xf82

add the RD16 = 0; command after the setup_timer_1() command in main()

setup_timer_1(TIMER1_SET); // Init timer
RD16 = 0; // new bit in 18F452, enables register read/write in two 8 bit operations

In file p16_eth.h

change address of port d-e

16F877
//#byte PORTD = 8
//#byte PORTE = 9

18F452
#byte PORTD = 0xf83
#byte PORTE = 0xf84

Error????
Line 82: Error #118: Invalid conversion from LONG INT to INT
___________________________
This message was ported from CCS's old forum
Original Post ID: 9814
nilsener
Guest







Re: Line 82: Error #118: Invalid conversion from LONG INT to
PostPosted: Fri Dec 06, 2002 4:07 am     Reply with quote

You have posted only the changes to make in v1.03 when transfering to 18F452, please post the complete sourcecode and mark line 82.

regards nilsener

:=I transfered version 1.03 from 16F877 to 18F452, I use PCWH v3.110. Make the follwing changes:
:=
:=In file p16web.c
:=
:=change or add address of timer1 register
:=
:=16F877
:=//#byte TIMER_1_HIGH= 0x0f
:=
:=18F452
:=#byte TIMER_1_HIGH= 0xfcf
:=#bit RD16 = 0xfcd.7 // this bit is new in 18F452 in register T1CON and controls read/write operations of timer1
:=
:=change addresses of port a-c
:=
:=16F877
:=//#byte PORTA = 5 // Main I/O ports
:=//#byte PORTB = 6
:=//#byte PORTC = 7
:=
:=18F452
:=#byte PORTA = 0xf80 // Main I/O ports
:=#byte PORTB = 0xf81
:=#byte PORTC = 0xf82
:=
:=add the RD16 = 0; command after the setup_timer_1() command in main()
:=
:=setup_timer_1(TIMER1_SET); // Init timer
:=RD16 = 0; // new bit in 18F452, enables register read/write in two 8 bit operations
:=
:=In file p16_eth.h
:=
:=change address of port d-e
:=
:=16F877
:=//#byte PORTD = 8
:=//#byte PORTE = 9
:=
:=18F452
:=#byte PORTD = 0xf83
:=#byte PORTE = 0xf84
:=
:=Error????
:=Line 82: Error #118: Invalid conversion from LONG INT to INT
___________________________
This message was ported from CCS's old forum
Original Post ID: 9820
kuosda
Guest







Re: Line 82: Error #118: Invalid conversion from LONG INT to
PostPosted: Fri Dec 06, 2002 4:50 am     Reply with quote

I use PCWH v3.128

p16_ip.h Line 82:
Error #118: Invalid conversion from LONG INT to INT

line 82: get_lword(remip.l) && // Sender's IP addr

Thank you!
___________________________
This message was ported from CCS's old forum
Original Post ID: 9822
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