Solar000
Member level 2
- Joined
- Feb 6, 2013
- Messages
- 49
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- Greece
- Activity points
- 1,649
Two pics 16f877a connection and code for stepper motors
Hello, i am controlling stepper motors with pic 16f877a but i want to connect a second same pic to
be able to use more ports and control more motors.
1.To connect a pic with another i only need Rx and Tx of both connected together ? Do i need a crystal for the second pic?
The first pic has a max232
2.How can i set different values to a port of the second pic with micro c?
For example now i have a function like this
I want to do this
or another port of second pic
and choose the port i like of the second pic to move
Hello, i am controlling stepper motors with pic 16f877a but i want to connect a second same pic to
be able to use more ports and control more motors.
1.To connect a pic with another i only need Rx and Tx of both connected together ? Do i need a crystal for the second pic?
The first pic has a max232
2.How can i set different values to a port of the second pic with micro c?
For example now i have a function like this
Code:
void Move(){
TrisB = 0x00;
PortB = 0x00;
PORTB=0b00000110;
Delay_ms(50);
PORTB=0b00000101;
}
I want to do this
Code:
void Move(){
TrisB = 0x00;
PortB = 0x00;
PORTB=0b00000110; // portB from second pic
Delay_ms(50);
PORTB=0b00000101; // portB from second pic
}
or another port of second pic
Code:
PORTC=0b00000110; // portC from second pic
Delay_ms(50);
PORTC=0b00000101; // portC from second pic
PORTD=0b00000110; // portD from second pic
Delay_ms(50);
PORTD=0b00000101; // portD from second pic
and choose the port i like of the second pic to move
Last edited by a moderator: