Saturday, November 21, 2009

Follow up of Microchip pic18lf13k50

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:

Sunday, November 15, 2009

Final Year Project

Hello Everyone,
I will be using this to update on my fyp progress...hopefully, it will be interesting for my readers.
 It is also a way to update my supervisors(especially overseas supervisor) and for myself to check on my progress and maybe a page for me to reference so that I can write my final report. My graduate engineering friends are welcome to comment.

So, my final year project is on designing a USB oscilloscope. It is a hardware and software project. The hardware is to build a circuit with micro-controller to convert the analog signals to digital. As for the software part, I will be using Visual Basic Express with WINUSB API. Sound simple, right??

Okay, I will talk more on details of my micro-controller, I have decided to use Microchip micro-controller as it is cheap and easy to buy in the market (Farnell). It has built-in support analog to digital (with free C compiler to convert the C codes into the assembly code), C library function to call to initialize the A/D, convert, check status of conversion. Wow, nice, right? I am adverting for Microchip, man.. They need to give me free chips.. :)  .. Ok, from the list of micro-controller, I decided to use Microchip pic18lf13k50 as my main microcontroller as it is the *cheapest* of all... (thinking that I will not go wrong)..... BUT, I AM WRONG!!!!!! I tell more in my next post... :(