Line 82: Error #118: Invalid conversion from LONG INT to INT
Posted: Fri Dec 06, 2002 1:38 am
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
Posted: Fri Dec 06, 2002 4:07 am
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
Posted: Fri Dec 06, 2002 4:50 am
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
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