Pickit3 ordered -- what else?


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Pickit3 ordered -- what else?

    yes -- do have the right device chosen on winpic and micro code. I'll give some of Mark's stuff a whirl and then give up.

    maybe that OSCCON will do it ?
    new one on me.

    by the way --
    chose 12F675 (in winpic) then says --

    config word #1 3FFC
    config word #2 3FFF

    then after a programming attempt in red I get where it says "bandgap"
    cal=0x003000 oscillator cal=0x003FFF


    THANKS much.
    Last edited by Michael; - 5th September 2016 at 19:57.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Pickit3 ordered -- what else?

    Quote Originally Posted by Michael View Post

    maybe that OSCCON will do it ?
    new one on me.
    Michael,

    The code above was for a pic12f683. I must have cut and paste some older code without changing the notes.
    After looking at the 675 data sheet it has no osccon register. Sorry for the bad info and hope you get your project
    working

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,623


    Did you find this post helpful? Yes | No

    Default Re: Pickit3 ordered -- what else?

    Hmm, that's weird.... Looking at the 12F675 datasheet it doesn't appear to HAVE an OSCCON register and trying to compile code with OSCCON=$70 in it fails - not surprising so I don't know what Mark is doing there.

    EDIT: Ah, OK, code for another device, that explains it.

    The OSCCAL register is used to tweak the internal oscillator up/down a bit in order to get as close to 4MHz as possible. When the chip is manufactured they find out the "best" value for OSCCON (which can differ from chip to chip obviously) and store that value for us at the last location in FLASH memory. So what DEFINE OSCCAL_1k 1 does is to instruct the assembler to generate code for us to retrieve that value from location 1k and put it in the OSCCAL. I don't think it has anything to do with the programmer and any descent device programmer (which I'm sure the EPIC is) WILL retain the calibration value at the last location by Reading it and re-Writing it when it programs the device.

    The 12F675 only has one CONFIG word and it's located at adress 2007h and not 3FFCh that the error message seems to indicate. And why it complains about a config word #2 when there's only one in the device I don't know. I really have no idea what's going on there.

    /Henrik.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Pickit3 ordered -- what else?

    Ok -- you guys really know your stuff -- appreciate all your help. Time to move on and just use the pickit3 when it arrives.

  5. #5
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Pickit3 ordered -- what else?

    Not sure if this helps, It's an old (and I mean old) bit of code that I wrote for a friend to fade a light like the one on Dr Who's tardis (I can't actually recall if the code fades the LED correctly as I don't have a 12F675 to hand). It could probably be written a lot simpler, but I was learning PBP at the time (still am so most of my code is never tight )

    If you comment out the config setting in the 12F675.INC file in the PicBasic folder it compiles using MPSAM without error.

    Code:
    @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON
    
     __CONFIG
     _INTRC_OSC_NOCLKOUT
     _WDT_ON
     _PWRTE_ON
     _MCLRE_OFF
     _BODEN_ON
    
    TRISIO.0 = 0   'Set GPIO.0 to output.
    ANSEL.0 = 0    'Set GPIO.0 to digital		
    VRCON = 0        ' Voltage reference disabled
    OPTION_REG.7 =    0
    
    
    led var GPIO.0
    i var byte
    getout var bit
    
    main:
    for i = 1 to 254                                              
        Pwm GPIO.0,i,1
        pause 5
        if i=253 then 
            i=1
            GetOut=1
            endif
       next i
    
    if Getout=1 then goto down
    
    down:
    for i = 254 to 1 step -1                                              
       Pwm GPIO.0,i,1
        pause 5
        if i=2 then 
            i=1
           GetOut=0
            endif
       next i
    
    if Getout=0 then goto main
    Might be worth giving it a go one last time with your old programmer. It's been years (circ 2001) since I used WinPIC and an old JDM programmer, but I do recall it was very hit and miss at programming. I seem to remember some other version like WinPIC-PRO or something as being an alternative which I think worked better. Might be worth a quick google if you still want to try and resolve this.

Similar Threads

  1. pickit3 trouble PLEASE
    By l_gaminde in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 21st February 2016, 00:06
  2. Pickit3 from Microcode Studio
    By Normnet in forum General
    Replies: 20
    Last Post: - 26th January 2014, 10:06
  3. Can't Get PicKit3 to debug using MPLAB 8.63
    By reppig in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th July 2011, 18:50
  4. PICKit3 Standalone programmer application.
    By HenrikOlsson in forum Off Topic
    Replies: 3
    Last Post: - 11th February 2011, 10:57
  5. Pickit3 from Microcode Studio
    By Plcguy in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 11th December 2010, 22:55

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