2020/11/25 15:47:29
JustRob
Down 40 I'm trying to troubleshoot a project that did work with my ICD3.  I'm using MPLAB X IDE v5.45, the XC8 compiler v2.20 and a pic18lf47k42.  This project uses a 3.5" touch display. I'm running the debugger and the code does not seem to start from the beginning of my main function.  When I used the ICD3 the code would always start at the top of my main function, clear my touch display, fill the display, go through some temp display loops then display the current temp of a thermistor.  But now it does not clear the screen or start from the beginning of the main function.
 
 
I tried (while in a halted state in the debugger) doing a  Debug->RESET but the display does not clear (go black) and the debugger output shows:
Resetting...
Reset complete
 
Running
Target halted (where it stops on a breakpoint in my main function) 
 
Is there a different way to enter the debug mode with the ICD4?
 
I'm attaching my package.
 
2020/11/30 02:37:33
JustRob
11-29-20 UPDATE

I put my ICD3 in my system and tried debugging with it. It does the same thing in that when I halt in the debugger and then click reset it does not clear my LCD and when I tried to rerun the code it does not start from scratch, re-paint the screen and re-execute the code.

Am I corrected thinking that when you execute a Debug->Reset that it should clear all of the I/O? Doing this procedure used to clear my LCD (resetting the screen to black).
2020/11/30 04:19:32
Antipodean
JustRob
11-29-20 UPDATE

I put my ICD3 in my system and tried debugging with it. It does the same thing in that when I halt in the debugger and then click reset it does not clear my LCD and when I tried to rerun the code it does not start from scratch, re-paint the screen and re-execute the code.

Am I corrected thinking that when you execute a Debug->Reset that it should clear all of the I/O? Doing this procedure used to clear my LCD (resetting the screen to black).




It may set the I/O pins on the micro to power on defaults, but it won't EVER reset the LCD. You will need some initialisation code for the LCD to do that.
 
2020/11/30 04:52:22
ric
... Unless floating the LCD's reset pin allows an external pull up/down to force a hardware reset of the LCD.
(Which could depend upon how long the PIC is left in the reset state.)
2020/11/30 08:38:37
du00000001
An LCD attached via I2C or SPI isn't affected by an MCU reset.
The same applies for the LCDs attached through some parallel port.
 
If you want to reset the LCD, best practice is to start the LCD initialization sequence with a reset command.
2020/12/01 07:37:38
JustRob
I attached the package.
 
In the main file: mkr-7-pic18f-main.c line 164 is a function that will initialize my lcd display including the io control that resets the lcd along with shutting off the back light.  When I run this code in the debugger, halt on line 164 then step through the cf_display_init() function and when I execute the code to shut the back light off nothing happens with the lcd.
 
Disclaimer: I might be having issues with my usb hub.  I'm trying to figure out what is causing these issues.  Any suggestions are appreciated.
2020/12/01 18:42:00
JustRob
It does not appear to be my USB hub as I went directly to the USB port in the back of my computer.

Is it possible to have an issue with the Windows operating system? I'm using Windows 10
© 2021 APG vNext Commercial Version 4.5

Use My Existing Forum Account