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

How to get the UART1 tab to appear in MPLAB X output window?

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

How to get the UART1 tab to appear in MPLAB X output window?
PostPosted: Fri Aug 14, 2020 2:56 pm     Reply with quote

I've selected the tickbox for "Enable UART1 i/o" in the Project Properties/
Simulator window. I've selected output to a window.

Then I compile and run my program in Debug mode in MPLAB X.
It's supposed to display the UART1 tab in the Output Window and display
text from my printf statements. But it doesn't ever do it.

Is there some hidden trick to this ? Does this feature work with CCS,
or is it only with XC8 ?

MPLAB X vs. 5.35
CCS Plugin vs. 3.12

PIC 16F1847
CCS compiler vs. 5.092
Ttelmah



Joined: 11 Mar 2010
Posts: 19510

View user's profile Send private message

PostPosted: Sat Aug 15, 2020 1:33 am     Reply with quote

It should appear in the menu of available windows, as soon as something is
actually sent to the UART.
Just made a really basic program, set it up with this option, and simulator,
then selected debug main project. Put a halt at the first fprintf line.
Ran. No window. Then stepped over the line (so a message is sent to the
UART), and as soon as I did this, the tab 'UART 1 Output' appears.
This is what MicroChip says should happen. The window should appear as
soon as data is sent to the UART, when you run the program in the
simulator.
Double check you have got this project set as the main project (otherwise
it could be debugging something else..).
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Aug 15, 2020 1:39 am     Reply with quote

It didn't work for me. Can you post your basic program ?
I'll make a new project for it and test it.

What's your version of MPLAB X ?
Ttelmah



Joined: 11 Mar 2010
Posts: 19510

View user's profile Send private message

PostPosted: Sat Aug 15, 2020 8:18 am     Reply with quote

OK.
Code:

#include <18F1320.h>
#use delay(internal=8MHz)

#FUSES NOWDT                    //No Watch Dog Timer

#use rs232(UART1, baud=9600, stream=DEBUG, ERRORS)

void main()
{
   unsigned int16 value = 0x00000139;
   
   fprintf(DEBUG,"%4d\r\n", value);   // Outputs "  313" as expected
   fprintf(DEBUG,"%4.2w\r\n", value);   // Outputs " 3.13" as expected
 
   while(TRUE)
   {
       delay_cycles(1);
   }
}


5.35. Also tried with 5.30.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Aug 15, 2020 12:07 pm     Reply with quote

Well, nothing's going to happen anytime soon on this, because perhaps
foolishly, while waiting for your reply, I un-installed vs. 5.35 and installed
vs. 5.40.

But then vs. 5.40 says it needs JRE vs. 1.7 or higher, and of course it's
not installed by 5.40, nor does 5.40 even tell me during installation that
it needs it. But I sort of remember something like this from the past.

So then I install Oracle Java (the latest), but MPLAB X doesn't even know
it's there. Yes, I know I could go in and try to change the path, but
instead I give up. I decide to go back to vs. 5.35.

So, I look in Control Panel / List of installed programs, and MPLAB X is
not even listed. So then I go to Programs / Program Files (x86) and
find it there, and click on Un-install. Then it tells me "This App can't run
on this PC". Cute. I try running as Admin, I try compatiblity with
Windows 7, no go. At this point I am disgusted with Microchip.
I'm running Windows 10 Pro vs. 1909.

I am now going to try to re-install vs. 5.35.
Ttelmah



Joined: 11 Mar 2010
Posts: 19510

View user's profile Send private message

PostPosted: Sat Aug 15, 2020 12:51 pm     Reply with quote

Actually I'd suggest going back to 5.30.

I realise, I launched the project in 5.30, before 5.35. Wonder if this
caused the different behaviour....
I have three versions on the system at present.

In common with MPLAB-X itself, I don't 'trust' the new versions.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Aug 15, 2020 9:45 pm     Reply with quote

With MPLAB X vs. 5.30 it finally works.

Thank you, Ttelmah.
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