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

CCS interrupt rda

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



Joined: 06 Nov 2014
Posts: 2

View user's profile Send private message AIM Address

CCS interrupt rda
PostPosted: Thu Nov 06, 2014 3:44 pm     Reply with quote

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!

Cool
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Nov 06, 2014 4:09 pm     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Thu Nov 06, 2014 5:24 pm     Reply with quote

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: 9245
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Nov 06, 2014 6:06 pm     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Thu Nov 06, 2014 8:49 pm     Reply with quote

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: 19546

View user's profile Send private message

PostPosted: Fri Nov 07, 2014 1:15 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Nov 07, 2014 11:09 am     Reply with quote

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