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 support@ccsinfo.com

Serial communication

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



Joined: 01 May 2009
Posts: 1

View user's profile Send private message

Serial communication
PostPosted: Fri May 01, 2009 1:03 am     Reply with quote

Hi,
I have 2 pic.
These are 18f2550 and 16f877.
18f2550 is using usb to communicate with computer that must communicate with 16F877.

Have can i program 2550 to communicate with 877

2550 is using 155200 baud to communicate with pc(for usb)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 01, 2009 7:42 pm     Reply with quote

The 18F2550 could use a software UART or i2c (hardware or software).
Which PIC do you want to be the master (18F2550 or 16F877) ?
Ttelmah
Guest







PostPosted: Sat May 02, 2009 3:01 am     Reply with quote

You refer to a 'baud rate', but also to USB. USB, does not actually have a 'baud rate'. I suspect the PC communications are actually USB, and in which case the hardware UART, would be available to talk to the other PIC.

The baud rate setting on a USB 'serial port', does not actually control the speed being used. It sends a command to the slave device (in this case the PIC), saying that this is the speed to be 'emulated', and if this device is then talking to the outside world, it can then change the settings on this to match the setting, but the actual comms to the PC, do not 'use' this speed setting anywhere, and the actual transfer here is normally at 12Mbps.

If the hardware UART is available, this will be much less likely to cause problems than trying to use the software UART on a chip handling USB.

So, assuming I'm right, and you are not actually using the hardware serial port, then the anwer is the same as PC programmers, but becomes:

The 18F2550 could use a hardware UART or i2c (hardware or software).

Best Wishes
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