TOP2049 programmer

Discussion in 'Embedded Systems and Microcontrollers' started by mik3, May 16, 2008.

  1. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    hi guys,

    i bought a TOP2049 programmer, i program my PIC16F819 , i can read the program back but the PIC on the circuit does not work. I am sure the PIC is good and the circuit works because with another programmer i program it and works fine. What might be the problem?
     
  2. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    Check your configuration bits.
     
  3. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    What do you mean ? i am new to programming
     
  4. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    You need to read the datasheet for your processor. The PIC has configuration bits that tell it whether it should use the watchdog timer, what oscillator to use, and various other things. If these are set up incorrectly, it may not start.

    It is possible to embed these settings in the hex file, but not all programmers necessarily know what to do with it. Many times you need to set them up manually with the software.
     
  5. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    When i program the PIC with Galep it works fine but with the TOP2049 it doesnt. I checked the hex code in both programmers software and it is the same. But i noticed that in TOP2049 the hex instructions are swapped (if in galep is fa b3 in top2049 is b3 fa). I think this is the software and nothing more.
     
  6. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    That is possible, but it could just be the method of the software representing it.

    My only point is to make sure you understand that for a PIC the hex instructions don't necessarily fully define the operation of the device? You may also need the Config info.
     
  7. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    Configure info in hex?
     
  8. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    another thing. this is my hex program:

    0: 00 30 8a 00 cb 28 00 00 ff 00 03 0e 83 01 a1 00 .0...(..........
    10: 7f 08 a0 00 0a 08 a8 00 8a 01 a0 0e 04 08 a2 00 ...............
    20: 77 08 a3 00 78 08 a4 00 79 08 a5 00 7a 08 a6 00 w...x...y...z...
    30: 7b 08 a7 00 83 13 83 12 8b 1e 20 28 0b 19 59 28 {..........(..Y(
    40: 22 08 84 00 23 08 f7 00 24 08 f8 00 25 08 f9 00 "...#...$...%...
    50: 26 08 fa 00 27 08 fb 00 28 08 8a 00 21 0e 83 00 &...'...(...!...
    60: ff 0e 7f 0e 09 00 f8 01 f9 01 f7 01 fa 01 36 08 .............6.
    70: 03 1d 3d 28 35 08 03 19 57 28 10 30 b7 00 03 10 ..=(5...W(.0....
    80: b3 0d b4 0d f7 0d fa 0d 36 08 7a 02 03 1d 4a 28 ........6.z...J(
    90: 35 08 77 02 03 1c 53 28 35 08 f7 02 03 1c fa 03 5.w...S(5.......
    a0: 36 08 fa 02 03 14 f8 0d f9 0d b7 0b 3f 28 00 00 6...........?(..
    b0: 00 34 00 30 f8 00 1f 08 c7 39 78 04 9f 00 06 30 .4.0.....9x....0
    c0: f7 00 f7 0b 61 28 00 00 1f 15 1f 19 65 28 83 16 ....a(......e(..
    d0: 1e 08 83 12 ad 00 1e 08 ae 00 2e 08 b4 00 2d 08 ..............-.
    e0: b3 00 b6 01 06 30 b5 00 33 20 79 08 aa 00 78 08 .....0..3.y...x.
    f0: a9 00 08 30 f8 00 1f 08 c7 39 78 04 9f 00 06 30 ...0.....9x....0
    100: f7 00 f7 0b 81 28 00 00 1f 15 1f 19 85 28 83 16 .....(.......(..
    110: 1e 08 83 12 af 00 1e 08 b0 00 30 08 b4 00 2f 08 ..........0.../.
    120: b3 00 b6 01 06 30 b5 00 33 20 79 08 ac 00 78 08 .....0..3.y...x.
    130: ab 00 2a 08 2c 02 03 1c a8 28 03 1d a3 28 2b 08 ..*.,....(...(+.
    140: 29 02 03 18 a8 28 31 08 03 19 b2 03 b1 03 b5 28 )....(1........(
    150: 2c 08 2a 02 03 1c b5 28 03 1d b2 28 29 08 2b 02 ,.*....(...().+.
    160: 03 18 b5 28 b1 0a 03 19 b2 0a 32 08 f9 00 31 08 ...(......2...1.
    170: f8 00 f9 0c f8 0c f9 0c f8 0c f9 0c 78 08 95 00 ............x...
    180: f9 0c 79 0c 30 39 f7 00 17 08 cf 39 77 04 97 00 ..y.09.....9w...
    190: 0b 11 8a 11 20 28 84 01 1f 30 83 05 70 30 83 16 .....(...0..p0..
    1a0: 8f 00 0f 08 1f 14 9f 14 1f 15 9f 11 70 30 8f 00 ............p0..
    1b0: 0f 08 f3 30 86 00 c0 30 83 12 8b 04 8b 16 83 16 ...0...0........
    1c0: 1f 10 9f 10 1f 11 9f 11 1f 13 83 12 1f 17 9f 13 ................
    1d0: 83 16 9f 17 83 12 1f 14 06 11 0c 30 97 00 83 16 ...........0....
    1e0: 01 08 c0 39 02 38 81 00 83 12 90 01 00 30 f8 00 ...9.8.......0..
    1f0: 04 38 92 00 2c 30 83 16 92 00 fd 28 63 00 ff 3f .8..,0.....(c..?

    i program the PIC with it and then read the PIC to see if it is written. But i get this hex code with ff and 3f below the original program. where did this code come from?

    0: 00 30 8a 00 cb 28 00 00 ff 00 03 0e 83 01 a1 00 .0...(..........
    10: 7f 08 a0 00 0a 08 a8 00 8a 01 a0 0e 04 08 a2 00 ...............
    20: 77 08 a3 00 78 08 a4 00 79 08 a5 00 7a 08 a6 00 w...x...y...z...
    30: 7b 08 a7 00 83 13 83 12 8b 1e 20 28 0b 19 59 28 {..........(..Y(
    40: 22 08 84 00 23 08 f7 00 24 08 f8 00 25 08 f9 00 "...#...$...%...
    50: 26 08 fa 00 27 08 fb 00 28 08 8a 00 21 0e 83 00 &...'...(...!...
    60: ff 0e 7f 0e 09 00 f8 01 f9 01 f7 01 fa 01 36 08 .............6.
    70: 03 1d 3d 28 35 08 03 19 57 28 10 30 b7 00 03 10 ..=(5...W(.0....
    80: b3 0d b4 0d f7 0d fa 0d 36 08 7a 02 03 1d 4a 28 ........6.z...J(
    90: 35 08 77 02 03 1c 53 28 35 08 f7 02 03 1c fa 03 5.w...S(5.......
    a0: 36 08 fa 02 03 14 f8 0d f9 0d b7 0b 3f 28 00 00 6...........?(..
    b0: 00 34 00 30 f8 00 1f 08 c7 39 78 04 9f 00 06 30 .4.0.....9x....0
    c0: f7 00 f7 0b 61 28 00 00 1f 15 1f 19 65 28 83 16 ....a(......e(..
    d0: 1e 08 83 12 ad 00 1e 08 ae 00 2e 08 b4 00 2d 08 ..............-.
    e0: b3 00 b6 01 06 30 b5 00 33 20 79 08 aa 00 78 08 .....0..3.y...x.
    f0: a9 00 08 30 f8 00 1f 08 c7 39 78 04 9f 00 06 30 ...0.....9x....0
    100: f7 00 f7 0b 81 28 00 00 1f 15 1f 19 85 28 83 16 .....(.......(..
    110: 1e 08 83 12 af 00 1e 08 b0 00 30 08 b4 00 2f 08 ..........0.../.
    120: b3 00 b6 01 06 30 b5 00 33 20 79 08 ac 00 78 08 .....0..3.y...x.
    130: ab 00 2a 08 2c 02 03 1c a8 28 03 1d a3 28 2b 08 ..*.,....(...(+.
    140: 29 02 03 18 a8 28 31 08 03 19 b2 03 b1 03 b5 28 )....(1........(
    150: 2c 08 2a 02 03 1c b5 28 03 1d b2 28 29 08 2b 02 ,.*....(...().+.
    160: 03 18 b5 28 b1 0a 03 19 b2 0a 32 08 f9 00 31 08 ...(......2...1.
    170: f8 00 f9 0c f8 0c f9 0c f8 0c f9 0c 78 08 95 00 ............x...
    180: f9 0c 79 0c 30 39 f7 00 17 08 cf 39 77 04 97 00 ..y.09.....9w...
    190: 0b 11 8a 11 20 28 84 01 1f 30 83 05 70 30 83 16 .....(...0..p0..
    1a0: 8f 00 0f 08 1f 14 9f 14 1f 15 9f 11 70 30 8f 00 ............p0..
    1b0: 0f 08 f3 30 86 00 c0 30 83 12 8b 04 8b 16 83 16 ...0...0........
    1c0: 1f 10 9f 10 1f 11 9f 11 1f 13 83 12 1f 17 9f 13 ................
    1d0: 83 16 9f 17 83 12 1f 14 06 11 0c 30 97 00 83 16 ...........0....
    1e0: 01 08 c0 39 02 38 81 00 83 12 90 01 00 30 f8 00 ...9.8.......0..
    1f0: 04 38 92 00 2c 30 83 16 92 00 fd 28 63 00 ff 3f .8..,0.....(c..?
    200: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    210: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    220: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    230: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    240: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    250: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    260: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    270: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    280: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    290: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    2a0: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    2b0: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    2c0: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    2d0: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    2e0: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
    2f0: ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f ff 3f .?.?.?.?.?.?.?.?
     
  9. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    The configuration bits may not be in the hex code. I just downloaded that datashee for your part. Look at section 12.1 If you look at your hex code, see if you can find any data written to address 2007h. That is the mapped location of the configuration word. If nothing is there, then you need to set them manually using the programming software or add the lines to the hex file.

    While I was typing this, I saw your hex code. It looks like 2007h is not explicitely programmed and is currently 0x3F.
     
  10. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    Here are the settings. You have '1' in all bits.
     
  11. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    There is nothing in the attached pdf!!
     
  12. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    Had a little problem with my pdf printer there. Try this.
     
  13. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    Thanks a lot guys . I appreciate your help. My programmer finally worked.
     
    Last edited: May 18, 2008
Loading...