![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Guest
|
RS-485 Speed |
Posted: Mon Jul 10, 2006 2:48 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Mon Jul 10, 2006 6:22 pm |
|
|
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!! |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Tue Jul 11, 2006 2:02 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|