burrow
Full Member level 2
- Joined
- Dec 15, 2014
- Messages
- 147
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 18
- Activity points
- 1,148
Hai,
iam trying to establish communication between 2 PIC mcu, PIC18F4520 and PIC16F628A.
actually i need to establish long distance communication so i am going to use max232 and all.
But now i just tested them with direct connection. ( no max232 or anything in between) with wires few cms long. but it doesnt seem to work.
sometimes i get random values and other times nothing.
In 18f4520 i am using following configs
crystal iam using 16mhz
in 16f628a their was no registers to set, just initialized UART to same baudrate.
The circuit works fine in proteus
is their anyway i can test whats going wrong ? something like meters on Rx or tx line ?
iam trying to establish communication between 2 PIC mcu, PIC18F4520 and PIC16F628A.
actually i need to establish long distance communication so i am going to use max232 and all.
But now i just tested them with direct connection. ( no max232 or anything in between) with wires few cms long. but it doesnt seem to work.
sometimes i get random values and other times nothing.
In 18f4520 i am using following configs
Code:
UART1_Init(9600);
TXSTA.SYNC=0;
TXSTA.TXEN=1;
TXSTA.BRGH=0;
BAUDCON.RXDTP=0;
BAUDCON.ABDEN=0;
BAUDCON.BRG16 =0;
BAUDCON. BRGH =0 ;
SPBRGH = 0b00000000 ;
SPBRG = 0b00011001 ;
in 16f628a their was no registers to set, just initialized UART to same baudrate.
The circuit works fine in proteus
is their anyway i can test whats going wrong ? something like meters on Rx or tx line ?