lindodv
Junior Member level 1
- Joined
- Jul 4, 2014
- Messages
- 16
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 121
Hi all, can you help me solving this problem?
this code is working with PIC16F877A but is not working with PIC18F2520.
0 121 Compilation Started PIC18F2520.c
1 392 'SDA' Identifier redefined PIC18F2520.c
2 401 ; expected, but 'at' found PIC18F2520.c
2 392 'SCL' Identifier redefined PIC18F2520.c
2 370 Specifier needed PIC18F2520.c
2 395 Invalid declarator expected'(' or identifier PIC18F2520.c
3 401 ; expected, but 'at' found PIC18F2520.c
3 370 Specifier needed PIC18F2520.c
3 395 Invalid declarator expected'(' or identifier PIC18F2520.c
3 392 '' Identifier redefined PIC18F2520.c
4 401 ; expected, but 'at' found PIC18F2520.c
4 370 Specifier needed PIC18F2520.c
4 395 Invalid declarator expected'(' or identifier PIC18F2520.c
4 392 '' Identifier redefined PIC18F2520.c
4 312 Internal error '' PIC18F2520.c
0 102 Finished (with errors): 18 Jul 2014, 20:00:20 PIC18F2520.mcppi
this code is working with PIC16F877A but is not working with PIC18F2520.
Code:
sbit SDA at RC4_bit;
sbit SCL at RC3_bit;
sbit SDA_Direction at TRISC4_bit;
sbit SCL_Direction at TRISC3_bit;
void main() {
SDA_Direction=0;
SCL_Direction=0;
do{
SDA = 1;
SCL = 0;
delay_ms(2000);
SDA = 0;
SCL = 1;
} while(1);
}
0 121 Compilation Started PIC18F2520.c
1 392 'SDA' Identifier redefined PIC18F2520.c
2 401 ; expected, but 'at' found PIC18F2520.c
2 392 'SCL' Identifier redefined PIC18F2520.c
2 370 Specifier needed PIC18F2520.c
2 395 Invalid declarator expected'(' or identifier PIC18F2520.c
3 401 ; expected, but 'at' found PIC18F2520.c
3 370 Specifier needed PIC18F2520.c
3 395 Invalid declarator expected'(' or identifier PIC18F2520.c
3 392 '' Identifier redefined PIC18F2520.c
4 401 ; expected, but 'at' found PIC18F2520.c
4 370 Specifier needed PIC18F2520.c
4 395 Invalid declarator expected'(' or identifier PIC18F2520.c
4 392 '' Identifier redefined PIC18F2520.c
4 312 Internal error '' PIC18F2520.c
0 102 Finished (with errors): 18 Jul 2014, 20:00:20 PIC18F2520.mcppi