View previous topic :: View next topic |
Author |
Message |
HOHOHAHA
Joined: 13 Apr 2007 Posts: 24
|
PIC16F877A and PIC16f84A |
Posted: Thu Jan 24, 2008 11:33 am |
|
|
Is it possible to communicate between PIC16F877A and PIC16F84A .. ? Is RS232 communication possible ... ? I want to drive the stepper motor with PIC16F84A .. and send the data back to F877A ... the F877A would be scanning a hell lot of sensors .. and giving output to LCD...
I dont want to use a stepper motor driver .. $$ .. while F84A is cheap .. and would easily do my job ... if it can communicate......
Thanks in Advance |
|
|
John P
Joined: 17 Sep 2003 Posts: 331
|
|
Posted: Thu Jan 24, 2008 3:18 pm |
|
|
Forget the PIC16F84A; use the PIC16F628 instead. It's got an identical pinout, can run off an internal oscillator (no crystal needed) and costs about the same. The PIC16F628 has a serial port and an SPI port, so there's your communication. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jan 24, 2008 3:39 pm |
|
|
It doesn't have an SPI port. It doesn't have an SSP, so you can't do
an i2c Slave with it. |
|
|
Guest
|
|
Posted: Thu Jan 24, 2008 3:45 pm |
|
|
RS232 is possible - I have used the software UART in CCS C with the '84 many times. But like the other poster said a newer more feature rich PIC may be a better choice now. But if you want to use the 84 you can. I had a project once that used telephone cables to have a 2 wire multidrop bus. Each PIC on the 'drop' had it's own address and would listen for it's address and respond. My program could even query each address and see who answered - hence - autoconfig. This was all done simply with software UARTS. |
|
|
John P
Joined: 17 Sep 2003 Posts: 331
|
|
Posted: Thu Jan 24, 2008 4:46 pm |
|
|
Oops! Yes, that's correct. The '628 has no SPI. But it has got a UART, so that's the easy way to communicate.
You can set up a software serial port, and it can run off a pin-change interrupt and a timer rather than waiting for each character to complete, but you'd have a hard time making that work at the same time as running something at constant frequency, like a stepper motor. A hardare UART wouldn't have that problem, as long as you have enough time to service it without missing characters. |
|
|
gg Guest
|
Re |
Posted: Fri Jan 25, 2008 2:55 am |
|
|
you could use the 16F648A instead, its got more ROM space (and all the features that are in 628) and is cheaper than 16F628 apart from being pin compatible with 628.
Yes RS 232 communication is possible between the PICs.
taa |
|
|
Guest
|
Re: PIC16F877A and PIC16f84A |
Posted: Tue Feb 05, 2008 2:50 pm |
|
|
[quote="HOHOHAHA"]Is it possible to communicate between PIC16F877A and PIC16F84A .. ? Is RS232 communication possible ... ? I want to drive the stepper motor with PIC16F84A .. and send the data back to F877A ... the F877A would be scanning a hell lot of sensors .. and giving output to LCD...
I dont want to use a stepper motor driver .. $$ .. while F84A is cheap .. and would easily do my job ... if it can communicate......
Thanks in Advance[/quote] |
|
|
|