ICSP using a 16F84a to program 24CXX


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    I guess I'm still missing something here...

    1) Do you want to build a stand-alone (no PC required at all) 24xxx programmer that would have a program already loaded into it, ready to program more 24xxx chips? Basically nothing more than a 24xxx chip copier...

    2) Do you want to build you own programmer, capable of only doing 24xxx type chips with a PC connected?

    3) Am I still missing a piece of the picture?

  2. #2
    Join Date
    Apr 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Red face

    Quote Originally Posted by skimask View Post
    I guess I'm still missing something here...

    1) Do you want to build a stand-alone (no PC required at all) 24xxx programmer that would have a program already loaded into it, ready to program more 24xxx chips? Basically nothing more than a 24xxx chip copier...

    2) Do you want to build you own programmer, capable of only doing 24xxx type chips with a PC connected?

    3) Am I still missing a piece of the picture?
    Hi - no you are not missing anything. Only thing is my poor way of asking question.

    1) Yes - no PC required at all. I program the 16f84a once through PC and then it keeps programming 24xxx(s). And basically it is nothing more than a 24xxx chip copier/firmware updater.

    2) That would be nice - but PonyProg can do that using olimex JDM programmer board. But need a PC with com port for that. Parallel ports are gone and com/serial port almost gone. USB is still expensive.

    3) So I guess I have been able to give the picture.

    This is like:
    http://www.winpicprog.co.uk/pic_tutorial_i2c_board.htm

    But using only 3 wires instead of 4.
    Dat/CLk provides the +ve which is kept in capacitor, transistor and powers the 24cxx. Gnd is Gnd.
    Three wire works for JDM program board of olimex - not my poor 16f84.

    Thanks
    Aftab.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aftab View Post
    Hi - no you are not missing anything. Only thing is my poor way of asking question.
    Ok...I think I might be getting the picture.
    Do you have a method to program a 24xxx chip right now?

  4. #4
    Join Date
    Apr 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by skimask View Post
    Ok...I think I might be getting the picture.
    Do you have a method to program a 24xxx chip right now?
    Yes.
    Now I program the 24 using Olimex JDM programmer:
    http://www.olimex.com/dev/index.html

    Using the ICSP header I connect them as:
    http://www.olimex.com/dev/images/pic-icsp.gif
    3-Gnd-->gnd of 24CX
    4-PGD-->Data of 24CX
    5-PGC-->Clk of 24CX

    Using windows Pic progarmming software, I can program the 24X

    But not by 16f84a.
    Could this be a voltage issue ? or Should I try something else than i2cwrite ?

    Thanks
    Aftab.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    SDA and SCL pin must be pull-up with resistors... as in the manual.

    The code example in the manual should work AS-IS
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    SDA and SCL pin must be pull-up with resistors... as in the manual.

    The code example in the manual should work AS-IS
    I was just going to say that...along with adding an active pulldown on WP. Datasheet says there's an internal weak pull down, but ya never know.
    (BTW - Now I get what you're getting at).

  7. #7
    Join Date
    Apr 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default 4.7k

    Quote Originally Posted by mister_e View Post
    SDA and SCL pin must be pull-up with resistors... as in the manual.

    The code example in the manual should work AS-IS
    I think I tried that last night - but could have done wrong.
    But when I had placed a 24C on my breadboard - it worked.
    But when I got 3 connectors to the circuit board with 24C on it, it did not work. However, I shall try that tonight once my classes are over.

    But I may sound stupid - till now I do not understand what pull-up means. I shall attach the 4.7k resistors (or other value ?). Only know that resistors are needed to pull-up(?) to program i2c.

    Shall post my result of this.

    Thanks
    Aftab.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aftab View Post
    I think I tried that last night - but could have done wrong.
    But when I had placed a 24C on my breadboard - it worked.
    But when I got 3 connectors to the circuit board with 24C on it, it did not work. However, I shall try that tonight once my classes are over.

    But I may sound stupid - till now I do not understand what pull-up means. I shall attach the 4.7k resistors (or other value ?). Only know that resistors are needed to pull-up(?) to program i2c.

    Shall post my result of this.

    Thanks
    Aftab.
    Pull up....
    On signal lines that can be connected to more than one device (in this case I2C's SCK and SDA), the signals aren't powered directly by any of the chips, but by power and the pullup resistors. The various devices can only apply a ground to the signal line. If no devices on the bus are applying a ground, the line stays high (logic 1, at near power supply voltage). If there are multiple devices on the bus, and any one of them applies a ground, the entire signal line drops to ground (logic 0).

    If you had each chip holding the signal lines high, and one of them tried to make the signal line a low (logic 0), the other chips would either overpower it, or you'd end up with a lot of smoke in the room

    Same thing goes for a pull down, but the other way in reverse.

    Most of the time, the terms 'pullup' and 'pulldown' aren't so complicated. A pullup just means a high-ish value (4.7K, 10K, etc) resistor between Pin X (or whatever) and the positive supply rail. Conversely for the pull down, a resistor between Pin X and the ground rail.

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. 24Cxx copier with PIC 16F84A
    By the_kid25 in forum Schematics
    Replies: 7
    Last Post: - 28th October 2013, 09:05
  3. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Novice 16F83A BLINK LED program help
    By owali in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 25th July 2007, 05:02

Members who have read this thread : 0

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