Very Simple ICSP Programmer


Closed Thread
Results 1 to 40 of 130

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Squibcakes
    TinyBootloader programer requires a Max232 chip connected to the Pic's USART port and does not use the Very Simple programmer.

    I am currently using one of these for bootloading
    http://www.dontronics.com/micro-usb.html

    It can supply 3.3V or 5V to power the PIC and the TX ad RX lines are at 3.3V. Just put a 1K resistor in series with each for use with a 5V PIC.

    I have two test development projects currently built up on pieces of veroboard and each has a 4 pin header. My MicroUSB has a flying lead attached with a 4 pin plug and I just use it with whichever project I am working on at the time. The entire project is then powered from the USB port on the PC.

    I have a MANUAL RESET BUTTON on the veroboard as I prefer to manually reset rather than have the PC do it. That way I dont get false resets when I fire up serial comms with the board when I am not bootloading.

    I am using it with a 16F88 and 18F452 at the moment.

    No connection etc.... other than being a VERY satisfied user

    Regards

    Keith
    Keith

    www.diyha.co.uk
    www.kat5.tv

  2. #2
    NewBoy's Avatar
    NewBoy Guest


    Did you find this post helpful? Yes | No

    Default

    Hello Chaps,

    Please help a NewBoy start. I'm moving up from Picaxe and the change is traumatic.

    What I want at the-end-of-the-day:
    To be able to programme a 16F88 in circuit via a cheap'n'cheerful serial PC link using the MAX232 (or similar).

    I have Proton IDE and a MELABS USB programmer.
    (I was going to make my own programming board for trial.)

    I've picked up a lot of useful information from the Proton forum, but have got stuck due to ineptitude.

    My confusions:
    - I believe I have to use the programmer to download 'firmware' to allow me to programme/load subsequent code. Where is this 'firmware'?

    - Is the above a 2-stage process? I have installed the MELABS programmer software, so where do I go from there?

    - What are the pinouts of the MELABS USB programmer to allow me to load the firmware/subsequent code in-circuit? (i.e. in-my-circuit)
    (The Mecanique website shows an ICSP diag. but the programmer pins are perhaps only for the serial programmer as they don't tie up).

    And finally, a last question:
    Is there a simpler PC serial to programmed PIC , rather than using a MAX232 based circuit? (That will work safely).

    I'm getting muddled with the terminology interchange of 'bootloader' and 'firmware' too which isn't helping.

    I am terminologically challenged and obviously thick.

    Thanks. (Any drawings/circuit diagrams/links gratefully accepted).

  3. #3
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Cool

    The Bootloader firmware resides in PIC Flash memory.

    You load it into the PIC Flash using the Simple ISCP programmer, or any other program use use. This is a one off programing of the PIC (until you erase the chip)

    There after, you load your programs into the pic using RS232 via the USART pins of the pic.

    Not sure on the exact details of how it works, but the bootloader in the pic erases or overwrites the existing program with the new program.

    In part yes it is a 2 step process, but only the first time you load the bootloader firmware.

    You need to use a MAX232 style chip to load your programs (or a USB converter with RS232 outputs).

    Get a MAX232 chip, half a dozen 10uF Caps and some V Board.

    I use 3 wires from the serial port, TX, RX GND - connected to a MAX232 chip, in turn connected to the PIC.

    See my last post about the software for loading the Bootloader Firmware.

    happy days.
    J

  4. #4
    NewBoy's Avatar
    NewBoy Guest


    Did you find this post helpful? Yes | No

    Default Stuck

    Thanks Squibcakes.

    I'm perplexed. I'll tell you what I've done.

    I have an MELABS USB Programmer and a handful of 16F88s.
    I have Proton IDE+Microloader and TinyLoader.

    What I want to achieve:
    In-circuit serial programming in my own designed pcbs.

    How far have I got?
    Halfway.
    I can programme from the USB Programmer fine. All functions work.
    So far, so good.

    I have a serial PCB with MAX232 and a ZIF socket.
    This is where it all goes wrong.

    Here is what I have done:-
    I transfer the 16F88 from the programmer to the serial PCB.
    I connect cable and switch it all on.
    I then try loading a 3 line programme using Microloader.
    Cannot load, press reset numerous times - no joy.
    I then try Tinyloader - cannot find PIC.
    (COM setting correct and I've tried every baud option)
    No joy. Neither can recognise the presence of a PIC.

    What I have checked on serial pcb +MAx232 (or equiv.).
    1. Power.
    2. RS232 voltages fine (nom +/-10V)
    3. Reset conencted.
    4. Connections to Rb6 and Rb7. Fine.
    5. Optionally taken Rb3 to ground via resistor.

    Then connected oscillioscope:
    1. Connected to; MCLR, Rb7 and Rb6 on 16F88.
    2. On USB Programmer it does a Reset .... 7mS .... activity on Rb7 & Rb6.
    3. On serial card (using Microloader) it does Reset ... repeated 250uS pulse on Rb7, nothing on Rb6.
    4. On serial card (using Tinyloader) it holds reset down and double pulses Rb7. (Why it holds reset down - regardless of 'options' settings is odd.)

    But there seems to be no response from the 16F88.

    Stick it back in the programmer and all is fine!

    Sadly, I need the ICSP for 2 reasons:
    a) So I can test programme in-situ (like everyone else does).
    b) Proton Microloader only supports COMs (as does Tinyloader??)
    c) Be able to programme device using a simple serial cable and not have to use USB programmer. i.e. a box with a serial port on the side.

    So, assuming my serial card with MAX232 isn't wrong (and all the pin measurements say its OK), what haven't I done?

    Keep in mind this is my first forray into PIC programming. I've only used PICAXE and Stamp previously.

    Copious thanks to the first person who prevents me having to buy Just For Men!

  5. #5
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Red face

    I see where you are going wrong...

    STEP ONE
    ----------
    Firstly, what Frequency is your chip running at?

    If 8Mhz internal clock, load tinybld16F88_i8MHz __19200.HEX file into the Pic Flash using ICSP (pins 6+7).

    If 20Mhz, then use the tinybld16F88_20MHz_115200.HEX file.

    The above is done once only into your newly erased chip.

    STEP TWO
    -----------

    The max chip should be connected to Pin 8 - RB2(RX Data), and Pin 11 - RB5 (TX Data). These Pins are for transfering your actual program to the PIC. Use TinyBootloader to transfer your program. You will need to be able to reset the MCLR line before downloading the program.

    If you just want to use ICSP on your already made board.. than you may not be able to use the above example. Just use basic ICSP only, forget tinyBootloader..... else you will need to modify the board so that you can program via pins 8 + 11 (Via Max232 of course ).

    Hope this is clears the air.

    Cheers
    J

  6. #6
    NewBoy's Avatar
    NewBoy Guest


    Did you find this post helpful? Yes | No

    Default

    Squibcakes.
    You are a GOD!

    I had been told to connect the MAX232 circuit as per Proton manual into PG7 and PG6. (I think in fairness this was a minor incorrect extrapolation of muddling pinouts from 2 different data sheets).

    Anyway, end result is that it works. Thanks to you.
    Everything is fine.
    Much appreciated!!!!!!!!

Similar Threads

  1. Melabs U2 Programmer Command Line Options
    By Robert Wells in forum General
    Replies: 5
    Last Post: - 3rd July 2009, 02:11
  2. Soic Icsp
    By earltyso in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th September 2008, 19:51
  3. Replies: 1
    Last Post: - 10th December 2007, 23:57
  4. problems with USB programmer
    By malc-c in forum General
    Replies: 7
    Last Post: - 10th May 2007, 20:14
  5. USB programmer problems
    By uiucee2003 in forum USB
    Replies: 2
    Last Post: - 15th August 2006, 23:47

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts