View Single Post
Old 09-01-2012, 01:30 PM   #9
dung565
Nhập môn đệ tử
 
Tham gia ngày: Jan 2012
Bài gửi: 2
:
Unhappy tạo file hex mới bị lỗi core xin a e xem lại dùm

doạn core của mình như này


/////////////////////////// Nguyen Thanh Tuan //////////////////////////////
/////////////////////////// TU LAP Mobile //////////////////////////////
/////////////////////////// 82/6, duong 26/3, p.Binh Hung Hoa, q.Binh Tan, Tp.HCM //////////////////////////////
/////////////////////////// 0946 357 994 - 0946 357 995 //////////////////////////////
#include "D:\thanhtuan o D\main.h"
#define GP0 PIN_A0
#define GP1 PIN_A1
#define GP2 PIN_A2
#define GP3 PIN_A3
#define GP4 PIN_A4
#define GP5 PIN_A5
void main()
{
int a,t;
while (1)
{
a=0;
while (a<12) // xoay xuoi
{
a++;
output_low (GP5);
output_high (GP0);
delay_ms (80);
output_low (GP0);
output_high (GP1);
delay_ms (80);
output_low (GP1);
output_high (GP2);
delay_ms (80);
output_low (GP2);
output_high (GP4);
delay_ms (80);
output_low (GP4);
output_high (GP5);
delay_ms (80);
}
a=0;
while (a<12) // xoay nguoc
{
a++;
output_low (GP0);
output_high (GP5);
delay_ms (80);
output_low (GP5);
output_high (GP4);
delay_ms (80);
output_low (GP4);
output_high (GP2);
delay_ms (80);
output_low (GP2);
output_high (GP1);
delay_ms (80);
output_low (GP1);
output_high (GP0);
delay_ms (80);
}
t=200;
while (t>20) // ra vao nhanh dan
{
t=t-20;
output_high (GP2);
delay_ms (t);
output_low (GP2);
output_high (GP1);
output_high (GP4);
delay_ms (t);
output_low (GP1);
output_low (GP4);
output_high (GP0);
output_high (GP5);
delay_ms (t);
output_low (GP0);
output_low (GP5);
delay_ms (t);
output_high (GP0);
output_high (GP5);
delay_ms (t);
output_low (GP0);
output_low (GP5);
delay_ms (t);
output_high (GP0);
output_high (GP5);
delay_ms (t);
output_low (GP0);
output_low (GP5);
delay_ms (t);
output_high (GP1);
output_high (GP4);
delay_ms (t);
output_low (GP1);
output_low (GP4);
output_high (GP2);
delay_ms (t);
output_low (GP2);
}
a=0;
while (a<10) // ngoai vao
{
a++;
output_high (GP0);
output_high (GP5);
delay_ms (100);
output_high (GP1);
output_high (GP4);
delay_ms (100);
output_high (GP2);
delay_ms (100);
output_low (GP0);
output_low (GP5);
delay_ms (100);
output_low (GP1);
output_low (GP4);
delay_ms (100);
output_low (GP2);
delay_ms (100);
}
t=400;
while (t>4) // xoay tron nhanh dan
{
t=t-4;
output_high (GP5);
delay_ms (t);
output_low (GP5);
output_high (GP4);
delay_ms (t);
output_low (GP4);
output_high (GP2);
delay_ms (t);
output_low (GP2);
output_high (GP1);
delay_ms (t);
output_low (GP1);
output_high (GP0);
delay_ms (t);
output_low (GP0);
}
a=0;
while (a<10) // chop cheo 1
{
a++;
output_low (GP4);
output_high (GP0);
delay_ms (140);
output_low (GP0);
output_high (GP4);
delay_ms (140);
}
a=0;
while (a<10) // chop cheo 2
{
a++;
output_low (GP1);
output_high (GP0);
delay_ms (140);
output_low (GP0);
output_high (GP4);
delay_ms (140);
output_low (GP4);
output_high (GP5);
delay_ms (140);
output_low (GP5);
output_high (GP1);
delay_ms (140);
}
t=120;
while (t>10) // xuong len nhanh dan
{
t=t-10;
output_high (GP0);
delay_ms (t);
output_low (GP0);
output_high (GP1);
delay_ms (t);
output_low (GP1);
output_high (GP2);
delay_ms (t);
output_low (GP2);
output_high (GP4);
delay_ms (t);
output_low (GP4);
output_high (GP5);
delay_ms (t);
output_low (GP5);
output_high (GP4);
delay_ms (t);
output_low (GP4);
output_high (GP2);
delay_ms (t);
output_low (GP2);
output_high (GP1);
delay_ms (t);
output_low (GP1);
}
a=0;
while (a<20) // 0 5 qua lai
{
a++;
output_high (GP0);
delay_ms (180);
output_high (GP2);
output_low (GP0);
delay_ms (30);
output_high (GP4);
output_low (GP2);
delay_ms (30);
output_high (GP5);
output_low (GP4);
delay_ms (200);
output_high (GP1);
output_low (GP5);
delay_ms (100);
output_low (GP1);
}
t=400;
while (t>10) // chop tat all nhanh dan
{
t=t-10;
output_high (GP0);
output_high (GP1);
output_high (GP2);
output_high (GP4);
output_high (GP5);
delay_ms (t);
output_low (GP0);
output_low (GP1);
output_low (GP2);
output_low (GP4);
output_low (GP5);
delay_ms (t);
}
t=120;
while (t>10) // sang & xoay tron
{
t=t-5;
output_high (GP0);
delay_ms (t);
output_high (GP1);
delay_ms (t);
output_high (GP2);
delay_ms (t);
output_high (GP4);
delay_ms (t);
output_high (GP5);
delay_ms (t);
output_low (GP5);
delay_ms (t);
output_low (GP4);
delay_ms (t);
output_low (GP2);
delay_ms (t);
output_low (GP1);
delay_ms (t);
output_low (GP0);
delay_ms (t);
}
a=0;
while (a<20) // xoay dong tung nac
{
a++;
output_high (GP0);
delay_ms (250);
output_high (GP1);
output_low (GP0);
delay_ms (40);
output_high (GP2);
output_low (GP1);
delay_ms (40);
output_high (GP4);
output_low (GP2);
delay_ms (40);
output_high (GP5);
output_low (GP4);
delay_ms (40);
output_low (GP5);
output_high (GP0);
delay_ms (40);
output_high (GP1);
output_low (GP0);
delay_ms (40);
output_high (GP2);
output_low (GP1);
delay_ms (40);
output_high (GP4);
output_low (GP2);
delay_ms (40);
output_high (GP5);
output_low (GP4);
delay_ms (40);
output_low (GP5);
}
t=120;
while (t>10) // len xuong 1 bong nhanh dan
{
t=t-5;
output_high (GP0);
delay_ms (t);
output_high (GP1);
output_low (GP0);
delay_ms (t);
output_low (GP1);
output_high (GP2);
delay_ms (t);
output_low (GP2);
output_high (GP4);
delay_ms (t);
output_low (GP4);
output_high (GP5);
delay_ms (t);
output_low (GP5);
output_high (GP4);
delay_ms (t);
output_low (GP4);
output_high (GP2);
delay_ms (t);
output_low (GP2);
delay_ms (t);
output_high (GP1);
delay_ms (t);
output_low (GP4);
output_high (GP0);
delay_ms (t);
}
}
}

chạy nữa chừng tối đây thằng ccs nó đứng im lun rồi nó báo lỗi này nè hix

http://nh8.upanh.com/b6.s1.d5/77710c...813158.loi.bmp

em không biết up hình như thế nào đây là lần đầu bị trở ngại này xin pro chỉ giáo e mới vào nghề hix
nếu pro nào biết cách khắc phục dc dùm em đoạn core này e xin tặn cho pro đó 1 bộ vỏ sườn trong xuốt + ic led cho 1202 lun ( sdt e nè 01217951886 ) sms e goi lai liền
dung565 vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn