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

debug monitor not working [solved]

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



Joined: 02 Oct 2009
Posts: 123
Location: Denmark

View user's profile Send private message

debug monitor not working [solved]
PostPosted: Sat Dec 06, 2014 10:16 am     Reply with quote

I am using the monitor function for the first time. The "monitor" window stays black, empty, looks like the microcontroller is not transmitting or the ICD non receiving. (I have no oscilloscope, but with the multimeter I see the voltage very unstable around 4,4 to 4,8 volts on the pin).

I have wired the pin6 of the target ICD connector to the pin RC4 of a 16F1825. (there is not RB3, RC4 is the USART TX according to datasheet)
http://ww1.microchip.com/downloads/en/DeviceDoc/40001440D.pdf
I have PCWH 5.032. The Led is flashing correctly, and I can read the value of the variable "sens1" in the tab "Watches" if I "Halt" the execution. All is mounted on a bredboard.

Code:

#include <16F1825.h>
#DEVICE ICD=TRUE
#device ADC=10

#use delay(internal=8000000,restart_wdt)

#define LED PIN_C3
#define DELAY 100

#use rs232(DEBUGGER, stream=STREAM_MONITOR, xmit=PIN_C4, rcv=PIN_C4)

int16 sens1, sens2;

void main()
{
   setup_adc_ports(sAN5|sAN6);
   setup_adc(ADC_CLOCK_INTERNAL);

   //Example blinking LED program
   while(true)
   {
      output_low(LED);
      delay_ms(DELAY);
      output_high(LED);
      delay_ms(DELAY);
     
      set_adc_channel(5);
      delay_ms(20);
      sens1=read_adc();
     
      set_adc_channel(6);
      delay_ms(20);
      sens2=read_adc();
     
      printf("ABC");
      //printf("\n sens1=%Lu",sens1);
   }

}


Last edited by webgiorgio on Sun Dec 07, 2014 9:15 am; edited 1 time in total
dyeatman



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

View user's profile Send private message

PostPosted: Sat Dec 06, 2014 10:53 am     Reply with quote

1. the debug monitor does not use the UART
2. Enable debug then click the question mark on the Debug menu bar to open Help
3. In Help Table of Contents go to Debugger then Debugger Windows.
4. Info tells how to designate the Stream Monitor pin and enable the monitor
_________________
Google and Forum Search are some of your best tools!!!!
webgiorgio



Joined: 02 Oct 2009
Posts: 123
Location: Denmark

View user's profile Send private message

PostPosted: Sat Dec 06, 2014 11:03 am     Reply with quote

Nothing happens when I click the quesion mark.
Neither I get anything out of the Help menu (I guess this is a problemm of my computer...with windows xp sp2).
I've to try install on another pc
dyeatman



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

View user's profile Send private message

PostPosted: Sat Dec 06, 2014 11:10 am     Reply with quote

Locate and dbl-click the file pcw.chm in the PICC folder then
> Debugger >> Debugger Windows >> Monitor
_________________
Google and Forum Search are some of your best tools!!!!
webgiorgio



Joined: 02 Oct 2009
Posts: 123
Location: Denmark

View user's profile Send private message

PostPosted: Sun Dec 07, 2014 9:14 am     Reply with quote

Solved! Very Happy
The code and the connections were fine.
The problem was that the monitor function was Disabled in the debug configuration.
So I just did "Debug"->"Debug Configure"->"Monitor Enabled" -> "True".
webgiorgio



Joined: 02 Oct 2009
Posts: 123
Location: Denmark

View user's profile Send private message

PostPosted: Sun Dec 07, 2014 1:11 pm     Reply with quote

if some characters of the strings received in the debug monitor are corrupted, solve with this: http://www.ccsinfo.com/forum/viewtopic.php?t=22089
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