View previous topic :: View next topic |
Author |
Message |
nehallove
Joined: 16 Jan 2008 Posts: 61
|
PIC16LF1937 isn't recognized by ccs ide |
Posted: Tue Sep 04, 2012 4:40 pm |
|
|
Hi All,
I am using following:
CCS IDE Version 4.135
Hardware: Microchip F1 evaluation kit with pic16LF1937 populated on the board.
After successfully compiling, when i try to go to debugger it throws an error message saying:
" Target Detect Error " - The detected target (Device ID 3FE0) doesn't match the code's target:PIC16LF1937. Do you want to continue anyway?
It doesn't work. I kinda know that this error is for target mismatch. I also looked the processor on the kit it is the same even on website it is the same.
Can anyone please help me on this?
Thank you.
nehl _________________ nehal |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19550
|
|
Posted: Wed Sep 05, 2012 1:34 am |
|
|
The device ID being returned, is _not_ correct for that processor. I think you need to talk to MicroChip, but the device ID for the LF1937, should be:
xx10 0100 100r rrrr
Where 'r' is the chip revision, and 'xx' is undefined.
You are actually reading 1's for every bit of the device ID. Normally means a faulty chip.
Best Wishes |
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Wed Sep 05, 2012 2:27 am |
|
|
You didn't say which device programmer ( Ex CCS ICD-u64) you are using).
Assuming the pic16LF1937chip isn't defective the issue is often with the wired connection (MCLR PGC PGD +ve and Ground). The ICD-U64 has diagnostics in which it will create various voltages on these wires that you can test at the PIC pins. The pullup value on MCLR can also be an issue. The device programmers have limited drive and can't support some pullup values. The length of the wired connection can also be an issue. Usually it is kept to about 6 inches or less. Oh and one other thing some chips have options as to the pin assignments for PGC PGD the wired connection must match the pins selected in your code (#device ICD=n) |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19550
|
|
Posted: Wed Sep 05, 2012 3:09 am |
|
|
Agree, but the odd thing is that the chip is returning zeros for the revision number. Normally a bad connection gives all 1's, or just random values.
Best Wishes |
|
|
nehallove
Joined: 16 Jan 2008 Posts: 61
|
|
Posted: Wed Sep 05, 2012 4:39 pm |
|
|
I called TechSupport, what it turned out was the voltage for the board was in range 1.8 to 3.6V.
I set the voltage to 2 V before and it didn't work I increased it to 3 V and it works.
But now I have another error:
" Could not start target: The target was not halted after reset. Check the target oscillator and MCLR. Make sure the target clock match the clock fuse and that the target is oscillating. Use View|Valid fuses to find the correct clock fuse.'
I check the possible fuses: I am trying following fuses and header file --
Code: |
#include <16LF1937.h>
#device *=16 ICD=TRUE
#device adc=16
#FUSES HS
#FUSES DEBUG
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT_SW //No Watch Dog Timer, enabled in Software
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
|
The board has 32.768 KHz crystal on RC0 and RC1. Processor can work up to 32 MHz. Any idea what needs to be changed?
Thank you.
nehl _________________ nehal |
|
|
nehallove
Joined: 16 Jan 2008 Posts: 61
|
|
Posted: Wed Sep 05, 2012 5:44 pm |
|
|
One thing I noticed in this evalboard is that MCLR pin has directly connect to ICD, there is nothing else is connected on the MCLR pin. Does that the issue?
nehl _________________ nehal |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19550
|
|
Posted: Thu Sep 06, 2012 1:57 am |
|
|
No 'clock' statement shown. HS, is not going to work with a 32KHz crystal. What is on OSC1/OSC2, or do you want to run with T1OSC?.
When you move on and try to run without the ICD, 'NOMCLR', will be needed in the fuses.
Best Wishes |
|
|
nehallove
Joined: 16 Jan 2008 Posts: 61
|
|
Posted: Thu Sep 06, 2012 12:37 pm |
|
|
Well first I would like to go to debugger. OSC1 and OSC2 are not connected to any crystal. I would like to set frequency later on, but currently i would like to work with debugger with any frequency.
Thank you. _________________ nehal |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19550
|
|
Posted: Thu Sep 06, 2012 1:57 pm |
|
|
The debugger, needs a crystal attached to the chip. The chip won't run (even in debug mode), without one. This is what is being complained about....
ICD, runs in the _chip_. The hardware has to be setup correctly to work, to start with.
Best Wishes |
|
|
|