I am using a 16F1827 18 pin DIP
I wrote a simple Blink LED to verify my programming set up.
Works fine in simulator.
PicKit3 will not program it (another issue all together)
Used Pickit3 stand alone program to program the hex file the FC5 made.
Programmed with success, verified, but program does not run on PIC???
I know I missed a real lame setting some where.
Feeling really Dumb
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Feeling really Dumb
Hi Bob, for hardware like EB006 programmer that uses a 19.66 crystal to drive the clock, there is not an issue with your flowchart.
Although if you had a Eb006 then you will not require a PICkit3 to program it!
So what is your hardware setup?
Have you got a diagram?
Using crystal and caps for clock circuit?
Are you using the voltage from the programmer?
Perhaps you can verify the 5V supply is present.
Martin
Although if you had a Eb006 then you will not require a PICkit3 to program it!
So what is your hardware setup?
Have you got a diagram?
Using crystal and caps for clock circuit?
Are you using the voltage from the programmer?
Perhaps you can verify the 5V supply is present.
Martin
Martin
-
- Posts: 157
- Joined: Sat Jan 22, 2011 10:39 pm
- Location: Michigan
- Has thanked: 6 times
- Been thanked: 27 times
- Contact:
Re: Feeling really Dumb
Martin,
Wow quick response. Thanks:
Not using an external crystal.
Only thing on the board is the PIC and the 5 pin programming plug.
A single LED to Pin 3 (RA4) with a 100ohm dropping resistor and a 4.7K pull down resistor.
I do have to LED correctly oriented polarity wise. Works when I apply direct 5V to the LED.
I forgot to set the oscillator osccon = 0x70; in the beginning but fixed that.
Redid the 4.7K resistor between pin 14 (+5V) and Pin 4 (MCLR)
Have tried letting the pickit3 power it and an external 5V supply.
I do have an LED to indicate 5 volts is present and it lights in both cases.
Bob
Wow quick response. Thanks:
Not using an external crystal.
Only thing on the board is the PIC and the 5 pin programming plug.
A single LED to Pin 3 (RA4) with a 100ohm dropping resistor and a 4.7K pull down resistor.
I do have to LED correctly oriented polarity wise. Works when I apply direct 5V to the LED.
I forgot to set the oscillator osccon = 0x70; in the beginning but fixed that.
Redid the 4.7K resistor between pin 14 (+5V) and Pin 4 (MCLR)
Have tried letting the pickit3 power it and an external 5V supply.
I do have an LED to indicate 5 volts is present and it lights in both cases.
Bob
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Feeling really Dumb
Hi Bob,
No problem,
Your Flowchart configuration is set for external osc and clock speed of 19660800Hz.
You will need to change the clock to internal osc, and change the speed to 8000000Hz if using a c code box at the start with osccon=0x70;
Unless you want to use the PLL that is?
You don't need a 4k7 pull down resistor for the output at RA4
4K7 will only be necessary if its an input and you also have a normally open switch connected to the input and +5V.
No problem,
Your Flowchart configuration is set for external osc and clock speed of 19660800Hz.
You will need to change the clock to internal osc, and change the speed to 8000000Hz if using a c code box at the start with osccon=0x70;
Unless you want to use the PLL that is?
You don't need a 4k7 pull down resistor for the output at RA4
4K7 will only be necessary if its an input and you also have a normally open switch connected to the input and +5V.
Martin
-
- Posts: 157
- Joined: Sat Jan 22, 2011 10:39 pm
- Location: Michigan
- Has thanked: 6 times
- Been thanked: 27 times
- Contact:
Re: Feeling really Dumb
Removed the pull down resistor.
Set osccon = 0x70; in a C code box at the very beginning.
Have "Auto clear watch dog" Unchecked.
Verified that the program was written to the pic.
I have another chip I am going to try.
So simple yet so hard !
Set osccon = 0x70; in a C code box at the very beginning.
Have "Auto clear watch dog" Unchecked.
Verified that the program was written to the pic.
I have another chip I am going to try.
So simple yet so hard !
- Attachments
-
- 6Blink16f1827.fcf
- (6.5 KiB) Downloaded 252 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Feeling really Dumb
Hi Bob,
You have not set the configurations as my last post.
Have a try with this attachment.
Martin
You have not set the configurations as my last post.
Have a try with this attachment.
Martin
- Attachments
-
- 7Blink16f1827.fcf
- (6.5 KiB) Downloaded 259 times
Martin
-
- Posts: 157
- Joined: Sat Jan 22, 2011 10:39 pm
- Location: Michigan
- Has thanked: 6 times
- Been thanked: 27 times
- Contact:
Re: Feeling really Dumb
Yeah I saw that I did not change the clock to 8000000 right after I posted what I had.
Tried another PIC, even tried changing to output to Pin 10 (RB4)
Will take a coffee break and try again.
Tried another PIC, even tried changing to output to Pin 10 (RB4)
Will take a coffee break and try again.
-
- Posts: 157
- Joined: Sat Jan 22, 2011 10:39 pm
- Location: Michigan
- Has thanked: 6 times
- Been thanked: 27 times
- Contact:
Re: Feeling really Dumb
Martin,
Thank You.
Helps if you also do not have the supplementary code box checked too......
The LED in question is also going to be used as an ON indicator from that pin.
Think I have just gone at it too long and got tunnel visioned.
All works as expected.
Thank You.
Helps if you also do not have the supplementary code box checked too......
The LED in question is also going to be used as an ON indicator from that pin.
Think I have just gone at it too long and got tunnel visioned.
All works as expected.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Feeling really Dumb
As long as it's all working which is great.
Thanks for the update.
Martin
Thanks for the update.
Martin
Martin