Shockwaver ha scritto:Ascolta "ASangueFreddo" (perdonami ma il tuo nick mi piace troppo.. in eng è un espressione stupenda

)
Nell'aria c'è un po' di confusione...
1) Il code 10 l'hai risolto con l'ultima soluzione che ti ho fornito?
2) La 44-pin demoboard feat. PIC18F45K20 (specifico perché non sono sicuro che quello che sto per dire sia lo stesso x le altre), a meno di tuoi interventi particolari (gli saldi un attacco USB sulla scheda) puà essere alimentata SOLO tramite il PK! Se lo stacchi non hai alimentazione, quindi i led non si accendono

3) Se MPLAB dice che la programmazione è andata a buon fine, LA PROGRAMMAZIONE E' ANDATA A BUON FINE.. per il semplice fatto che subito dopo la scrittura sul PIC mplab fa un verify (un cross check.. una verifica) su quello che ha scritto, leggendo l'immagine del programma dalla memoria del PIC e confrontandola con quello che avrebbe dovuto scrivere. Se questa verifica fallisce mplab lo segnala.. in rosso

4) In che senso il build ti fallisce? Devi darci qualche info aggiuntiva sul tipo di errore per permetterci di aiutarti..
5) Che programma stai scrivendo sul PIC? Mi posti un link alla risorsa o mi dici quale è?

1) si ho risolto disistallando sia la custom USB che i file HID, poi riattaccando il pickit 3 me l'ha rilevato e ho installato nuovamente e fin qui problema risolto.
2) Il PIC è giusto P18F45K20, ha i pin che vanno infilati nel pickit 3 che è USB a sua volta, io lo attacco al Pickit e gli do alimentazione.
3)Infatti è questo che mi fa strano che Mplab mi conferma che il programma è andato a buonfine ma poi non succede nulla.
4)ti mando una bozza di build fallito:
Release build of project `C:\Users\Administrator\Desktop\PICkit 3 Debug Express Lessons\02 Blink LED\02 Blink LED.mcp' started.
Language tool versions: MPASMWIN.exe v5.38, mplink.exe v4.38, mcc18.exe v3.37, mplib.exe v4.38
Tue Dec 14 23:40:29 2010
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean Warning: File "C:\Lessons\PICkit 3 Debug Express Lessons\02 Blink LED\02 Blink LED.o" doesn't exist.
Clean: Deleted file "C:\Users\Administrator\Desktop\PICkit 3 Debug Express Lessons\02 Blink LED\02 Blink LED.o".
Clean Warning: File "C:\Lessons\PICkit 3 Debug Express Lessons\02 Blink LED\02 Blink LED.cof" doesn't exist.
Clean Warning: File "C:\Lessons\PICkit 3 Debug Express Lessons\02 Blink LED\02 Blink LED.hex" doesn't exist.
Clean: Deleted file "C:\Users\Administrator\Desktop\PICkit 3 Debug Express Lessons\02 Blink LED\02 Blink LED.mcs".
Clean: Done.
Executing: "C:\Program Files\Microchip\mplabc18\v3.37\bin\mcc18.exe" -p=18F45K20 "02 Blink LED.c" -fo="02 Blink LED.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files\Microchip\mplabc18\v3.37\bin\mplink.exe" /p18F45K20 /l"C:\MCC18\lib" "..\..\..\..\..\mcc18\lkr\18f45k20.lkr" "02 Blink LED.o" /u_CRUNTIME /z__MPLAB_BUILD=1 /o"02 Blink LED.cof" /M"02 Blink LED.map" /W
MPLINK 4.38, Linker
Copyright (c) 1998-2010 Microchip Technology Inc.
Error - Could not find Generic linker commands for this device.
Errors : 1
Link step failed.
----------------------------------------------------------------------
Release build of project `C:\Users\Administrator\Desktop\PICkit 3 Debug Express Lessons\02 Blink LED\02 Blink LED.mcp' failed.
Language tool versions: MPASMWIN.exe v5.38, mplink.exe v4.38, mcc18.exe v3.37, mplib.exe v4.38
Tue Dec 14 23:40:30 2010
----------------------------------------------------------------------
BUILD FAILED
Il programma che voglio scrivere è questo:
//******************************************************************************
//Software License Agreement
//
//The software supplied herewith by Microchip Technology
//Incorporated (the "Company") is intended and supplied to you, the
//Company’s customer, for use solely and exclusively on Microchip
//products. The software is owned by the Company and/or its supplier,
//and is protected under applicable copyright laws. All rights are
//reserved. Any use in violation of the foregoing restrictions may
//subject the user to criminal sanctions under applicable laws, as
//well as to civil liability for the breach of the terms and
//conditions of this license.
//
//THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES,
//WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
//TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
//PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
//IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
//CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
// *******************************************************************
// PIC18F45K20 Starter Kit Lesson 2 - Blink LED
//
// This lesson blinks LED 7 on the demo board by using a delay and
// loop.
//
// *******************************************************************
// * See included documentation for Lesson instructions *
// *******************************************************************
/** C O N F I G U R A T I O N B I T S ******************************/
#pragma config FOSC = INTIO67, FCMEN = OFF, IESO = OFF // CONFIG1H
#pragma config PWRT = OFF, BOREN = SBORDIS, BORV = 30 // CONFIG2L
#pragma config WDTEN = OFF, WDTPS = 32768 // CONFIG2H
#pragma config MCLRE = OFF, LPT1OSC = OFF, PBADEN = ON, CCP2MX = PORTC // CONFIG3H
#pragma config STVREN = ON, LVP = OFF, XINST = OFF // CONFIG4L
#pragma config CP0 = OFF, CP1 = OFF, CP2 = OFF, CP3 = OFF // CONFIG5L
#pragma config CPB = OFF, CPD = OFF // CONFIG5H
#pragma config WRT0 = OFF, WRT1 = OFF, WRT2 = OFF, WRT3 = OFF // CONFIG6L
#pragma config WRTB = OFF, WRTC = OFF, WRTD = OFF // CONFIG6H
#pragma config EBTR0 = OFF, EBTR1 = OFF, EBTR2 = OFF, EBTR3 = OFF // CONFIG7L
#pragma config EBTRB = OFF // CONFIG7H
/** I N C L U D E S **************************************************/
#include "p18f45k20.h"
#include "delays.h"
/** D E C L A R A T I O N S *******************************************/
void main (void)
{
TRISD = 0b01111111; // PORTD bit 7 to output (0) ; bits 6:0 are inputs (1)
while (1)
{
LATDbits.LATD7 = ~LATDbits.LATD7; // toggle LATD
Delay1KTCYx(50); // Delay 50 x 1000 = 50,000 cycles; 200ms @ 1MHz
}
}
E' un programma già fatto che si trova nel cd del pickit 3 si chiama blink LED