Oh ya, I promise to talk more on the Microchip pic18lf13k50 micro-controller. I got to know from the Google search here that it require a header kit (processor extension pak) in order for the debugging section to work. It cost around S$80. Thus, I decide to abandon this model and switch to pic18f2550. I double-check in the MPLAB software (in the device options) that no header kit is required for this chip.
Wa, the chips came in the next day. I ordered on Sunday and it was delivered on Monday (Amazing service). Feeling with hope that I will succeed this time, I tested it out in the evening time. =.= :(, the same error message occurred again (unable to enter debug mode when I did the 'program'). Sad man, what is wrong? I consulted my supervisor on Wednesday evening and hope that my connection is wrong so that the problem can be easily rectified. My supervisor suspected the problem is due to the ICD2 device thus he bought back my hardware and the ICD2 to check.
On Friday evening, I collected my hardware and a new ICD2 from my supervisor. On Saturday morning, I tried again my hardware with the ICD2. Again, it is showing the "unable to enter debug mode"... I am frustrated!!! Why is it still not working!
I tried and tried and tried... I think let try internal oscillator mode (INTOSC) in the configuration bits setting in the MPLAB. Yes, it is able to program and enter debug mode. I clicked on the RUN button, and the target controller is able to run. Finally, I am to get my hardware enter debug mode!!! After reading the datasheet of the model, I discovered that I have the select the wrong oscillator mode all the while. XT(1MHz to 4Mhz) mode is for low frequency crystal/resonator. HS (above 4MHz)) is for high frequency crystal/resonator. I changed in the configuration bits again to HS and it work! Yahoo, finally I can start on my firmware coding...
Please see the following on the MPLAB configuration bits:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment