What to use to download to a PIC

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Alberta2012
Flowcode v5 User
Posts: 63
Joined: Fri Apr 19, 2013 2:18 am
Has thanked: 10 times
Been thanked: 14 times
Contact:

What to use to download to a PIC

Post by Alberta2012 »

Hi !

I have asked that question in the past, but did not get a satisfactory answer !

I want to program some PIC. I currently have an old PIC StartPlus (so old, it's no longer off-white, but light brown...)

here's the list of what I have in stock:

16F84A
16F877
16F1454
16F1934
16F1938

As per Microchip's web site (http://www.microchip.com/wwwproducts/dts.aspx) in order to program the first 2, I could use my PIC StartPlus (I hope there is not an "age" issue, such as firmware revision involved)

But when it comes to programming the last ones, as per their site, I should use the MPLAB PM3, which, with the proper socket is over 1000$.... Are you guys all using a 1000$+ programmer ?????

I want to use it with FlowCode.....what are my alternatives ? What are the pros and cons of each solutions ???

Thanks !

medelec35
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: What to use to download to a PIC

Post by medelec35 »

Hi Alberta2012
If you want flowcode to directly program those chips then you could either use the Matrix EB006 programmer (its more that a programmer) eblock (£60) perhaps with EB072 ZIF programming adapter (£45)
Pros:
EB006 V9 has a built in scope (Compatible with Flowcode V6 only) and ICD (Flowcode V4+). can be use with a host of other Eblocks. e/g keypad lcd etc
Connects to USB fro direct programming.

Cons: optional ICD uses a fair bit more ROM so chip can go over capacity.
Not easy to integrate with other circuity due to size and D type connections.
Not easily set up to program via ICSP

or
Microchip PICkit 3 programmer(From about £12).
Pros: Very cheap
Very small
Can be used on chips with VPP that can vary in voltage.
Vast range of chips not limited to 8bits.
Programs via ICSP in-situ

Cons:
Has to download operation system for each type of chip.
Not 100% reliable, but can usually get it to work with Flowcode.


I have also used Asix Presto programmer (£80) with excellent results, but not yet got it to be directly programmed with flowcode but instead loaded hex file generated by flowocode.
Pros:
Very reliable.
Vast range of chips not limited to 8bits.
Programs via ICSP in-situ

Cons:
Not as cheap as PICkit3
Not programmed directly using flowcode (May be possible;e?)


A word of Waring:
If I used Programmers that provide a VPP of 13V then I use a 10K resistor in series with VPP to prevent damage to chips that require a VPP of say 9V

The last two programmers mentioned are ICSP which means you can connect programmer to circuit and program on the fly.
That is something I do on a very regular basis, so can help you with that.
The only connections required going to chip are:
1)VPP
2)+5V
3)GND
4)Data
5)Clock

For more details just search for each programmer mentioned.

Hope this helps?

Martin
Martin

Alberta2012
Flowcode v5 User
Posts: 63
Joined: Fri Apr 19, 2013 2:18 am
Has thanked: 10 times
Been thanked: 14 times
Contact:

Re: What to use to download to a PIC

Post by Alberta2012 »

Medelec:

Just got my PICKIT3.

Few questions: Do I need to install MPLAB (in addition of Flowcode) in order to use it ?

I will be using FC5. any screen capture of the settings ? I have found a few topics about FC6. are the settings the same ?

Thanks !

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: What to use to download to a PIC

Post by Benj »

Hello,
Do I need to install MPLAB (in addition of Flowcode) in order to use it ?
No Flowcode comes with the command line PICkit 2 and 3 tools. If your using Flowcode v6 then you can find out how to setup the PICkit programmer via this wiki page:

http://www.matrixmultimedia.com/wiki/in ... ming_Tools

Earlier versions of Flowcode such as v5 can use the info posted here:

http://www.matrixmultimedia.com/support ... f=68&t=786

Alberta2012
Flowcode v5 User
Posts: 63
Joined: Fri Apr 19, 2013 2:18 am
Has thanked: 10 times
Been thanked: 14 times
Contact:

Re: What to use to download to a PIC

Post by Alberta2012 »

Benj:

Did look at the FC5 link, and changed everything accordingly.

The compiling process seems to be working, but the programmer portion fails:

Launching the programmer...
C:\Program Files\Flowcode\v5\Tools\PICkit3\PK3CMD.exe -P16C84 -FCommTest_With_PICKIT3.hex -E -M
Return code = -1073741515
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.


I read somewhere that every time you want to use the PICKIT3 with a different Microchip's PIC, you need to download the corresponding firmware ???? is this BS ??

Right now, I'm trying to download a very simple program (Flashing an output) using a common chip (PIC16C84)

any ideas ?

Alberta2012
Flowcode v5 User
Posts: 63
Joined: Fri Apr 19, 2013 2:18 am
Has thanked: 10 times
Been thanked: 14 times
Contact:

Re: What to use to download to a PIC

Post by Alberta2012 »

Benj:

Tried with a PIC16F877 and it did not work, but I got the following messages:

Launching the programmer...
C:\Program Files\Flowcode\v5\Tools\PICkit3\PK3CMD.exe -P16F877 -FCommTest_With_PICKIT3.hex -E -M

Connecting...
PICkit 3 detected
Connecting to PICkit 3...
............................

PICkit 3 is not in programmer-to-go any more.
Firmware Suite Version...... 01.26.52
Firmware type......................Midrange
Downloading bootloader...
............................

Bootloader download complete
...........

Running self test...
Self test completed
Downloading RS...
.............

RS download complete
............

Downloading AP...
..............................

AP download complete
...........

Running self test...
Self test completed
Firmware Suite Version...... 01.28.90
Firmware type......................Midrange
...

PICkit 3 Connected.
PK3Err0045:
You must connect to a target device to use PICkit

3. Return code = 2
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.

FINISHED



I'm lost ....what could be happening here ???

medelec35
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: What to use to download to a PIC

Post by medelec35 »

Hi Alberta2012,
Can you post a full circuit circuit diagram please.

Is there 5V present across the microcontroller during programming?

Also have you read this:
http://www.matrixmultimedia.com/mmforum ... 18&#p52318

Once you have posted a diagram, we can take it from there.

I have used pickit3 before with both FC5 and FC6 so it's defintly doable

Martin
Martin

Alberta2012
Flowcode v5 User
Posts: 63
Joined: Fri Apr 19, 2013 2:18 am
Has thanked: 10 times
Been thanked: 14 times
Contact:

Re: What to use to download to a PIC

Post by Alberta2012 »

Medelec: at this point, there is no circuit. The PIC sit on a board that is used only to program a chip.

In theory, the voltage shall be supplied by the PICLIT3 itself.

I have installed MPLAB, and even MPLAB is unable to communicate with the chip.

As for the 16C84, I believe that it is not supported by PICKIT3.

Maybe I have a defective PIC16F*&&....I will try different other chip tonight, once I'm back home....

I'll post the results....

medelec35
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: What to use to download to a PIC

Post by medelec35 »

Have you enabled the power? :
http://www.matrixmultimedia.com/mmforum ... 87&#p44787

I Can't see the necessary command added to your programmer parameters.
Martin

medelec35
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: What to use to download to a PIC

Post by medelec35 »

Hi Hi Alberta2012,
Did you get the PICkit3 working with your target device?

It's vital that the target device is powered by either an external 5V or by the programmer.
The programmer does not automatically detect if VDD is present when programming via Flowcode.
Therefore if programming via Flowcode and there is no external power connected, you must use:

Code: Select all

-P%p -F%f.hex -V5 -E -M
The -V5 is the switch to allow programmer to supply +5V.

Also did you know that PICkit2 and PICkit3 have got a 3 channel analyzer function?
I have programmed a chip with a 2KHz PWM then ran the analyzer:
PICkit Analyzer.png
PWM waveform measured with a PICkit3 Built in Analyzer.
(176.26 KiB) Downloaded 4162 times
All those interested if state you are on this thread, I can then post a tutorial on setting up and using the built-in analyzer if enough interested.

Note:
It won't be worth using this if you have a EB006 V9 and Flowcode greater than V6.04 (Not released at the time of this post) since built in ICT/Scope function will far Superior.
Or
If you have a USB test pod:
http://www.matrixmultimedia.com/product ... PHPSESSID=

Martin
Martin

Post Reply