Problems programming


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2008
    Posts
    14

    Default Problems programming

    I have problems programming my PIC12CE674.
    I have managed to program my PIC one time, and the program works so the hardware is correct i think.
    But afterwards i always ends with a error.

    This are my operation options.

    L0323: ------------------------------------
    L0324: ==== Device operation options ====
    L0325: ------------------------------------
    L0326: - Insertion test
    L0327: Insertion test: Enable
    L0328: - Command execution
    L0329: Blank check before programming: Disable
    L0330: Verify after reading: Enable
    L0331: Verify: Twice
    L0332: Verify options: VDDnom. +/-10%
    L0333: - Programming parameters
    L0334: [x] User program memory and ID locations
    L0335: [x] Configuration bits
    L0336: [x] Oscillator Calibration value
    L0337:
    L0338: >> 06.12.2008, 12:26:01
    L0339: Programming device: Microchip PIC12CE674.
    L0340: Buffer checksum in range of [0h..7FFh]: 0008CCF8 - Byte sum (x8)
    L0341: Device insertion test ...
    L0342: Programming device ...
    L0343: Programming device - error!
    L0344: ADR=0000h DO=2849h DI=2800h ST=0000
    L0345: Elapsed time: 0:00:00.1
    L0346: Statistics info: Success:0 Failure:1 Total:1

    The config word is:
    ID0-ID3 = FFFFh
    Oscillator = IntRC osc function GP4
    Watchdog = disabled
    Power up timer = disabled
    Code protect = off
    MLRC = connected to vdd

    And my program is:
    @ device INTRC_OSC ; Internal Oscillator
    @ device MCLR_OFF ; Turn OFF Master Clear Reset
    @ device WDT_OFF ; Turn OFF WatchDog Timer

    'Definitions
    DEFINE OSCCAL_2K 1

    'Register Initializations'
    ADCON1 = 7

    GPIO = 0
    TRISIO = %111001

    'TRISIO.0 = 1 ' define Inputs and Outputs
    'TRISIO.1 = 0 ' define Inputs and Outputs
    'TRISIO.2 = 0 ' define Inputs and Outputs
    'TRISIO.3 = 1 ' define Inputs and Outputs
    'TRISIO.4 = 1 ' define Inputs and Outputs
    'TRISIO.5 = 1 ' define Inputs and Outputs
    'Register Initializations'

    'Variabelen
    Input_1 VAR GPIO.4
    Input_2 VAR GPIO.5
    Output_1 VAR GPIO.1
    Output_2 VAR GPIO.2
    Button_1 var bit
    Button_2 var bit
    Memory_1 var bit
    Memory_2 VAR bit
    Max_Pulsen VAR WORD
    Pulsen_1 VAR WORD
    Pulsen_2 VAR WORD


    CLEAR
    Max_Pulsen = 50

    Main: if input_1 = 1 then
    pause 20
    button_1 = 1
    else
    pause 20
    button_1 = 0
    endif

    if input_2 = 1 then
    pause 20
    button_2 = 1
    else
    pause 20
    button_2 = 0
    endif

    if (button_1 = 1 & Memory_1 = 0 & pulsen_1 = 0) then
    Pulsen_1 = Max_pulsen
    Memory_1 = 1
    ENDif
    If (button_1 = 0 & memory_1 = 1) then
    memory_1 = 0
    endif
    if (button_1 = 1 & memory_1 = 0 & pulsen_1 > 0) then
    pulsen_1 = 0
    endif

    if (button_2 = 1 & Memory_2 = 0 & pulsen_2 = 0) then
    Pulsen_2 = Max_pulsen
    Memory_2 = 1
    ENDif
    If (button_2 = 0 & memory_2 = 1) then
    memory_2 = 0
    endif
    if (button_2 = 1 & memory_2 = 0 & pulsen_2 > 0) then
    pulsen_2 = 0
    endif


    if (Pulsen_1 > 0) then
    Toggle Output_1
    else
    output_1 = 0
    endif

    if (Pulsen_2 > 0) then
    Toggle Output_2
    else
    output_2 = 0
    endif

    pause 667 '90 periodes per minuut = 0,6ms
    goto main
    end

    I was thinking that the problem was that i didn't give a adress where the program begins. So that the PIC doesn't know where to start my program.

    If that is the fault how can i say where he needs to start my program?

    Maybe it is somhthing you need to know when i only program the configuration word i have no problems.

    I hope that someone knows what i'm doeing wrong.

    Thanxs at advance

  2. #2
    Join Date
    Nov 2008
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    I have found the problem after reading the datasheet throughly, i have found that this kind of pic is a one time programmeble.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    They have a windowed version of this PIC that's erased with a UV light source similar to old EEPROMs, but it's pretty expensive.

    If you prefer an 8-pin device, look at some of the newer flash-based parts like the 12Fxxx series. The 12F615 or 12F609 are very inexpensive, and easy to use.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Nov 2008
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    It is indeed a good device but i don't see the type in Picbasic Pro, so can i program this device?

    I have the chooce between:
    12F508
    12F509
    12F629
    12F675
    12F683

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The chips Bruce mentioned are in PBP 2.50.

    The chips in your list are good too.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Data Programming Error at 0000
    By cpatnoi in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd May 2009, 03:37
  2. Programming Pins of PICs?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th August 2007, 18:59
  3. PIC16F886 programming problems
    By mmargolis in forum General
    Replies: 2
    Last Post: - 3rd August 2007, 01:19
  4. PIC programming algorithm - where is it to find?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2007, 18:31
  5. ICSP problems
    By Tomexx in forum Off Topic
    Replies: 0
    Last Post: - 8th January 2006, 23:38

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