PIC16F877A

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

PIC16F877A

Postby Xdot2 » Fri Apr 12, 2013 6:39 pm

i have sure the pin assignment is according to the source code of PIC16F876A..but i can't programmed it on pic16877a..how should i do or make an adjustment to that source code to program it on my pic.
Xdot2
Freshie
 
Posts: 6
Joined: Wed Apr 10, 2013 1:48 pm

Re: PIC16F877A

Postby shahrul » Fri Apr 12, 2013 7:01 pm

Print screen your MPLab.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: PIC16F877A

Postby robosang » Sat Apr 13, 2013 7:53 am

Yup, printscreen what you get from the programmer or MPLAB IDE.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: PIC16F877A

Postby Xdot2 » Sat Apr 13, 2013 9:24 am

from the source code PR18

this is for SC16A coding
#define L1 0x4A //servo S10
#define L2 0x4B //servo S11
#define L3 0x4C //servo S12
#define R1 0x47 //servo S7
#define R2 0x48 //servo S8
#define R3 0x49 //servo S9

I try convert the program to SC08A
#define L1 0x44 //servo S4
#define L2 0x45 //servo S5
#define L3 0x46 //servo S6
#define R1 0x41 //servo S1
#define R2 0x42 //servo S2
#define R3 0x43 //servo S3[/code]


This is what I has been change on the program.. Isn't right??
Xdot2
Freshie
 
Posts: 6
Joined: Wed Apr 10, 2013 1:48 pm

Re: PIC16F877A

Postby Xdot2 » Sat Apr 13, 2013 9:37 am

then One more thing is I have been change the mode on the program.. I try to change only one mode to play. there is no sw1 sw2 and sw3.. and only call for one program to play... this is how I call the subprogram.. so this is the code that I was made how to call it.. pls help me to check either it is true or not..

send_cmd(L1, mid_L1, 0); //set left leg to mid position
...............................
................................. //set right leg to mid position

delay(200000); //delay for certain period
}
{

while(1)
{
forward();
}
}

// functions
//=============
void forward(void)
{
//shift body weight to left leg

while(1)
{
{
//right leg moved forward..................
........
}
}
Xdot2
Freshie
 
Posts: 6
Joined: Wed Apr 10, 2013 1:48 pm

Re: PIC16F877A

Postby yonghui » Sat Apr 13, 2013 10:55 am

cant program or cant compile? if code problem then cant compile.
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: PIC16F877A

Postby Xdot2 » Sat Apr 13, 2013 5:08 pm

no problem for compile.. everything is OK when compile the program.. but the problem is I can't move the robot.
Xdot2
Freshie
 
Posts: 6
Joined: Wed Apr 10, 2013 1:48 pm

Re: PIC16F877A

Postby robosang » Sat Apr 13, 2013 6:41 pm

Please, write your problem clearly, you confuse people and no one can help you.

Have you check whether the SC16 protocol same as SC08?
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: PIC16F877A

Postby Xdot2 » Fri May 24, 2013 12:58 am

All the protocol has been change.. now everything has been made.. and the robot work as we need.. TQ very much.. :D :D :D
Xdot2
Freshie
 
Posts: 6
Joined: Wed Apr 10, 2013 1:48 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 33 guests