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

RS-485 Speed

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








RS-485 Speed
PostPosted: Mon Jul 10, 2006 2:48 pm     Reply with quote

I need to implement an RS-485 interface at 750 kbaud. This would only allow approximately 14 usec between words for pulling a byte out of the UART and putting it in a buffer. Is it practical to do this with an 18F-series part (e.g., 18F4420) running at 24 MHz? This part would be dedicated solely to the RS-485 interface.

Thanks,

Steve
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jul 10, 2006 6:22 pm     Reply with quote

You are certainly pushing the envelope. I run a 40MHz PIC18F452 interrupt driven serial interface at 2.5Mbps but, for timing considerations, I think this is easier than what you are attempting. This particular app is coded in assembler.

I have another implementation that runs a HW UART at 115200 as well as two software UARTs at 115200 full duplex. This implementation is written in CCS with the interrupt handler coded in assembler. Based on my experience with this, I believe this mechanism would allow me to implement the same 2.5Mbps interface (obvioulsy without the software UARTs).

In these implementations a receive interrupt is used for managing the incoming traffic but a buffered polled technique for transmit.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Ttelmah
Guest







PostPosted: Tue Jul 11, 2006 2:02 am     Reply with quote

What would it 'do' with the received data?. You say that it would only pull the data out of the UART, and 'put it in a buffer', but how is this then retrieved, and how is the buffer interfaced (if it is an external dual port memory for example, there will be different 'overheads', to those involved in writing data to a local RAM buffer)?.
If the chip only has to receive this data, and write it perhaps to an external buffer, then this is fairly 'easy' within the timing constraints, using polled reception (poll the interrupt flag, and then execute the retrieval when this is set - this avoids the overheads associated with servicing a interrupt). At 24MHz, assuming the data format is something like 8N1, then there are eighty instruction times to the received byte, and this is a relatively 'good' amount of time to handle the transfer, and buffer access.
It really depends massively, on what is involved in storing the data, and how much data is involved?

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