Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Junebug having PICKIT 2 Problems

Status
Not open for further replies.

soky157

New Member
When importing hex file that causes leds to light one by one does not work. PICIT2 always says Writing was successful but the programs never start. I am very new to the Junebug. (Have owned for a couple of months). I would really appreciate any help. I have read other forums entries and this is my first post.

Tony
 
It's probably being held in reset, one way to release it is to turn DIP #1 off after it's programmed. The PICkit2 software will have a MCLR tab.
 
MCLR did not help

I checked MCLR on PICIIT2 and Pulled down switch 1 on the Junebug and neither helped. Any other suggestions would be greatly appreciated. As yet I have not been able to any program run on the Junebug. Most of which are demos etc on the Forum.

Soky157
 
The PICKIT 2 Message I am getting is: "Programming successful. Waiting for file to update (Click button to exit again) Nothing else happens, kind of in a frozen state. I am also not sure what button the message is referring to.

Soky157
 
Can you post the hex file you are using? You will have to rename it to .txt to upload it.

Mike.
 
Below is an example program that the PICKIT 2 shows Programmed Successfully but the Junebug seems to just freeze.



#include <system.h>
#pragma DATA _CONFIG1H, _INTIO2_OSC_1H
#pragma DATA _CONFIG2H, _WDT_OFF_2H
#pragma DATA _CONFIG3H, _MCLRE_ON_3H
#pragma DATA _CONFIG4L, _LVP_OFF_4L
void led0(void);
void led1(void);
void led2(void);
void led3(void);
void led4(void);
void led5(void);
void main(){
int del = 100;
trisa = 0b10111110;
adcon1 = 0x7f;
lata = 0;
osccon = 0x72;
while(1){
led0();
delay_ms(del);
lata = 0x00;
delay_ms(del);
led1();
delay_ms(del);
lata = 0x00;
delay_ms(del);
led2();
delay_ms(del);
lata = 0x00;
delay_ms(del);
led3();
delay_ms(del);
lata = 0x00;
delay_ms(del);
led4();
delay_ms(del);
lata = 0x00;
delay_ms(del);
led5();
delay_ms(del);
lata = 0x00;
delay_ms(del);
}
}
void led0(void){
trisa = 0b10111110;
lata.0 = 1;
lata.6 = 0;
}
void led1(void){
trisa = 0b10111110;
lata.0 = 0;
lata.6 = 1;
}
void led2(void){
trisa = 0b00111111;
lata.6 = 1;
lata.7 = 0;
}
void led3(void){
trisa = 0b00111111;
lata.6 = 0;
lata.7 = 1;
}
void led4(void){
trisa = 0b01111110;
lata.0 = 0;
lata.7 = 1;
}
void led5(void){
trisa = 0b01111110;
lata.0 = 1;
lata.7 = 0;
}
 
In the Pickit2 window I found that to make the program RUN you need to click on the little box above MCLR, I recall it says ON
this is located on the right middle of the page
 
This is very confusing. You stated that you are using the pickit2 software but have posted a c source file. The source file you posted is for BoostC. Are you compiling the file using BoostC? Maybe you should describe exactly what you are doing.

BTW, the file works fine and produces a running light effect.

Mike.
 
To be totally honest I am sure. I thought the above program would be seen by the Junebug as HEX and work. I just want to get something working on the Junebug so that I know that it is working (I am sure that it is). I would appreciate a simple program to load on the Junebug so that I can test it out. I am completely open to any and all suggestions. I just want to get started having fun with this thing. Any and all help will be gratefully appreciated.
 
here is an easy code

I am pretty sure this will work on Junebug. I myself am using the Junebug but have lots of code that most work and some are in progress as well as some that don't work
do a search on this form JUNEBUG HELP. I started that thread and learned alot. It has some 35+ pages but lots of good info. I find myself going back and reviewing. The thread has numerous code snippets.

Code:
Device = 18F1320
Clock = 8 // tells the compiler the FOSC speed
Config OSC = INTIO2, WDT = OFF, LVP = OFF
Dim LED As PORTA.0
OSCCON = %01111111
 While true
    High (LED) // turns on port A0
    DelayUS (10)   // justs change this to change sound
    Low (LED) //turns off port A0
    DelayUS (10)  // and this to delay
  Wend
 
Thank you for your help. I used PICIIT 2 to take your program and put it into the Junebug. I still the same error message from PICIT 2: "Programming Successful...waiting for File Update (Click Button again to exit). The Junebug does nothing. Something is obviously not right. I am using PICKIT 2 v2.61.
 
after writing the code into the PIC you leave the Junebug connected but CHECK the box marked ON (two boxes, one marked ON and other marked MCLR)
just click the ON box
the Junebug RED led should light and the A0 led comes on.
READ the posts I mentioned. I know its lots to read but full of info exactly the issues your facing now.
Did you ever find the posts. Its in the miccontroller section.
If you never found it then let me know and I will locate.
 
How are you putting a C source file into the Junebug. The Junebug will not work with a C source file.

Mike.
 
Yes, I have placed a check in the box marke ON box. The A6 Led faintly flickers and the A0 does not light up. I started preparing and studying as Junebug roughly two months ago. I have every line of the Posts that you mentioned in the Microcontroller section. Lot's of good stuff to be found there. When I download the PICIT2 Operation System to the PICIT2 software the Junebug does react as if it very much working. When I install a program definitely reacts as if connecting well. As yet, no program will cause the LEDs to work nor did a PWM program cause a Mini Servo to operate.
 
Yes, I did place the Check on the Box that was marked ON. The A0 LED does not come on. The 3rd LED from the left flickers faintly. I have been at this for more than two months and have read every line in the POSTS that you mention. (very good resource). The Junebug is responding when a program is being written to it. It very frustating that a simple program like the one MrDeb sent won't work on the Junebug. I am willing and open to doing anything to get an LED or LED's to flash to PWM stuff. The help that I been receiving is very much appreciated.
 
Could you try Swordfish BASIC SE and the command line PK2CMD.EXE software as described in the back of your Junebug manual. This releases the reset line after programming automatically.

There is also a troubleshooting mode available in the PICKIT2 windows software to test VPP levels.
 
Last edited:
Yes, I will do just that. I have not used Swordfish before but should be interesting...and will let you know. Thank you.
 
Status
Not open for further replies.

Latest threads

Back
Top