![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | Thread Tools | Display Modes |
| | (permalink) |
| Experienced Member | below is the output from MPLAB my question is how should the Target pic be hooked up physically , to get the debug feature to work? see below Code: Connecting to MPLAB ICD 2 ...Connected Setting Vdd source to MPLAB ICD 2 Target Device PIC16F877A found, revision = b4 ...Reading ICD Product ID Running ICD Self Test ...Passed MPLAB ICD 2 Ready Resetting Target Resetting Target MPLAB ICD 2 Ready MPLAB ICD 2 Ready Programming Target... ...Validating configuration fields ...Erasing Part ...Programming Program Memory (0x0 - 0x6F) ...Loading DebugExecutive ...Programming DebugExecutive ...Programming Debug Vector Verifying... ...Program Memory ...Debug Executive ...Debug Vector ...Verify Succeeded Programming Configuration Bits .. Config Memory Verifying configuration memory... ...Verify Succeeded Connecting to debug executive ICD0083: Debug: Unable to enter debug mode. Please double click this message for more information. MPLAB ICD 2 Ready Nigel will like this.. the problem is when i compile it and get the Hex output file Imported into MPLAB , i get the IDC 00083 Debug error . i have the config bits selected to use the built in RC oscillator Code: program adconthe877A;
var temp_res : word;
begin
ADCON1 := $80; // Configure analog inputs and Vref
TRISA := $FF; // PORTA is input
TRISB := $3F; // Pins RB7 and RB6 are output
TRISD := $0; // PORTD is output
while TRUE do
begin
temp_res := Adc_Read(0);
PORTD := temp_res; // Send lower 8 bits to PORTD
PORTB := word(temp_res shr 2); // Send 2 most significant bits to PORTB
end;
end. |
| | |
| | (permalink) |
| Experienced Member | Have you got debug enabled in the config? Do you leave SFR location 0x70 unused? Have you left programming area 0x1f00 - 0x1fff free? The above is required by the debug executive. I have also come across some Microchip code that places a NOP at location zero and has a comment that it is required by ICD2. However, I have not found any reference to this in the help files. HTH Mike. |
| | |
| | (permalink) |
| Experienced Member | Here's a picture showing how I connected a 16F876 to the debugger. The other things you can see are a a 20MHz crystal and a 38k clock crystal + rs232 level shifter. Mike. Last edited by Pommie; Today at 04:13 PM. |
| | |
| | (permalink) | |
| Experienced Member | Quote:
__________________ EEgeek.net | |
| | |
| | (permalink) | |
| Experienced Member | Quote:
Pommie , nice layout , i've got mine on a breadboard also , but it doesnt look half as neat as that. i'll get a clock hooked up and let you know how it comes out .. Thanks Evandude ! | |
| | |
| | (permalink) |
| Experienced Member | I've got the schematic for the 16F877A in my Quick Project document and some code for it on my site... And yes it runs in debug mode. I guess it's too hard to find, I'll make a link to projects on the main page. ![]() |
| | |
| | (permalink) |
| Experienced Member | Thanks bill , i'll try that.. I got the debugger working BTW. |
| | |
| | (permalink) |
| New Member | POMMIE You CAN raise the schematic one and which are the connections of the cables that tune in with RB6 RB7, MLCR, VPP TO WHERE THEY GO |
| | |
| | (permalink) | |
| Experienced Member | Quote:
Pretty soon the 16F887 will be the chip of choice over the 16F877A. But then again people still use the 16F84. | |
| | |
| | (permalink) | |
| Experienced Member | It's a little of topic, but still there; I was just reading up further on the PICKit 2 today, and found out that it too supports debugging ![]() PIC's that it supports for debugging: Quote:
Oh, and the package includes all the software and; PICKit 2 programming tutorials and a series of twelve lessons are provided that cover I/O, interrupts, A/D converters, data tables and timers, with an additional lesson covering debugging features. All source code for the lessons is furnished.
__________________ Spency. PIC Micro's - Your mind is the limit PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net | |
| | |
| | (permalink) |
| Experienced Member | I do like your website Gramo it should be high on the must see list for anybody who use's basic very helpful and so is Bill's Blueroom at least their at the top of my list,thank you for the good sites |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Inchworm components | gregmcc | Micro Controllers | 43 | 18th March 2007 01:37 PM |
| Need help badly on Inchworm and MPLAB | thushy | Micro Controllers | 14 | 11th March 2007 06:05 PM |
| Some Question About Inchworm | Ayne | Micro Controllers | 29 | 7th March 2007 03:07 AM |
| Inchworm project started | williB | Micro Controllers | 69 | 5th March 2007 06:55 PM |