Error programming 10F222


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33

    Default Error programming 10F222

    Hello,

    I've just started working with the 10F222, and haven't been able to get anywhere due to a 'Code Programming Error at 0000'. I've poked around on the threads and found a couple of interesting things [apparently, bit 5 of Option_Reg interferes with the function of GPIO.2..?]. Anyhow, I'm using PBP, and the meLabs USB programmer. Firmware has been updated on the programmer. ZIF adapter is connected correctly. Chip package is DIP.
    The process goes like this.

    Write some simple test code [below, board set up with LEDs on pins 3,4,5]
    Ask PBP to compile [no errors or warnings. Yes!]
    Set OSC, MCPU, WDT, MCLR, Code Protect in meProg configuration window.
    Ask meProg to program, and get a message
    'Device not blank, program anyway?'
    Well, yes. I want you to program the chip after all. Click OK, and get message
    'Code Programming Error at 0000'

    I've read the chip with the meProg, and it's blank.
    I've tried all the chips [10] in my batch.
    Any advice will appreciated.




    Code:
     
    
    OPTION_REG = %11000000
    ADCON0 = 0
    TRISIO = 0
    GPIO = 0
    
    Main:                        'chase the LEDs
        high GPIO.0
        pause 500
        low GPIO.0
        high GPIO.1
        pause 500
        low GPIO.1
        high GPIO.2
        pause 500
        low GPIO.2 
        pause 500
    
    goto MAIN

  2. #2
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Default problem update

    Hello.
    been around the thread alot today. almost all of the posts in regard to this issue have to do with the EPIC serial programmer. I'm using the USB programmer. difference no?.
    i tried many suggestions to no avail. i still get this error at 0000.
    one suggestion was to read the chip first. ok. so i read the chip, that worked, and then i tried to program it and voila! of course, i just programmed the garbage that was read from the chip. bunch of zeros. so, at least the chip will program! but still, MY code is not sticking...

  3. #3
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Default dizzy

    tried prying up the Vdd and Vss pins and giving them separate power during programming. same error at 0000.
    noticed that the DIP and SOIC versions have the Data and Clock pins in different locations. tried jumping them during programming. same problem.

    i notice also that the datasheet for the 10F222 calls these pins ICSPDAT and ICSPCLK. I'm using the meLabs USB Programmer with ZIF adapter... could this be screwing me up? I program chips often and with great success. you might say it's a living... gotta get this 10F222 to work so I can pay rent!

    i've used MPASM and the other one.

    could somebody try to program this code on a 10F222?
    i'm at the end of my rope...


    Code:
    @ Device PIC10F222, IOFSCS_8MHZ, MCPU_OFF, WDT_OFF, PROTECT_OFF, MCLR_OFF
    
    ADCON0 = %00000000
    TRISIO = %00000000
    GPIO = 0
    pause 1000
    Main:
        high GPIO.0
        pause 500
        low GPIO.0
        high GPIO.1   
        pause 500
        low GPIO.1
        high GPIO.2
        pause 500
        low GPIO.2 
        pause 500
    
    goto MAIN

  4. #4
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Default resting

    have tried a couple of things and they are funny.

    i compiled some code that i'm currently using on a 16F88 and it programmed correctly.
    i tried to program the 16F88 with the code written for the 10F222 and the same code error at 0000 occured! with the wrong chip in! then, i took out the chips and tried to program an empty ZIF adapter. and it gave me the same error! not even a 'target device does not match selected device' warning.

    ha ha ha ha hahahahahaha

    seriously. time for a break. hope to hear from you soon.

  5. #5
    Join Date
    Sep 2007
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    The PIC10F parts require a special programming adapter, even when using the 8-pin DIP package. They won't work in the standard adapters like the 8-40 pin or the 8/18/20 pin.
    Charles Leo
    microEngineering Labs, Inc.
    http://melabs.com

  6. #6
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    holy crow.
    i was planning on setting up a breadboard to do ICSP on the thing... i'll still give that a go, while i'm waiting for my shipment from meLabs!
    i have used the 12F parts [8 pin] with the standard ZIF with great success, and just assumed... yeah, right.
    it is still possible to be smarter than yesterday.

    thankyou kind Charles for waking me from my stupor.

Similar Threads

  1. 10F222 ADC Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 30th October 2008, 03:46
  2. 10f222
    By Meriachee in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 31st October 2006, 17:09

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