View previous topic :: View next topic |
Author |
Message |
maria100
Joined: 01 Feb 2012 Posts: 63
|
Software UART on ICSP (pgd, pgc) pins |
Posted: Sun Apr 22, 2012 9:40 am |
|
|
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: 9221 Location: Greensville,Ontario
|
|
Posted: Sun Apr 22, 2012 9:55 am |
|
|
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
|
|
Posted: Sun Apr 22, 2012 10:00 am |
|
|
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: 9221 Location: Greensville,Ontario
|
|
Posted: Tue Apr 24, 2012 6:20 am |
|
|
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: 19499
|
|
Posted: Tue Apr 24, 2012 6:52 am |
|
|
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: 19499
|
|
Posted: Tue Apr 24, 2012 7:46 am |
|
|
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
|
|
Posted: Tue Apr 24, 2012 7:57 am |
|
|
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! |
|
|
|