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 support@ccsinfo.com

Software UART on ICSP (pgd, pgc) pins

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



Joined: 01 Feb 2012
Posts: 63

View user's profile Send private message

Software UART on ICSP (pgd, pgc) pins
PostPosted: Sun Apr 22, 2012 9:40 am     Reply with quote

Hello, I have tried this as in title, but it does not work. Is this a hardware problem? My PIC is 18F14k50. Thank you.
temtronic



Joined: 01 Jul 2010
Posts: 9165
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Apr 22, 2012 9:55 am     Reply with quote

I suspect that you may have set ICD=TRUE or are trying to use the debugger, or ICSP.....

You must disable all that 'stuff'...

One of the prime reasons for buying CCS back in '99 was their abilty to use any pins for software UARTs, same still holds true today.
maria100



Joined: 01 Feb 2012
Posts: 63

View user's profile Send private message

PostPosted: Sun Apr 22, 2012 10:00 am     Reply with quote

I did not set ICD, however I have a permanent MCLR pullup on my board. This could be the cause ?
temtronic



Joined: 01 Jul 2010
Posts: 9165
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Apr 24, 2012 6:20 am     Reply with quote

No, all my boards have MCLR tied high or disabled in fuses, for decades, as I never use ICSP or ICD or any other 'debugger'.
Ttelmah



Joined: 11 Mar 2010
Posts: 19348

View user's profile Send private message

PostPosted: Tue Apr 24, 2012 6:52 am     Reply with quote

You say you don't select ICD. What are you compiling 'through'?. If perchance, you are using MPLAB, this _defaults_ to enabling ICD. You have to change it's settings to say to compile for release, or it turns ICD on whatever you do....
Might be the problem.

Best Wishes
Ttelmah



Joined: 11 Mar 2010
Posts: 19348

View user's profile Send private message

PostPosted: Tue Apr 24, 2012 7:46 am     Reply with quote

Read the data sheet:
"RA0 and RA1 do not have TRISA bits associated with
them. As digital port pins, they can only function as
digital inputs".

So you can use one of the pins as a software UART RX pin, but you can't generate TX on the other pin.

Best Wishes
maria100



Joined: 01 Feb 2012
Posts: 63

View user's profile Send private message

PostPosted: Tue Apr 24, 2012 7:57 am     Reply with quote

I was just finishing reading now a other post about this and find that pgd, pgc can be only inputs , heh, even so , thank you for clearing things up once again!
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