Program Loading Problem of a PIC877A

LINIX Brushless, VEXTA Brushless, RC Servo, DC Geared, Linear, Stepper, Tamiya.....

Re: Program Loading Problem of a PIC877A

Postby Ali » Mon Jan 09, 2012 2:38 pm

ABSF WROTE:I have never programmed my PIC via MPLAB. I always assemble my program in MPLAB, than take the HEX file and load it into the Pickit2 program and burn my code from the pickit2 program using ICSP. My hardware is about the same as yours.

So, just now I startup my MPLAB and hooked up my UIC00B to the USB, the green LED came out. Then I go to MPLAB and select "PROGRAMMER>select programmer>9. PICKIT2", the the orange LED came out and I get the same message as yours. Then I plugged in my target board and switched on the power for my target and I do the selection again, but the orange LED still not going away.

Then I do "PROGRAMMER>select programmer>None" and then "PROGRAMMER>select programmer>9. PICKIT2" again. Then the orange LED went away and the Red LED came out for 1/2 second. The voltage from my target is being detected again.

You can try and see if it work for you.

Allen

Thank you very much. I did before too same like you did just now and again I did same as yours but once the red LED goes off after 1/2 the ornage LED still there and shows the following message:

Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
PICkit 2 Unit ID = UIC00B V1.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready
Did you get the same message where it said that powering from PICkit2. The PIC is also getting hot after few minutes.
how to fix this problem-Target power not detected - Powering from PICkit 2 ( 5.00V)

Thanks again.
Ali
Newbie
 
Posts: 14
Joined: Fri Jan 06, 2012 10:02 am

Re: Program Loading Problem of a PIC877A

Postby ABSF » Mon Jan 09, 2012 2:56 pm

If the PIC gets hot it is not normal. You have to switch it off immediately. I know there is a batch of SK40C made during the crazy sale on Nov 2010 was having problems. The SMD 7805 was bad and will destroy the PIC. When did you buy your SK40C? Did you check that the 7805 is OK? :roll:

Sorry I am busy now and will came back to you to-night :|

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Program Loading Problem of a PIC877A

Postby Ali » Mon Jan 09, 2012 3:53 pm

ABSF WROTE:If the PIC gets hot it is not normal. You have to switch it off immediately. I know there is a batch of SK40C made during the crazy sale on Nov 2010 was having problems. The SMD 7805 was bad and will destroy the PIC. When did you buy your SK40C? Did you check that the 7805 is OK? :roll:

Sorry I am busy now and will came back to you to-night :|

Allen

I just bought this packge last week and I did not check it. How to check 7805 is ok or not?
Thank you very much. :)
Ali
Newbie
 
Posts: 14
Joined: Fri Jan 06, 2012 10:02 am

Re: Program Loading Problem of a PIC877A

Postby ABSF » Mon Jan 09, 2012 8:55 pm

Ali WROTE:I just bought this packge last week and I did not check it. How to check 7805 is ok or not?
Thank you very much.


Since you just bought it, the SK40C should be OK as cytron already solved the problem on the beginning of last year.

Frankly speaking, I am puzzled now how UIC00B detect the target Vdd. Pin 8 of the 10-pin-IDC is not connected to +5V in SK40c and SK18B. But I can program my 16F628A without any problem and I just tried with SK40C and there was also no problem. The project board that I did myself has the Vdd pin 8 connected to 5V and it also works without any problem. :(

I suspect there is something wrong with your UIC00B or the SK40C/PIC. Do you have any friend with the same hardware to confirm? :?

An alternative way is to program your PIC using the standalone software PIcKit2 V2.61. You can download the software in the Cytron UIC00B site. The software is called "UIC00B Setup - PICKit2 V2.61". Try to install it on your PC and use it to program your PIC. You dont need to change the hardware connection. Just configure the programmer>select programer > None. The usage of the program is described in the UIC00B user manual.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Program Loading Problem of a PIC877A

Postby Ali » Tue Jan 10, 2012 7:31 am

ABSF WROTE:
Ali WROTE:I just bought this packge last week and I did not check it. How to check 7805 is ok or not?
Thank you very much.


Since you just bought it, the SK40C should be OK as cytron already solved the problem on the beginning of last year.

Frankly speaking, I am puzzled now how UIC00B detect the target Vdd. Pin 8 of the 10-pin-IDC is not connected to +5V in SK40c and SK18B. But I can program my 16F628A without any problem and I just tried with SK40C and there was also no problem. The project board that I did myself has the Vdd pin 8 connected to 5V and it also works without any problem. :(

I suspect there is something wrong with your UIC00B or the SK40C/PIC. Do you have any friend with the same hardware to confirm? :?

An alternative way is to program your PIC using the standalone software PIcKit2 V2.61. You can download the software in the Cytron UIC00B site. The software is called "UIC00B Setup - PICKit2 V2.61". Try to install it on your PC and use it to program your PIC. You dont need to change the hardware connection. Just configure the programmer>select programer > None. The usage of the program is described in the UIC00B user manual.

Allen

Thanks again for your long response. I dont know any friend who is using same hardware around me.
I will try another way as you have suggested.
Thank you very much.
Ali
Newbie
 
Posts: 14
Joined: Fri Jan 06, 2012 10:02 am

Re: Program Loading Problem of a PIC877A

Postby Ali » Tue Jan 10, 2012 6:53 pm

Ali WROTE:
ABSF WROTE:
Ali WROTE:I just bought this packge last week and I did not check it. How to check 7805 is ok or not?
Thank you very much.


Since you just bought it, the SK40C should be OK as cytron already solved the problem on the beginning of last year.

Frankly speaking, I am puzzled now how UIC00B detect the target Vdd. Pin 8 of the 10-pin-IDC is not connected to +5V in SK40c and SK18B. But I can program my 16F628A without any problem and I just tried with SK40C and there was also no problem. The project board that I did myself has the Vdd pin 8 connected to 5V and it also works without any problem. :(

I suspect there is something wrong with your UIC00B or the SK40C/PIC. Do you have any friend with the same hardware to confirm? :?

An alternative way is to program your PIC using the standalone software PIcKit2 V2.61. You can download the software in the Cytron UIC00B site. The software is called "UIC00B Setup - PICKit2 V2.61". Try to install it on your PC and use it to program your PIC. You dont need to change the hardware connection. Just configure the programmer>select programer > None. The usage of the program is described in the UIC00B user manual.

Allen

Thanks again for your long response. I dont know any friend who is using same hardware around me.
I will try another way as you have suggested.
Thank you very much.

I got the follwoing error running in Pickit2.Do you have an idea why it happens?Please kindly check the screen shot below.
Thanks.
Attachments
screen shot.png
Ali
Newbie
 
Posts: 14
Joined: Fri Jan 06, 2012 10:02 am

Re: Program Loading Problem of a PIC877A

Postby ABSF » Tue Jan 10, 2012 7:11 pm

Most probably your 16F877A is saying bye-bye. :?

The message is saying that the programming stops at the first address of your PIC. Which means the first word is having problem going into your PIC. :| Do you have any spare PIC to change? The target Vdd seems OK! Which LEDs are lighted?


Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Program Loading Problem of a PIC877A

Postby Ali » Tue Jan 10, 2012 8:02 pm

ABSF WROTE:Most probably your 16F877A is saying bye-bye. :?

The message is saying that the programming stops at the first address of your PIC. Which means the first word is having problem going into your PIC. :| Do you have any spare PIC to change? The target Vdd seems OK! Which LEDs are lighted?


Allen

I dont have spare PIC ... :(
Actually when I click read first and then click right program then it downloads successfully and during writing program the red,yellow and the LED1 and LED2 also blinked as I was just testing LED blinking code. Seem no problem in PIC yet.Can you kindly check the code below for blinking led with PIC877A.
// include
//==========================================================================
#include <pic.h>

//configuration
//==========================================================================
__CONFIG ( 0x3F32 ); //configuration for the microcontroller

// define
//==========================================================================
#define rs RB4 //RS pin of the LCD display
#define e RB5 //E pin of the LCD display

#define lcd_data PORTD //LCD 8-bit data PORT

#define SW1 RB0
#define SW2 RB1

#define LED1 RB6
#define LED2 RB7

// function prototype (every function must have a function prototype)
//==========================================================================
void delay(unsigned long data);
void send_config(unsigned char data);
void send_char(unsigned char data);
void lcd_goto(unsigned char data);
void lcd_clr(void);
void send_string(const char *s);
void uart_send(unsigned char data);



// global variable
//==========================================================================

// main function (main fucntion of the program)
//==========================================================================
void main()
{
unsigned long delay_time=5000;

//set I/O input output
TRISB = 0b00000011; //configure PORTB I/O direction
TRISD = 0b00000000; //configure PORTD I/O direction
TRISA = 0b00000111; //configure PORTA I/O direction

//setup ADC
ADCON1 = 0b00000110; //set ADx pin digital I/O

//configure lcd
send_config(0b00000001); //clear display at lcd
send_config(0b00000010); //lcd return to home
send_config(0b00000110); //entry mode-cursor increase 1
send_config(0b00001100); //display on, cursor off and cursor blink off
send_config(0b00111000); //function set

//display startup message
lcd_clr(); //clear lcd
lcd_goto(2); //set the lcd cursor to location 0
send_string("Cytron Tech."); //display "Cytron Tech."
lcd_goto(26); //set the lcd cursor to location 20
send_string("SK40C"); //display "SK40C"

LED1=0; //OFF LED1
LED2=0; //OFF LED2

while(1) //Infinite loop
{
if(!SW1) //check if SW1 is pressed
{
while (!SW1); //wait SW1 pressed
{
delay_time+=1000; //delay
}
}
else if(!SW2) //check if SW2 is pressed
{
while (!SW2); //wait SW2 pressed
{
delay_time-=1000; //delay
}
}

LED1^ = 1; //toggle LED1
delay(delay_time);
LED2^ = 1; //toggle LED2
delay(delay_time);
}
}

// functions
//==========================================================================
void delay(unsigned long data) //delay function, the delay time
{ //depend on the given value
for( ;data>0;data--);
}

void send_config(unsigned char data) //send lcd configuration
{
rs=0; //set lcd to configuration mode
lcd_data=data; //lcd data port = data
e=1; //pulse e to confirm the data
delay(50);
e=0;
delay(50);
}

void send_char(unsigned char data) //send lcd character
{
rs=1; //set lcd to display mode
lcd_data=data; //lcd data port = data
e=1; //pulse e to confirm the data
delay(10);
e=0;
delay(10);
}

void lcd_goto(unsigned char data) //set the location of the lcd cursor
{ //if the given value is (0-15) the
if(data<16) //cursor will be at the upper line
{ //if the given value is (20-35) the
send_config(0x80+data); //cursor will be at the lower line
} //location of the lcd cursor(2X16):
else // -----------------------------------------------------
{ // | |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15| |
data=data-20; // | |20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35| |
send_config(0xc0+data); // -----------------------------------------------------
}
}

void lcd_clr(void) //clear the lcd
{
send_config(0x01);
delay(600);
}

void send_string(const char *s) //send a string to display in the lcd
{
while (s && *s)send_char (*s++);
}

void uart_send(unsigned char data)
{
while(TXIF==0); //only send the new data after
TXREG=data; //the previous data finish sent
}


The above code is from your website with SK40C kit.
Thank you very much.
Ali
Newbie
 
Posts: 14
Joined: Fri Jan 06, 2012 10:02 am

Re: Program Loading Problem of a PIC877A

Postby ABSF » Tue Jan 10, 2012 9:47 pm

Can you kindly check the code below for blinking led with PIC877A.


The code for the LED blinking is OK and it works in my SK40C. But I didnt test the LCD & UART parts.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Program Loading Problem of a PIC877A

Postby Ali » Wed Jan 11, 2012 6:35 pm

ABSF WROTE:
Can you kindly check the code below for blinking led with PIC877A.


The code for the LED blinking is OK and it works in my SK40C. But I didnt test the LCD & UART parts.

Allen

Hello,
I just noticed that the IC (09R7 L539) infront of the PIC is getting very hot in 2/3 seconds.Its like going to burn.I think the problem with the SK40C itself.
What should I do now?I just bought last week. :( :( :(
Ali
Newbie
 
Posts: 14
Joined: Fri Jan 06, 2012 10:02 am

PreviousNext

Return to DC Motor

Who is online

Users browsing this forum: No registered users and 7 guests

cron