#include "C:\Documents and Settings\user\Desktop\hakan\main.h"
void main()
{
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1););
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
//Setup_Oscillator parameter not selected from Intr Oscillotar Config tab
// TODO: USER CODE!!
]Senın Kayan c dosyasından aldığım programı hemenaltına yapıştırıyorum..
#include "C:\Documents and Settings\xp\Desktop\projelerim\Kayan yazı Projem\yeni deneme prog\kayan.h"
/******************************************************************/
/******************************************************************/
/* DESIGN BY */
/* MEHMET YURDABAK */
/******************************************************************/
/******************************************************************/
int b,i,a; //döngüler için gerekli değişkenler
signed kayma;
int yazi_sutun,yazi1_sutun;//yazının sütün sayısı
int matris_sutun; //matris sutun
char metin[]={
0x7F,0x02,0x04,0x08,0x04,0x02,0x7F,0x00, // M
0x7F,0x49,0x49,0x49,0x49,0x49,0x49,0x00, // E
0x7F,0x08,0x08,0x08,0x08,0x08,0x7F,0x00, // H
0x7F,0x02,0x04,0x08,0x04,0x02,0x7F,0x00, // M
0x7F,0x49,0x49,0x49,0x49,0x49,0x49,0x00, // E
0x01,0x01,0x01,0x7F,0x01,0x01,0x01,0x00 // T
}; // boşluk
char metin1[]={
0x01,0x02,0x04,0x78,0x04,0x02,0x01,0x00, // Y
0x7F,0x40,0x40,0x40,0x40,0x40,0x7F,0x00, // U
0x7F,0x09,0x19,0x26,0x40,0x00 // R
0x7F,0x41,0x41,0x41,0x41,0x22,0x1C,0x00, // D
0x78,0x14,0x12,0x11,0x12,0x14,0x78,0x00, // A
0x7F,0x49,0x49,0x49,0x49,0x49,0x36,0x00, // B
0x78,0x14,0x12,0x11,0x12,0x14,0x78,0x00, // A
0X7F,0x08,0x14,0x22,0x41,0x00 // K
}; // boşluk
char kayan[16]; //kayan adında 16 elemanlı sahte dizi oluşturuldu.
void main()
{
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
//Setup_Oscillator parameter not selected from Intr Oscillotar Config tab
// TODO: USER CODE!!
yazi_sutun=48;//yazinin toplam sutun sayısı belirleniyor
yazi1_sutun=64; //diğer yazının sutun sayısı belirleniyor
matris_sutun=16;//kullanılan matrisin sutun sayısı
for(;;)// sonsuz döngü oluşturluyor
{
/******************************************************************/
/***************Birinci metin yazdırımı****************************/
/******************************************************************/
for(kayma=-16;kayma<yazi_sutun;kayma++) // sütün sayısı kadar kayma işlemi gerçekleştiriliyor.
{
for(b=0;b<matris_sutun;b++) //kayan adlı dizinin elemanlarını döngü //sayesinde buluyoruz.
{
kayan[b]=metin[kayma+b]; // kaydırma işlemi hesaplanıyor
if(kayma+b<0) // şartlar
kayan[b]=0;
if(kayma+b>yazi_sutun)
kayan[b]=0;
}
for(a=0;a<30;a++) //tarama sayısı
{
for(i=0;i<matris_sutun;i++) //bulunan değerler teker teker portlara gönderiliyor.
{
output_a(i);
output_b(kayan[i]);
delay_us(200); //kayma hızı
} //kaydırma işlemi sonu
} // portlara gönderme sonu
} //tarama sayısı sonu
/******************************************************************/
/***************İkinci metin yazdırımı****************************/
/******************************************************************/
for(kayma=-16;kayma<yazi1_sutun;kayma++) // sütün sayısı kadar kayma işlemi gerçekleştiriliyor.
{
for(b=0;b<matris_sutun;b++) //kayan adlı dizinin elemanlarını döngü //sayesinde buluyoruz.
{
kayan[b]=metin1[kayma+b]; // kaydırma işlemi hesaplanıyor
if(kayma+b<0) // şartlar
kayan[b]=0;
if(kayma+b>yazi1_sutun)
kayan[b]=0;
}
for(a=0;a<30;a++) //tarama sayısı
{
for(i=0;i<matris_sutun;i++) //bulunan değerler teker teker portlara gönderiliyor.
{
output_a(i);
output_b(kayan[i]);
delay_us(200); //kayma hızı
} //kaydırma işlemi sonu
} // portlara gönderme sonu
} //tarama sayısı sonu
} //sonsuz döngü sonu
} // ana program sonu
Compile F9 diyorum bi dünya hata veriyo..
*** Error 100 "C:\Documents and Settings\user\Desktop\hakan\main.h" Line 13(5,61): USE parameter value is out of range Not a number: PIN_C6
*** Error 51 "main.c" Line 7(44,45): A numeric expression must appear here
*** Error 18 "main.c" Line 16(11,103): File can not be opened
Not in local "C:\Documents and Settings\xp\Desktop\projelerim\Kayan yazı Projem\yeni deneme prog\kayan.h"
--- Info 300 "main.c" Line 4(6,10): More info: First Declaration of main
*** Error 31 "main.c" Line 53(1,2): Identifier is already used in this scope
*** Error 28 "main.c" Line 55(31,32): Expecting an identifier
*** Error 43 "main.c" Line 55(42,43): Expecting a declaration
*** Error 43 "main.c" Line 55(42,43): Expecting a declaration
*** Error 43 "main.c" Line 55(43,44): Expecting a declaration
*** Error 28 "main.c" Line 56(29,30): Expecting an identifier
*** Error 43 "main.c" Line 56(30,31): Expecting a declaration
*** Error 28 "main.c" Line 57(29,30): Expecting an identifier
*** Error 43 "main.c" Line 57(30,31): Expecting a declaration
*** Error 43 "main.c" Line 57(31,32): Expecting a declaration
*** Error 43 "main.c" Line 57(32,33): Expecting a declaration
*** Error 43 "main.c" Line 57(33,34): Expecting a declaration
*** Error 43 "main.c" Line 57(34,35): Expecting a declaration
*** Error 28 "main.c" Line 58(32,33): Expecting an identifier
*** Error 43 "main.c" Line 58(33,34): Expecting a declaration
*** Error 28 "main.c" Line 59(20,21): Expecting an identifier
*** Error 43 "main.c" Line 59(21,22): Expecting a declaration
*** Error 48 "main.c" Line 65(1,11): Expecting a (
*** Error 43 "main.c" Line 65(12,14): Expecting a declaration
*** Error 43 "main.c" Line 65(14,15): Expecting a declaration
*** Error 48 "main.c" Line 66(1,12): Expecting a (
*** Error 43 "main.c" Line 66(13,15): Expecting a declaration
*** Error 43 "main.c" Line 66(15,16): Expecting a declaration
*** Error 48 "main.c" Line 67(1,13): Expecting a (
*** Error 43 "main.c" Line 67(14,16): Expecting a declaration
*** Error 43 "main.c" Line 67(16,17): Expecting a declaration
*** Error 43 "main.c" Line 70(2,5): Expecting a declaration
*** Error 43 "main.c" Line 70(5,6): Expecting a declaration
*** Error 43 "main.c" Line 70(6,7): Expecting a declaration
*** Error 43 "main.c" Line 70(7,8): Expecting a declaration
*** Error 43 "main.c" Line 70(8,9): Expecting a declaration
*** Error 43 "main.c" Line 71(2,3): Expecting a declaration
*** Error 43 "main.c" Line 78(5,8): Expecting a declaration
*** Error 43 "main.c" Line 78(8,9): Expecting a declaration
*** Error 48 "main.c" Line 78(9,14): Expecting a (
*** Error 43 "main.c" Line 78(15,16): Expecting a declaration
*** Error 43 "main.c" Line 78(16,18): Expecting a declaration
*** Error 43 "main.c" Line 78(18,19): Expecting a declaration
*** Error 48 "main.c" Line 78(19,24): Expecting a (
*** Error 48 "main.c" Line 78(25,35): Expecting a (
*** Error 48 "main.c" Line 78(36,41): Expecting a (
*** Error 43 "main.c" Line 78(43,44): Expecting a declaration
*** Error 43 "main.c" Line 79(3,4): Expecting a declaration
*** Error 43 "main.c" Line 80(7,10): Expecting a declaration
*** Error 43 "main.c" Line 80(10,11): Expecting a declaration
*** Error 48 "main.c" Line 80(11,12): Expecting a (
*** Error 43 "main.c" Line 80(13,14): Expecting a declaration
*** Error 43 "main.c" Line 80(14,15): Expecting a declaration
*** Error 48 "main.c" Line 80(15,16): Expecting a (
*** Error 48 "main.c" Line 80(17,29): Expecting a (
*** Error 48 "main.c" Line 80(30,31): Expecting a (
*** Error 43 "main.c" Line 80(33,34): Expecting a declaration
*** Error 43 "main.c" Line 81(5,6): Expecting a declaration
*** Error 48 "main.c" Line 82(8,13): Expecting a (
*** Error 48 "main.c" Line 82(14,15): Expecting a (
*** Error 43 "main.c" Line 82(16,17): Expecting a declaration
*** Error 48 "main.c" Line 82(17,22): Expecting a (
*** Error 48 "main.c" Line 82(23,28): Expecting a (
*** Error 48 "main.c" Line 82(29,30): Expecting a (
*** Error 43 "main.c" Line 82(31,32): Expecting a declaration
*** Error 43 "main.c" Line 83(11,13): Expecting a declaration
*** Error 43 "main.c" Line 83(13,14): Expecting a declaration
*** Error 48 "main.c" Line 83(14,19): Expecting a (
*** Error 48 "main.c" Line 83(20,21): Expecting a (
*** Error 43 "main.c" Line 83(22,23): Expecting a declaration
*** Error 43 "main.c" Line 83(23,24): Expecting a declaration
*** Error 48 "main.c" Line 84(12,17): Expecting a (
*** Error 48 "main.c" Line 84(18,19): Expecting a (
*** Error 43 "main.c" Line 84(20,21): Expecting a declaration
*** Error 43 "main.c" Line 84(21,22): Expecting a declaration
*** Error 43 "main.c" Line 84(22,23): Expecting a declaration
*** Error 43 "main.c" Line 85(13,15): Expecting a declaration
*** Error 43 "main.c" Line 85(15,16): Expecting a declaration
*** Error 48 "main.c" Line 85(16,21): Expecting a (
*** Error 48 "main.c" Line 85(22,23): Expecting a (
*** Error 48 "main.c" Line 85(24,34): Expecting a (
*** Error 48 "main.c" Line 86(14,19): Expecting a (
*** Error 48 "main.c" Line 86(20,21): Expecting a (
*** Error 43 "main.c" Line 86(22,23): Expecting a declaration
*** Error 43 "main.c" Line 86(23,24): Expecting a declaration
*** Error 43 "main.c" Line 86(24,25): Expecting a declaration
*** Error 43 "main.c" Line 87(5,6): Expecting a declaration
*** Error 43 "main.c" Line 89(7,10): Expecting a declaration
*** Error 43 "main.c" Line 89(10,11): Expecting a declaration
*** Error 48 "main.c" Line 89(11,12): Expecting a (
*** Error 43 "main.c" Line 89(13,14): Expecting a declaration
*** Error 43 "main.c" Line 89(14,15): Expecting a declaration
*** Error 48 "main.c" Line 89(15,16): Expecting a (
*** Error 43 "main.c" Line 89(17,19): Expecting a declaration
*** Error 43 "main.c" Line 89(19,20): Expecting a declaration
*** Error 48 "main.c" Line 89(20,21): Expecting a (
*** Error 43 "main.c" Line 89(23,24): Expecting a declaration
*** Error 43 "main.c" Line 90(5,6): Expecting a declaration
*** Error 43 "main.c" Line 91(9,12): Expecting a declaration
*** Error 43 "main.c" Line 91(12,13): Expecting a declaration
*** Error 48 "main.c" Line 91(13,14): Expecting a (
*** Error 43 "main.c" Line 91(15,16): Expecting a declaration