View previous topic :: View next topic |
Author |
Message |
webgiorgio
Joined: 02 Oct 2009 Posts: 123 Location: Denmark
|
debug monitor not working [solved] |
Posted: Sat Dec 06, 2014 10:16 am |
|
|
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
|
|
Posted: Sat Dec 06, 2014 10:53 am |
|
|
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
|
|
Posted: Sat Dec 06, 2014 11:03 am |
|
|
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
|
|
Posted: Sat Dec 06, 2014 11:10 am |
|
|
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
|
|
Posted: Sun Dec 07, 2014 9:14 am |
|
|
Solved!
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
|
|
|
|