Hi Tech C de PCL mantığı nasıl olur?

Başlatan XX_CİHAN_XX, 26 Ağustos 2009, 15:35:55

M_B

Merhaba XX_Cihan_XX hocam sizin burdaki bilginize gore soyle bir deneme yapmak istedim ve aşağıdaki kodu pic16f877 ye sıgdıramadım
şu şekilde hata alıyorum:
Warning[000] C:\PROJE\C\FORD\12F675\Nokia18FBis\Nokia18FBis\Main.c 136 : unused variable definition: b (from line 59)
Error[000] C:\PROJE\C\FORD\12F675\Nokia18FBis\Nokia18FBis\Main.c 12 : ORG argument must be a positive constant


#pragma psect strings=TABLE1 
#asm 
       psect TABLE1,ovrld,abs,delta=2 
       org (_ROMSIZE - 3000 )             //Rom dan 3000 satır geriye gel 
#endasm


Yoksa burda farklı bır ayar daha mı yapmak lazım.

Teşekkürler
Mehmet

#include <pic.h>
#include "delay.h"
#include "Nokia_LCD.h"

// Configuration 16Fxxx
 __CONFIG(HS & WDTDIS & PWRTEN & UNPROTECT & BORDIS & LVPDIS);


#pragma psect strings=TABLE1 
#asm 
       psect TABLE1,ovrld,abs,delta=2 
       org (_ROMSIZE - 3000 )             //Rom dan 3000 satır geriye gel 
#endasm 

       

volatile const char TABLE1 [504] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF8,0xFC,0xFC,0xFE,0xFE,0xFF,
0xFF,0xFF,0xFF,0xFF,0x25,0x24,0x25,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFE,
0xFC,0xF8,0xF8,0xF0,0xE0,0x00,0x00,0x00,0xFF,0x01,0x01,0x01,0x01,0x02,0x04,0xF8,
0x80,0x70,0x8C,0x83,0x81,0x83,0x8C,0x70,0x80,0x00,0xFF,0x41,0x41,0x41,0x41,0xA2,
0x1C,0x00,0x01,0x01,0x01,0x01,0xFF,0x01,0x01,0x01,0xFF,0x20,0x20,0x20,0x20,0x20,
0x20,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x89,0x89,0x8F,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x78,0x00,0x07,0x04,0x04,0x04,
0x04,0x02,0x01,0x06,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x07,0x00,
0x00,0x00,0x00,0x00,0x03,0x04,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00,
0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,
0xBF,0xFF,0xDF,0xFF,0xFF,0x6F,0x6F,0x67,0x67,0x6F,0x6F,0xFF,0x62,0x22,0x22,0x1A,
0x67,0x77,0x7B,0x7B,0x7B,0x7B,0x7B,0xFB,0xFF,0xF7,0xE7,0xFF,0xFF,0xFF,0xE0,0xCF,
0x30,0xC0,0x00,0x00,0x80,0x60,0x18,0x86,0x71,0x4C,0x43,0x41,0x43,0x4C,0x70,0x80,
0x00,0xFF,0x01,0x01,0x01,0x01,0x02,0x02,0xFC,0x00,0xFF,0x21,0x21,0x21,0x21,0x21,
0x21,0x21,0x00,0xFF,0x21,0x21,0x21,0x61,0xA1,0x12,0x0C,0x00,0x00,0x00,0x00,0x40,
0xF8,0xFB,0xFF,0xFF,0xFF,0x87,0xC1,0xC0,0x00,0x00,0x00,0x40,0x40,0x40,0xC0,0xC0,
0xFC,0x00,0x00,0x30,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xC1,0xC3,0xFF,
0xFF,0xFF,0xFF,0xFF,0xEE,0xE0,0x83,0x07,0x01,0x00,0x06,0x01,0x80,0xC0,0x60,0x20,
0x20,0x10,0x10,0x11,0x16,0x17,0x14,0x14,0x24,0x24,0x22,0x21,0x20,0x20,0x27,0x64,
0x44,0xC4,0x84,0x04,0x04,0x04,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x00,
0x00,0x00,0xE0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0x7F,0xBF,0xEF,0xE2,0xE2,0xE2,0xF2,0xCF,0x9F,0x9F,0x1F,0x3F,0x7F,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xF0,0xC0,0x00,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x0F,0x0F,0x07,0xC2,0x60,0x20,0x30,0x10,
0x10,0x08,0x08,0x0C,0x04,0x66,0xF3,0xF0,0xE0,0x00,0x00,0x00,0x00,0x00,0x80,0x40,
0x60,0x30,0x18,0x00,0x18,0x1F,0x1F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x5F,0x4F,0x4F,0x39,0x2E,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x0F,0x0F,
0x0F,0x0C,0x38,0x07,0x27,0x1F,0x1F,0x1F,0x1F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07,
0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
0x04,0x0C,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0C,0x04,0x04,0x02,
0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00
};




// Programme Principal
void main(void)
{
    unsigned int a;
	unsigned int b;

	nok_res = 1;
	nok_sclk = 1;
	nok_sda = 1;
	nok_dc = 1;
	nok_cs = 1;

	TRISA=0xFF;
	TRISB=0x00;
	TRISC=0x00;

	nok_res = 0;
	DelayMs(2);
	nok_res = 1;

   	Lcd_init();             							// Initialisation du LCD
   	LCD_clean_ddram();    								// Effacer l'ecran

  LCD_gotoxy(0,0);      							    // Se placer en 0,0
   for (a=0;a<=503;a++)
	{
	LCD_write_data(TABLE1[a]);
	} 													// Affiche le bitmap
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente

   LCD_clean_ddram();                   				// Effacer l'ecran

   ecran_noir();										// Norci l'ecran
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente

   //LCD_clean_ddram();                   				// Effacer l'ecran

   LCD_gotoxy(0,0);                     				// Se placer en 0,0
   LCD_printstr("**************",2);  					// Ecrire
   LCD_printstr("* DarthVader *",2);  					// Ecrire
   LCD_printstr("* Nokia 3310 *",2);  					// Ecrire
   LCD_printstr("*  LCD TEST  *",2);  					// Ecrire
   LCD_printstr("* MERCI SEB  *",2);  					// Ecrire
   LCD_printstr("**************",2);  					// Ecrire
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente
   DelayMs(255);                                     	// Attente

   a = 0x0C;
   while (1) {
      switch (a) {
         case 0x0c:
            LCD_write_command(0x0D);					// Mode Normal
            a=0x0D;
            DelayMs(255);
            DelayMs(255);
            DelayMs(255);
            DelayMs(255);
			nok_sclk = 1;
            break;
         case 0x0D:
            LCD_write_command(0x0C);					// Video Inversé
            a=0x0C;
            DelayMs(255);
            DelayMs(255);
            DelayMs(255);
            DelayMs(255);
			nok_sclk = 0;
            break;
      }
   } 
}


kodun alındıgı site:
http://sjeffroy.free.fr/new/index.php?option=com_content&task=view&id=18&Itemid=49
İmkanın sınırlarını görmek için imkansızı denemek lazım.                                                             Fatih Sultan Mehmet

XX_CİHAN_XX

Bu kodları programının başına değil en sonuna ekleyerek derlemeyi dene.

#pragma psect strings=TABLE1 
#asm 
       psect TABLE1,ovrld,abs,delta=2 
       org (_ROMSIZE - 3000 )             //Rom dan 3000 satır geriye gel 
#endasm 

        

volatile const char TABLE1 [504] = { 
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF8,0xFC,0xFC,0xFE,0xFE,0xFF, 
0xFF,0xFF,0xFF,0xFF,0x25,0x24,0x25,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFE, 
0xFC,0xF8,0xF8,0xF0,0xE0,0x00,0x00,0x00,0xFF,0x01,0x01,0x01,0x01,0x02,0x04,0xF8, 
0x80,0x70,0x8C,0x83,0x81,0x83,0x8C,0x70,0x80,0x00,0xFF,0x41,0x41,0x41,0x41,0xA2, 
0x1C,0x00,0x01,0x01,0x01,0x01,0xFF,0x01,0x01,0x01,0xFF,0x20,0x20,0x20,0x20,0x20, 
0x20,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF, 
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x89,0x89,0x8F,0xFF,0xFF,0xFF,0xFF, 
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x78,0x00,0x07,0x04,0x04,0x04, 
0x04,0x02,0x01,0x06,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x07,0x00, 
0x00,0x00,0x00,0x00,0x03,0x04,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x00, 
0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF, 
0xBF,0xFF,0xDF,0xFF,0xFF,0x6F,0x6F,0x67,0x67,0x6F,0x6F,0xFF,0x62,0x22,0x22,0x1A, 
0x67,0x77,0x7B,0x7B,0x7B,0x7B,0x7B,0xFB,0xFF,0xF7,0xE7,0xFF,0xFF,0xFF,0xE0,0xCF, 
0x30,0xC0,0x00,0x00,0x80,0x60,0x18,0x86,0x71,0x4C,0x43,0x41,0x43,0x4C,0x70,0x80, 
0x00,0xFF,0x01,0x01,0x01,0x01,0x02,0x02,0xFC,0x00,0xFF,0x21,0x21,0x21,0x21,0x21, 
0x21,0x21,0x00,0xFF,0x21,0x21,0x21,0x61,0xA1,0x12,0x0C,0x00,0x00,0x00,0x00,0x40, 
0xF8,0xFB,0xFF,0xFF,0xFF,0x87,0xC1,0xC0,0x00,0x00,0x00,0x40,0x40,0x40,0xC0,0xC0, 
0xFC,0x00,0x00,0x30,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xC1,0xC3,0xFF, 
0xFF,0xFF,0xFF,0xFF,0xEE,0xE0,0x83,0x07,0x01,0x00,0x06,0x01,0x80,0xC0,0x60,0x20, 
0x20,0x10,0x10,0x11,0x16,0x17,0x14,0x14,0x24,0x24,0x22,0x21,0x20,0x20,0x27,0x64, 
0x44,0xC4,0x84,0x04,0x04,0x04,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x00, 
0x00,0x00,0xE0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 
0xFF,0x7F,0xBF,0xEF,0xE2,0xE2,0xE2,0xF2,0xCF,0x9F,0x9F,0x1F,0x3F,0x7F,0xFF,0xFF, 
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xF0,0xC0,0x00, 
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x0F,0x0F,0x07,0xC2,0x60,0x20,0x30,0x10, 
0x10,0x08,0x08,0x0C,0x04,0x66,0xF3,0xF0,0xE0,0x00,0x00,0x00,0x00,0x00,0x80,0x40, 
0x60,0x30,0x18,0x00,0x18,0x1F,0x1F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, 
0x3F,0x5F,0x4F,0x4F,0x39,0x2E,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x0F,0x0F, 
0x0F,0x0C,0x38,0x07,0x27,0x1F,0x1F,0x1F,0x1F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07, 
0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, 
0x04,0x0C,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0C,0x04,0x04,0x02, 
0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00 
};
Yirmi yaşındaki bir insan, dünyayı değiştirmek ister . Yetmiş yaşına gelince , yine dünyayı değiştirmek ister, ama yapamayacağını bilir.