HELP!! device upgrade for bpickit2

Status
Not open for further replies.

MrDEB

Well-Known Member
My computer had a HD failure and trying to get my wifes computer to be my goto computer until I get several new hard drives.
My issue is the Pickit2 on this computer. I got it installed but the device selection or auto select will not find the correct device.
I recall having to do this several years ago but? I have MPLAB X IDE and MPLAB IPE installed on this computer.
Am in the middle of assembling my Christmas stars for Christmas gifts but that's not going to happen until after Christmas. My so called "saving grace" is the circuit boards are marked
"CHRISTMAS 2021"
 
You should not use the device auto select feature of the pickits.
It's an obsolete feature that should have been removed, but since the PK2 is long obsolete itself that's a moot point.

The auto function can apply damaging voltages to many newer pics that don't support the high-voltage used.

You have the device in front of you... just enter in the part number.
 
I connected a board that I know works and the PK2 just does nothing.
Are you suggesting just type in 18f43k22 and the nPK2 will do its thing?
 
I don't know what software you're using and what you expect to happen, but Visitor (who has been banned form this forum for some reason)
sent me a message pointing to
 
I recall that link but after several attempts still trying to get the updated file. Thinking maybe restart computer?
 
Can't help you there... the link downloads just fine for me.

You seem to have a problem with Norton Internet Virus Suite blocking things (that's not a typo either).
 
am going to download pickit2 installiation then install on my computer. Tried doing this on wifes computer but couldn't get the update file to cooperate.?
hopefully when I try it out it will work with the updated version.
The downloaded install worked but?
 
EGADDS! I just can't get this thing to work
I downloaded an installation package for pickit2
downloaded the update file
changed the device as in the link then inserted in same folder as the pickit2
still has the old device file.
will hack at it again
Is there a better pic programmer than the old pickit2?
 

PK3 or PK 4, the PK2 is an antique!.
 
I don't know where you're getting a pickit3 from, but they haven't been made in a few years
so there's a very good chance it's a clone. That may or may not matter.

If you had problems getting the pickit2 software to work the pickit3 software is even worse.
Don't even think about getting a pickit4. They only work with mplabx and you don't want to go there.

The pickit2 was probably the most reliable programmer they ever made.
 
I've used a Pickit 3 for years without problems, but then again, I won't let MPlab or it's devil spawn MPlab X anywhere near it.

Originally, I used the stand alone Microchip software but now use Pickit3+ software from here https://www.pickitplus.co.uk/Typesetter/ - they even have a version to support the Pickit 2 as well.
 
Pickit3+ is probably the best option... It's just that MrDEB has a perfectly good pickit2 he's been using
and I hate to suggest he spend more money when he just has a problem downloading/installing software.

There were several versions of the pickit3 application software, and they didn't function the same.
The last version (Pickit3 v3.10) just turns your pickit3 into a glorified pickit2 so you end up with
all the same data file issues the pickit2 has.
 
I looked at the link in post #13 and contemplating the pickiteasy version for pk2 & pk3.
Or maybe the pickitplus basic suite. Wonder what is the difference?
 
I don't feel I have a problem downloading software, justy can't get the pk2 update to work. Did this before but??
 
Now I am confused!
I downloaded the pk2 installation pkg as well as the update.
Maybe mistyped something but now it works wioth the updated DAT file.
Now to finish the one star and program it. If all goes well I will assemble the other 4 start circuit boards.
 
HERE IS THE CANDLE CODE FROM SEVERAL YEARS AGO BUT IT NEEDS WORK.
OUPS THAT CAPS LOCK sorry
I tried this using a 18f2221 and looks ok.
I want one set of LEDs (blue) to just twinkle and the White LEDs to fade in and out.
Now that I have a board vthat hopefully will work, I can proceed.
 
oups forgot to insert the code
Code:
{
*****************************************************************************
*  Name    : UNTITLED.BAS                                                   *
*  Author  : [select VIEW...EDITOR OPTIONS]                                 *
*  Notice  : Copyright (c) 2013 [select VIEW...EDITOR OPTIONS]              *
*          : All Rights Reserved                                            *
*  Date    : 11/18/2013                                                     *
*  Version : 1.0                                                            *
*  Notes   :                                                                *
*          :                                                                *
*****************************************************************************
}
{
*****************************************************************************
*  Name    : candle routine.BAS                                                   *
*  Author  : Doug Bezaire                                                   *
*  Notice  : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS]              *
*          : All Rights Reserved                                            *
*  Date    : 4/1/2010                                                       *
*  Version : 1.0                                                            *
*  Notes   :                                                                *
*          :                                                                *
*****************************************************************************
}
{
*****************************************************************************
*  Name    : UNTITLED.BAS                                                   *
*  Author  : Doug Bezaire                                                   *
*  Notice  : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS]              *
*          : All Rights Reserved                                            *
*  Date    : 3/26/2010                                                      *
*  Version : 1.0                                                            *
*  Notes   :  change to 18f43k22
have only two color leds BLUE AND VWHITE                                                              *
*          :                                                                *
*****************************************************************************
}
'Device = 18F4321
'Clock = 8
'Include "IntOSC8.bas"

Device = 18F2221 ' Tell the compiler what chip we are using
Clock = 8 ' Tell the compiler what we will be setting the clock to (Mhz)
Config MCLRE = OFF
Include "intosc.bas"
#option DIGITALIO_INIT = true       // automatically call setalldigital
Include "setdigitalio.bas"



'INCLUDE "InternalOscillator.bas"
Include "RandGen.bas"
Include "Utils.bas"
Include "ADC.bas"
'INCLUDE "PWM2.bas"
Dim TMR2IE As PIE1.1,         // TMR2 interrupt enable
    TMR2IF As PIR1.1,         // TMR2 overflow flag
    TMR2ON As T2CON.2,        // Enables TMR2 to begin incrementing
    Signal_Pin As PORTB.0     // Signal output to frequency meter
 
Dim Red_Pin As PORTA.6,        //was b.0
    Green_Pin As PORTB.7,       //was b1
    Blue_Pin As PORTC.5,        //was b2
    Red_Duty As Byte,
    Green_Duty As Byte,
    Blue_Duty As Byte,
    Red_DutyVal As Byte,
    Green_DutyVal As Byte,
    Blue_DutyVal As Byte,
    RandomVal As Byte
  
Dim p_sel As Byte
Dim Vref As Word
Dim uS As Word
Dim mS As Word
    
    
 Function Get_ADC_Sample() As Word   // Function to grab the ADC sample
 
   result = ADC.Read(0)            // Grab an ADC sample from channel 0
   result = result  * 2              // Scale the answer up by a factor of 2
 
End Function   
'dim duty as byte         
   // ranval(1)as word
Interrupt TMR2_Interrupt()
    High(Signal_Pin)
    Save(0)                   // Back up system variables   
    If TMR2IF = 1 Then        // Check if the interrupt was from TMR2   
        TMR2IF = 0            // Clear the TMR2 interrupt flag
        uS = uS + 50
        If uS >= 1000 Then
            uS = uS - 1000
            Inc(mS)
        EndIf       
        Inc(Red_DutyVal)
        Inc(Green_DutyVal)
        Inc(Blue_DutyVal)
        If Red_DutyVal > Red_Duty Or Red_Duty = 0 Then
            Red_Pin = 0
        Else
            Red_Pin = 1
        EndIf
        If Green_DutyVal > Green_Duty Or Green_Duty = 0 Then
            Green_Pin = 0
        Else
            Green_Pin = 1
        EndIf
        If Blue_DutyVal > Blue_Duty Or Blue_Duty = 0 Then
            Blue_Pin = 0
        Else
            Blue_Pin = 1
        EndIf               
    EndIf                     //
    Restore                   // Restore system variables
    Low(Signal_Pin)
End Interrupt
 
Private Sub TMR2_Initialize()
    TMR2ON = 0                // Disable TMR2
    TMR2IE = 0                // Turn off TMR2 interrupts   
 
    PR2 = 149                 // TMR2 Period register PR2
    T2CON = %00000001         // T2CON 0:1 = Prescale
                              //        00 = Prescale is 1:1
                              //        01 = Prescale is 1:4
                              //        1x = Prescale is 1:16                                 
                              //      3:6 = Postscale             
                              //     0000 = 1:1 postscale
                              //     0001 = 1:2 postscale
                              //     0010 = 1:3 postscale...
                              //     1111 = 1:16 postscale
 
    TMR2 = 0                  // Reset TMR2 Value   
    TMR2IE = 1                // Enable TMR2 interrupts
    TMR2ON = 1                // Enable TMR2 to increment
    Enable(TMR2_Interrupt)
End Sub
 
// Start Of Program...
Low(Red_Pin)
Low(Green_Pin)
Low(Blue_Pin)
Red_Duty = 255
Green_Duty = 0
Blue_Duty = 0
Red_DutyVal = 0
Green_DutyVal = 0
Blue_DutyVal =0
 
uS = 0
mS = 0

RandGen.Initialize(128)       // Initialize the Random Number generator
TMR2_Initialize               // Setup and enable TMR2
//aaaaaaaaaaaaaa
'pwm.SetFreq(5000)             'PWM code piece
'pwm.Start1
//aaaaaaaaaaaaaaaa
While True 
                // Create an infinite loop
    RandomVal = RandGen.Rand  // Grab a random number from 0 to 255
     Select RandomVal         // Find out what colour to increase/decrease
        Case 0 To 42
              Red_Duty =RandomVal-5
              
                mS = 0
              Red_Duty=Rand
                Repeat
                Until mS = 19
                And Red_Duty>0
          
        ' end select
            
        Case 43 To 84
             Red_Duty = 20
                mS = 0
                Repeat
                Until mS = 20
                Dec(Red_Duty)
                DelayMS(5000)    // add adjustable delayms
         ' end select
          
        Case 84 To 127
             Green_Duty =RandomVal-20
               mS = 0
                Repeat
                Until mS = 19
                Inc(Green_Duty)
           ' EndIf
        Case 128 To 170
             Green_Duty = 10
               mS = 0
                Repeat
                Until mS = 40
                Inc(Green_Duty)
                DelayMS(5000)
            
       Case 170 To 212
             Blue_Duty = RandomVal-30
             mS = 0
               Repeat
                Until mS = 19
               Inc(Blue_Duty)
            
        Case 212 To 255
             Blue_Duty = 10
                mS = 0
                Repeat
                Until mS = 20
                  DelayMS(5000)
                Inc(Blue_Duty)
            End Select
            Wend
          
        
         {
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…