View previous topic :: View next topic |
Author |
Message |
miguel111
Joined: 06 Nov 2014 Posts: 2
|
CCS interrupt rda |
Posted: Thu Nov 06, 2014 3:44 pm |
|
|
hi guys,
I need your help about ccs compiler and rs232 preprocessor directives.
1. can i use rs232 directive on pins without uart hardware ?
if 1 is possible,
2. can i use rda interrupt?
Thanks a lot!
|
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Thu Nov 06, 2014 4:09 pm |
|
|
The answer is yes and no
You can specify non UART pins and the compiler will generate a
software UART for those pins. However, a software UART cannot
use the standard RDA interrupts. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Thu Nov 06, 2014 5:24 pm |
|
|
You might also consider reliability of SOFT uarts.....
If your program has significant time domain complexity,
and especially if it has other interrupts enabled, character
reception may fail intermittently, and transmitting may produce
mis-framed output characters. the lower the baud rate the more likely
the latter situation is to occur.
summary: serious projects do NOT make use of soft uarts
unless GREAT care is taken in design to work around the numerous
situations that can cause malfunction in runtime. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Thu Nov 06, 2014 6:06 pm |
|
|
As others have said it's a yes and no answer though really you should look at another PIC if you need more than one UART with interrupt capacity. Several have 2 UARTs, like the 18F46K22 and you can add additional peripheral UARTs with say I2C<>UART devices.
If you explain the scope of your project we can better direct you to a better solution.
uChip make a LOT of PICs and the CCS compiler handles them all...
hth
Jay |
|
|
miguel111
Joined: 06 Nov 2014 Posts: 2
|
|
Posted: Thu Nov 06, 2014 8:49 pm |
|
|
temtronic wrote: | As others have said it's a yes and no answer though really you should look at another PIC if you need more than one UART with interrupt capacity. Several have 2 UARTs, like the 18F46K22 and you can add additional peripheral UARTs with say I2C<>UART devices.
If you explain the scope of your project we can better direct you to a better solution.
uChip make a LOT of PICs and the CCS compiler handles them all...
hth
Jay |
Ok, thank you for your answers, I understand you.
The project is a pic18f26J50 and a sim5320A on starter kit and it don't have possibilities of changes.
The problem is that uart hardware is not connected with uart hardware of the sim5320A...and i want use a RDA interrupts by software for the received messages but i don't know programming it with ccs compiler.
Can you give me an example?
The old version starter kit is
http://mcelectronics.com.ar/site/wp-content/uploads/2014/04/MG_8629-400x400.jpg
thanks! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Fri Nov 07, 2014 1:15 am |
|
|
Line 2 of D Yeatman's answer:
"However, a software UART cannot use the standard RDA interrupts."
Note the word 'cannot'....
Doing RS232 in software, has big limitations. Half duplex only, unless a 'tick' based approach is used, and a lot of work.
However a thing is 'screaming' at me. You have the 26J50. This has two hardware UART's, and the second of these is configurable to use just about any pin on the chip.
So, what pins are the sim5320A connected to?.
TX on 5320 to what pin on PIC?
RX of 5320 to what pin on PIC?.
With this, we can tell you how to configure the second _hardware_ UART to talk to this.
The re-mappable peripheral ability of the 26J50, is probably 'why' the device is not connected to the UART1 pins. |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Fri Nov 07, 2014 11:09 am |
|
|
Hi,
Seriously, if you are asking such basic questions as you are about to embark on a PIC/GSM project, I would take about ten steps back and start off with something much more simple. If you start with a PIC/GSM project as your very first embedded effort, you are almost 100% guaranteed to fail!
I really don't want to throw cold water on you, but I am being totally realistic based on previous attempts at this type of project by other 'newbies' here on the forum!
John |
|
|
|