CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC16F877A and PIC16f84A

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
HOHOHAHA



Joined: 13 Apr 2007
Posts: 24

View user's profile Send private message AIM Address

PIC16F877A and PIC16f84A
PostPosted: Thu Jan 24, 2008 11:33 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jan 24, 2008 3:18 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jan 24, 2008 3:39 pm     Reply with quote

It doesn't have an SPI port. It doesn't have an SSP, so you can't do
an i2c Slave with it.
Guest








PostPosted: Thu Jan 24, 2008 3:45 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jan 24, 2008 4:46 pm     Reply with quote

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
PostPosted: Fri Jan 25, 2008 2:55 am     Reply with quote

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
PostPosted: Tue Feb 05, 2008 2:50 pm     Reply with quote

[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]
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group