View previous topic :: View next topic |
Author |
Message |
vinniewryan
Joined: 29 Jul 2009 Posts: 154 Location: at work
|
basic USART question |
Posted: Thu Mar 17, 2011 11:53 am |
|
|
Previously I've been using software RS-232 to communicate between an RF receiver and a 16F684, but while the pic receives data the whole program slows down. I've been considering switching to a 16f688 which has a built in USART. Will having hardware USART fix the problem of the code slowing as data is received? _________________ Vinnie Ryan |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Mar 17, 2011 12:10 pm |
|
|
Well, yes, if you use a interrupt-driven receive buffer. The amount of time
taken from your main program to receive one character can be as little as
10 or 11 microseconds, if you run the PIC at 20 MHz. Look at this CCS
example file:
Quote: |
c:\program files\picc\examples\ex_sisr.c |
|
|
|
|