Re: [Beginner Tutorial] How tro get started with PBPDEMO, MicroCode Studio & PICKIT 2
We are now almost ready to jump on the dark side. BUT before to do so, as we're going to use a PIC16F690 and Microchip LPC Demo board, it's a good idea to download some references to make friend with
- The PIC16F690 Datasheet
- Microchip's LPC Demo Board User Guide
I assume you have ALL 5 JUMPERS installed. Let's observe the board schematic (PDF page 41)
Is there some gotcha in it? Sure...
- There's no crystal attached to the PIC.
Q. And then?
A. We will need to configure the PIC to work with it's own internal OSC. If we don't do it, the PIC will never run...
- LEDs are attached to some pin who have some enabled by default analog peripheral.
Q. How do you know that?
A. The PIC pinout gives some hints, but It's always a good to have a look in the datasheet,
Section 4.5 PORTC and TRISC Registers (pdf page 78-82)
Table 4-3 resume it really well, you want to dig the datasheet to learn how to set them.
Q. What if I don't care about the datasheet and just go ahead typing some code for...what kind problem it may cause?
A. You'll be the really first one on earth
Your milleage may vary, but usually a LED connected to an analog pin doesn't work at all. Have a good look at This thread for more infos.
While we're at it, bookmark This thread in your internet browser. It contains a heap of good info.
Let's jump on the dark side,
- Connect your LPC Demo board to your PICKIT 2
- Open MicroCode Studio
- Make sure you have PIC16F690 selected in the PIC dropdown list
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks