Shop OBEX P1 Docs P2 Docs Learn Events
PIC programmer using the prop ? — Parallax Forums

PIC programmer using the prop ?

Cluso99Cluso99 Posts: 18,069
edited 2009-08-15 12:49 in Propeller 1
Has anyone done a pic programmer using a prop?

I found Leon's simple circuit and can probably duplicate the approx 13V volts required for the different pics and of course I have 5V available also. I don't want to reinvent the wheel, so to speak, if it has been done before.

FYI I am planning to use a PIC10F2xx (6 pin SOT23 and would like to program it with the prop) in a prop design. There are some issues as I can run this pic at 3V3 but I have to program it in-circuit using 5V and of course 13Vx.

Any prop software to do this would also be a help.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-08-03 01:36
    Hi Ray, a pic burner is dead simple and I just use an opamp to drive the VPP signal. To do this on the Prop is very easy, you can even drive the opamp via an RC DAC if you want. For the 13V supply it's usually easy if you have about 15V or so from a cheap plugpack (wall-wart). The DAC is regulated to the propeller and the opamp is set for non-inverting gain.

    I will post the details as soon as I tidy them up.

    *Peter*

    P.S. Here's a quick circuit I just did up that will do "production" burn on a PIC. With this circuit you can vary the VCC during verification to test the integrity of the data in varying conditions. VPP voltage of 0,5,13 etc is simply set by the DAC which is as accurate as the Prop's VDD. I will try to post some sample Spin code.

    P.S. Oops! left out the gain resistors for the VCC opamp. This is set to a gain of 2 which means a max of 6V out at the pin.

    Post Edited (Peter Jakacki) : 8/3/2009 2:29:27 AM GMT
    750 x 632 - 20K
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-08-03 04:00
    Thanks Peter. I didn't want to reinvent the software or hardware if it was done already.

    As for hardware, it should have 150R resistors in series with ICSPDAT (& preferably ICSPDAT) because of 3V3 to 5V.
    Since 5V is available on the prop proto pcb, I can just use a FET switch (maybe a 2N7000 ?). Likewise, if I use a 5V regulator with 2 resistors to raise the GND pin I can get 13Vx and switch with a FET also. Obviously will have to use a higher voltage DC powerpack for this application.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-08-03 04:21
    Yeah, I know there are fixed regulator type solutions but as I said, it's production grade whereas a fixed regulator can't guarantee that the flash is programmed properly. But then again, I don't think I have ever seen a pic fail anyway. Yes (oops again), the clk/dat lines need a resistor although I probably would have used 1K. A 2N7000 would probably have too high an RdsON for my liking for starters but if you parallel some HCT gates you will find it will do the trick nicely (cheap too). Failing that a npn + low sat pnp combo will pull very close to VCC.

    *Peter*
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-08-03 11:58
    True the 2N7000 will probably have too high RdsOn but it is readily available. Since they are readily available though, perhaps to switch the unregulated input to the regulators may work. I looking for a simple low parts count and readily available components. Maybe I should go back to your op amp circuit. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Don MDon M Posts: 1,653
    edited 2009-08-03 12:17
    Peter,

    What program do you use to draw your schematics?
  • mikedivmikediv Posts: 825
    edited 2009-08-03 22:45
    Wow I have some built some very simple pic programers but peter that that takes the cake for simple what pic families will it burn?
    ·I would love to see the code as well
    ·
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-08-04 02:11
    @Don: That's Protel99SE but with a lot of customized library components (clarity vs conformity).

    @mikediv: I don't have a lot to do with PICs but as far as I'm aware they are all very similar when it comes to incircuit programming. The RC DACs are easy to implement on the Prop and they allow the VCC and VPP to be programmed. Alternatively it is possible to have simple 2-bit resistor networks to program set voltages that are then boosted by the opamps. When I last used it I had some code written in Forth on an ARM processor but converting it to Spin is a breeze. The code included an "autoprogram" feature that detected the moment a chip was detected then waited for it to be stable and then did it's thing which made burning chips very simple and quick for production.

    During programming the VPP supply current required is minuscule and so the opamp doesn't have a problem with that. Using opamps makes sense as they are cheap and provide the gain and buffering at the same time. For the VCC there isn't really much current required either but the NPN buffers the VCC in a classic opamp emitter follower fashion. The max voltage is set by the signal (3.3V) and the gain (x2).

    I guess the circuit is simple especially considering that the VPP and VCC are software programmable. For a quick cheat if you only have 5V available then use a 9V battery from the 5V line to give you around a 14V supply. The battery should last quite a long time.

    Production grade PIC programming circuit parts:
    1 LM358
    1 NPN
    7 resistors
    4 caps
    COST < $1

    However, I just use the PICKIT programmer these days as it is quick and simple, but my circuit does allow ICSP from the host CPU onboard.

    *Peter*
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-08-04 10:40
    With the 6 pin SOT-23 style PIC, ICSP is a requirement. The problem I have is that the proramming voltage Vcc has to be 5V but it is used with a prop which has Vcc at 3V3, so I have to place a link to supply 5V for programming, then replace with a link to 3V3 for operation. I emailed MicroChip and they confirmed I must use 5V for programming Vcc. Vpp is 13.xV but virtually no current, so an op amp is fine.

    Anyway, I will have to do the programming software. Had hoped someone may have done it :-( Of course, if I didn't ask, it would have been done before!

    Now to see if I can squeeze enough code to boot a prop into that PIC ??? In case you hadn't guessed, I want to put one on the RamBlade, perhaps instead of the eeprom.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-08-15 12:49
    UPDATE:

    The PIC10F2xx is available in SOT23-6 and DIP8 packages for about 50 cents. I want to use them in my prop boards, in particular the SOT23-6 versions. For this of course I need to program it in-circuit. It has an inbuilt xtal and software trimming to get it fairly accurate.

    I have a few ideas for this chip to connect to the prop. Here are·some...
    • A keyboard (or mouse) converter to 1 pin serial input to the prop (saves a pin)
    Now, the clock and data pins to the keyboard can be used to program the pic and the MCLR/Vpp pin can be connected externally with switched 13V for the programming state and it can remain unconnected for normal use. The remaining I/O pin is an output to send serial data to the prop.
    • An RS232E compatable serial conversion (instead of a max3232)
    I think this will probably work (but not tested). Run the PIC at 5V with 2 series resistors to the prop. The other 2 pins are for txd and rxd and will switch between +0.6V and +4.3V which should work on most modern RS232 circuits (rxd will require a series resistor to protect the clamping diodes. This is what NMEA uses in the marine industry with good success rates. Programming would be done via the RS232 side and the MCLR/Vpp pin would not be connected to the prop (via resistor) until after programming (this pin must be an input so it will be connected to the serial out from the prop).
    • The PIC10F22x has 2 x 8 bit A/D converters - connect to a serial input to the prop
    Just an idea. Same connections as the keyboard/mouse converter above. Outputs serial conversions to the prop.

    Now, all I have to do is get a few chips and write the programming software. The only hardware complexity is generating the 13V Vpp which is ultra low current. I think Peter's idea of using a 9V battery is fine, but regulate with a·8V2 (or 8V7)·zener diode and a switch.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm

    Post Edited (Cluso99) : 8/15/2009 12:55:01 PM GMT
    852 x 366 - 48K
Sign In or Register to comment.