Bus Pirate PIC programming adapter

From DP

(Difference between revisions)
Jump to: navigation , search
(Usage)
(Updated to show discontinued)
 
(48 intermediate revisions not shown)
Line 1: Line 1:
{{Prototype
{{Prototype
 +
|manufacturing=Discontinued
|codename=None
|codename=None
-
|status=Software
+
|status=Test production (now discontinued)
|devthread=http://dangerousprototypes.com/forum/index.php?topic=649.0
|devthread=http://dangerousprototypes.com/forum/index.php?topic=649.0
 +
|id=None
}}
}}
 +
Provides a 13volt supply and transistors to control it.
 +
*Intended for [http://dangerousprototypes.com/docs/Pirate_PIC_Programmer piratePICprog application]
 +
* Discontinued at Seeed Studio
 +
*[http://dangerousprototypes.com/forum/index.php?topic=649.0 Read more] in the forum
 +
 +
==Overview==
 +
[[file:dia Bp-hvp_front.png|490px]]
==Prototype==
==Prototype==
-
[[file:buspirate-hvp use.png|480px]]
+
[[file:buspirate-hvp-use.jpg|480px]]
-
[[file:bp-hvp front.jpg|250px]]
+
[[file:bp-hvp front.jpg|250px]] [[file:bp-hvp back.jpg|250px]]
-
[[file:bp-hvp back.jpg|250px]]
+
==Downloads==
-
 
+
*[http://code.google.com/p/dangerous-prototypes-open-hardware/downloads/detail?name=Buspirate.Adapter.Pic.Programmer.source.r1221.v1.zip Buspirate Adapter Pic Programmer source r1221 v1 ]
-
Will be available to developers shortly. Provides a 13volt supply and transistors to control it. [http://dangerousprototypes.com/forum/index.php?topic=649.0 Read more] in the forum.
+
*[http://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/#svn%2Ftrunk%2FBuspirate_Adapter_Pic_Programmer Browse the Buspirate Pic Programming adapter SVN]
==Schematic==
==Schematic==
-
[[file:pic-adapter-cct.png|480px]]
+
[[image:bp-hvp-adapter-v1b-cct.png|490px]]
 +
 
 +
[[image:bp-hvp-v1b-cct.png|250px]] [[file:pic-adapter-cct.png|250px]]
== PCB ==
== PCB ==
-
[[image:hvp.png|480px]]
+
[[image:bp-hvp-v1c.png|480px]]
 +
 
 +
[[image:bp-hvp-v1b.jpg|250px]] [[image:hvp.png|250px]]
== Partlist ==
== Partlist ==
Line 58: Line 71:
|-
|-
| R1
| R1
-
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CRCW080520K0FKTCvirtualkey61300000virtualkey71-CRCW080520K0FKTC 20K resistor] (0805)
+
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CRCW080520K0FKTCvirtualkey61300000virtualkey71-CRCW080520K0FKTC 20K resistor] (M0805)
|-
|-
| R2
| R2
-
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CRCW08052K00FKEAvirtualkey61300000virtualkey71-CRCW0805-2.0K-E3 2K2 resistor] (0805)
+
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CRCW08052K00FKEAvirtualkey61300000virtualkey71-CRCW0805-2.0K-E3 2K2 resistor] (M0805)
|-
|-
| R3
| R3
-
| [http://www.mouser.com/ProductDetail/Xicon/260-47-RC/?qs=sGAEpiMZZMukHu%252bjC5l7YTgBt7W19tq9DKKNTxX9KJw%3d 4R7 resistor] (0805)
+
| [http://www.mouser.com/ProductDetail/Xicon/260-47-RC/?qs=sGAEpiMZZMukHu%252bjC5l7YTgBt7W19tq9DKKNTxX9KJw%3d 4R7 resistor] (M0805)
|-
|-
| R4
| R4
-
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CR0805-FX-1800GLFvirtualkey65210000virtualkey652-CR0805-FX1800GLF 180R resistor] (0805)
+
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CR0805-FX-1800GLFvirtualkey65210000virtualkey652-CR0805-FX1800GLF 180R resistor] (M0805)
|-
|-
| R5
| R5
-
| [http://www.mouser.com/Search/ProductDetail.aspx?R=260-39K-RCvirtualkey21980000virtualkey260-39K-RC 39K resistor] (0805)
+
| [http://www.mouser.com/Search/ProductDetail.aspx?R=260-39K-RCvirtualkey21980000virtualkey260-39K-RC 39K resistor] (M0805)
|-
|-
| R6
| R6
-
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CR0805-FX-1003GLFvirtualkey65210000virtualkey652-CR0805-FX1003GLF 100K resistor] (0805)
+
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CR0805-FX-1003GLFvirtualkey65210000virtualkey652-CR0805-FX1003GLF 100K resistor] (M0805)
|-
|-
| R7
| R7
Line 79: Line 92:
|-
|-
| R8-R12
| R8-R12
-
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CR0805-FX-1002GLFvirtualkey65210000virtualkey652-CR0805-FX1002GLF 10K resistor] (0805)
+
| [http://www.mouser.com/Search/ProductDetail.aspx?R=CR0805-FX-1002GLFvirtualkey65210000virtualkey652-CR0805-FX1002GLF 10K resistor] (M0805)
|-
|-
| T1, T2
| T1, T2
| [http://www.mouser.com/Search/ProductDetail.aspx?R=MMBT4401_D87Zvirtualkey51210000virtualkey512-MMBT4401D87Z NPN, 200mA+, 30+hfe transistor] (SOT23-BEC)
| [http://www.mouser.com/Search/ProductDetail.aspx?R=MMBT4401_D87Zvirtualkey51210000virtualkey512-MMBT4401D87Z NPN, 200mA+, 30+hfe transistor] (SOT23-BEC)
|-
|-
-
| T3,T4
+
| SJ1,SJ2
 +
|  (SJ_2)
 +
|-
 +
| T3
| [http://www.mouser.com/Search/ProductDetail.aspx?R=MMBT4403LT3Gvirtualkey58410000virtualkey863-MMBT4403LT3G PNP, 600mA+, 40+ hef transistor] (SOT23-BEC)
| [http://www.mouser.com/Search/ProductDetail.aspx?R=MMBT4403LT3Gvirtualkey58410000virtualkey863-MMBT4403LT3G PNP, 600mA+, 40+ hef transistor] (SOT23-BEC)
 +
|-
 +
| T4
 +
|  PNP, 1A+, 40+ hef transistor (SOT23-BEC)
|}
|}
-
==Manufacturing test==
+
The latest sources and distributors are in the [http://dangerousprototypes.com/docs/Partlist master partlist]. See something missing? Please [http://dangerousprototypes.com/forum let us know].
-
This design will use a Bus Pirate v3 to check the output voltage of the boost converter.
+
-
*Final version should measure MCLR after VPP!
+
-
== HVP Self Test Utility ==
+
==Calculating VPP from feedback voltage==
 +
The programming adapter outputs 13volts, which is more than the Bus Pirate can safely measure. The voltage probe measures the output through a 39K resistor, which combines with the two 10K resistors already on the Bus Pirate to divide the voltage to a safe level. The cumulative R1 value is 49K, R2 is 10K.
-
==Description==
+
* Raw reading: 0x2A6 (678)
-
<nowiki>HVP selftest utility is intended for manufacturers to test and verify the voltage output level at the assembly line.</nowiki>
+
* Actual voltage: (678/1024)*3.3volts=2.18volts
-
This one should calculate the actual voltage (>12volts passes test) (49K/10K resistor divider, 3.3volt reference) taken from the Bus Pirate voltage probe measurement.
+
* Scale for resistor divider: Vin = (Vout*(R1+R2))/R2 = (2.18volts*(49K+10K))/10K = 12.86volts (ideal is 13volts)
-
== Current Version ==
+
Example solution.
-
-------------------------------------------------------
+
Developer hardware tests the 13volt supply directly at the SMPS.
 +
The final version should measures the MCLR for maximum flexibility!
-
  Bus Pirate HVP Adapter SELF TEST utility v0.1 (CC-0)
+
==Manufacturing selftest==
 +
 
 +
[[file:buspirate-hvp use.png|250px]]
 +
 
 +
HVP selftest utility is intended for manufacturers to test and verify the voltage output level at the assembly line.
 +
 
 +
Tests the high voltage programmer boost converter output using the Bus Pirate. If the board generates 12.5volts+, it passes. The final version will use a hardware update to test the high voltage switching circuit as well.
 +
 
 +
=== Current Version ===
 +
 
 +
-------------------------------------------------------
 +
  Bus Pirate HVP Adapter SELF TEST utility v0.3 (CC-0)
  http://www.dangerousprototypes.com
  http://www.dangerousprototypes.com
 +
-------------------------------------------------------
-
-------------------------------------------------------
+
=== Usage ===
-
== Usage ==
+
Setup
 +
#Connect a Bus Pirate to USB
 +
#Edit run.bat to match the current Bus Pirate COM port
 +
#Start run.bat, The Bus Pirate enters binary mode
 +
 
 +
Testing
 +
#Attach a programming adapter to the Bus Pirate as shown above
 +
#Press space to start the test
 +
#Read the test results (see examples of [[Bus_Pirate_PIC_programming_adapter#Success|success]] and [[Bus_Pirate_PIC_programming_adapter#Failure|failure] below)
 +
#Remove the programming adapter
 +
#Attach another programming adapter and press space to test (or escape to exit)
 +
 
 +
====Help options====
  <nowiki>Help Menu
  <nowiki>Help Menu
-------------------------------------------------------------------------
-------------------------------------------------------------------------
  Usage:
  Usage:
-
   hvpselftest  -p device
+
   hvpselftest  -p device -s speed
-
   Example Usage:  hvpselftest COM1 -R
+
   Example Usage:  hvpselftest -p COM1 -s 115200
           Where: -p device is port e.g.  COM1
           Where: -p device is port e.g.  COM1
Line 121: Line 164:
</nowiki>
</nowiki>
-
==Note about this Utility==
+
====Startup====
 +
 
 +
<nowiki>E:\HVPselftest>HVPselftest -p com6 -s 115200
 +
-------------------------------------------------------
 +
 
 +
Bus Pirate HVP Adapter SELF TEST utility v0.2 (CC-0)
 +
http://www.dangerousprototypes.com
 +
 
 +
-------------------------------------------------------
 +
 
 +
Parameters used: Device = com6,  Speed = 115200
 +
 
 +
Opening Bus Pirate on com6 at 115200bps...
 +
Going into Binary Bitbang mode.. Entering binary mode...ok
 +
Press Esc to exit, any other key to start the self-test</nowiki>
 +
 
 +
====Success====
 +
 
 +
<nowiki>--------------------- Starting a new Test-------------------------
 +
Sending Command to power on : 11000000....OK
 +
Voltage Probe measurement...,sending 00010100
 +
ADC Reading: 13.1 Volts (02, AF)
 +
Voltage Measurement: ****PASS****
 +
powering off.....
 +
 
 +
Connect another HVP adapter and press any key to test again
 +
Or hit ESC key to stop and end the test.</nowiki>
 +
 
 +
====Failure====
 +
 
 +
<nowiki>--------------------- Starting a new Test-------------------------
 +
Sending Command to power on : 11000000....OK
 +
Voltage Probe measurement...,sending 00010100
 +
ADC Reading: 12.1 Volts (02, 7B)
 +
Voltage Measurement: !!!!FAIL!!!!
 +
powering off.....
 +
 
 +
Connect another HVP adapter and press any key to test again
 +
Or hit ESC key to stop and end the test.</nowiki>
 +
Failed test, voltage too low (12.5volt minimum).
 +
*First try test again
 +
*Check soldering
 +
*Replace IC1
 +
 
 +
===Note about this Utility===
-
This simple selftest utility sets the buspirate to enter the binary [[bitbang]] mode first, then configure the pins as output by sending '01000000' to it, and then send '1100000' to set the power on, and send '00010100' for the voltage probe measurement, and take a reading from the 2 bytes reply.
+
Program flow:
 +
#sets the buspirate to enter the binary [[bitbang]] mode
 +
#configure the pins as output by sending '01000000'
 +
#send '1100000' to set the power on
 +
#send '00010100' for the voltage probe measurement
 +
#calculate a reading from the 2 bytes reply
 +
#power off the unit and prompt for a new test
-
It then power off the unit for the next test.
+
The code was created using Code::Base 10.05 in its default settings.
 +
Download from the svn [http://code.google.com/p/the-bus-pirate/source/browse/#svn/trunk/scripts/HVPselftest  here]
==Links==
==Links==
*[http://www.nomad.ee/micros/mc34063a/index.shtml MC34063A design tool]
*[http://www.nomad.ee/micros/mc34063a/index.shtml MC34063A design tool]
 +
*[http://ww1.microchip.com/downloads/en/AppNotes/00910a.pdf PIC Device Programming]: What You Always Wanted to Know (But Didn't Know Who to Ask)
 +
*[http://ww1.microchip.com/downloads/en/DeviceDoc/31028a.pdf In-Circuit Serial Programming (ICSP)]
 +
*[http://ww1.microchip.com/downloads/en/DeviceDoc/39644l.pdf PIC18F6XJXX/8XJXX Programming Specifications]
 +
*[http://ww1.microchip.com/downloads/en/DeviceDoc/39687e.pdf PIC18F2XJXX/4XJXX Family Flash Programming Specification]
[[Category:Projects]]
[[Category:Projects]]
[[Category:Bus Pirate]]
[[Category:Bus Pirate]]
 +
[[Category:PICs]]

Latest revision as of 22:14, 19 February 2014

Bus Pirate PIC programming adapter
Codename None
Status Test production (now discontinued)
Development development forum
ID # None

Provides a 13volt supply and transistors to control it.

Contents

Overview

Dia Bp-hvp front.png

Prototype

Buspirate-hvp-use.jpg

Bp-hvp front.jpg Bp-hvp back.jpg

Downloads

Schematic

Bp-hvp-adapter-v1b-cct.png

Bp-hvp-v1b-cct.png Pic-adapter-cct.png

PCB

Bp-hvp-v1c.png

Bp-hvp-v1b.jpg Hvp.png

Partlist

PartValue
C1 470pF capacitor (0805)
C2, C3, C6 0.1uF/50V capacitor (0805)
C4 10uF/10V capacitor (SMC_A)
C5 4.7uF/35V (SMD_A5)
D1, D2 1N5819, 20V, 1A+ diode (SOD123)
IC1 MC34063AD (SO08)
JP1 female 02x5 plug
L1 680uH/0.12A inductor (L4532P)
PIC-ICSP 1X05 0.1” pin header
POWER 1X03 0.1” pin header
R1 20K resistor (M0805)
R2 2K2 resistor (M0805)
R3 4R7 resistor (M0805)
R4 180R resistor (M0805)
R5 39K resistor (M0805)
R6 100K resistor (M0805)
R7 100R resistor (0805)
R8-R12 10K resistor (M0805)
T1, T2 NPN, 200mA+, 30+hfe transistor (SOT23-BEC)
SJ1,SJ2 (SJ_2)
T3 PNP, 600mA+, 40+ hef transistor (SOT23-BEC)
T4 PNP, 1A+, 40+ hef transistor (SOT23-BEC)

The latest sources and distributors are in the master partlist. See something missing? Please let us know.

Calculating VPP from feedback voltage

The programming adapter outputs 13volts, which is more than the Bus Pirate can safely measure. The voltage probe measures the output through a 39K resistor, which combines with the two 10K resistors already on the Bus Pirate to divide the voltage to a safe level. The cumulative R1 value is 49K, R2 is 10K.

  • Raw reading: 0x2A6 (678)
  • Actual voltage: (678/1024)*3.3volts=2.18volts
  • Scale for resistor divider: Vin = (Vout*(R1+R2))/R2 = (2.18volts*(49K+10K))/10K = 12.86volts (ideal is 13volts)

Example solution.

Developer hardware tests the 13volt supply directly at the SMPS.
The final version should measures the MCLR for maximum flexibility!

Manufacturing selftest

Buspirate-hvp use.png

HVP selftest utility is intended for manufacturers to test and verify the voltage output level at the assembly line.

Tests the high voltage programmer boost converter output using the Bus Pirate. If the board generates 12.5volts+, it passes. The final version will use a hardware update to test the high voltage switching circuit as well.

Current Version

-------------------------------------------------------
Bus Pirate HVP Adapter SELF TEST utility v0.3 (CC-0)
http://www.dangerousprototypes.com
-------------------------------------------------------

Usage

Setup

  1. Connect a Bus Pirate to USB
  2. Edit run.bat to match the current Bus Pirate COM port
  3. Start run.bat, The Bus Pirate enters binary mode

Testing

  1. Attach a programming adapter to the Bus Pirate as shown above
  2. Press space to start the test
  3. Read the test results (see examples of success and [[Bus_Pirate_PIC_programming_adapter#Failure|failure] below)
  4. Remove the programming adapter
  5. Attach another programming adapter and press space to test (or escape to exit)

Help options

Help Menu
-------------------------------------------------------------------------
 Usage:
   hvpselftest  -p device -s speed

   Example Usage:   hvpselftest -p COM1 -s 115200

           Where: -p device is port e.g.  COM1
                  -s Speed is port Speed  default is 115200
-------------------------------------------------------------------------

Startup

E:\HVPselftest>HVPselftest -p com6 -s 115200
-------------------------------------------------------

 Bus Pirate HVP Adapter SELF TEST utility v0.2 (CC-0)
 http://www.dangerousprototypes.com

-------------------------------------------------------

 Parameters used: Device = com6,  Speed = 115200

 Opening Bus Pirate on com6 at 115200bps...
 Going into Binary Bitbang mode.. Entering binary mode...ok
 Press Esc to exit, any other key to start the self-test

Success

--------------------- Starting a new Test-------------------------
 Sending Command to power on : 11000000....OK
 Voltage Probe measurement...,sending 00010100
 ADC Reading: 13.1 Volts (02, AF)
 Voltage Measurement: ****PASS****
 powering off.....

 Connect another HVP adapter and press any key to test again
 Or hit ESC key to stop and end the test.

Failure

--------------------- Starting a new Test-------------------------
 Sending Command to power on : 11000000....OK
 Voltage Probe measurement...,sending 00010100
 ADC Reading: 12.1 Volts (02, 7B)
 Voltage Measurement: !!!!FAIL!!!!
 powering off.....

 Connect another HVP adapter and press any key to test again
 Or hit ESC key to stop and end the test.

Failed test, voltage too low (12.5volt minimum).

  • First try test again
  • Check soldering
  • Replace IC1

Note about this Utility

Program flow:

  1. sets the buspirate to enter the binary bitbang mode
  2. configure the pins as output by sending '01000000'
  3. send '1100000' to set the power on
  4. send '00010100' for the voltage probe measurement
  5. calculate a reading from the 2 bytes reply
  6. power off the unit and prompt for a new test

The code was created using Code::Base 10.05 in its default settings. Download from the svn here

Links