Ynt: 18F8720 isis'te stack underflow HATASI nedir?

Başlatan mustafa_cmbz, 21 Eylül 2012, 18:00:38

mustafa_cmbz

merhabalar

isiste 128x64 glcd ve 18f8720 ile ufak bir devre kurdum .bmp uzantılı resimleri dönüştürüp ekrana basıyorum fakat isis devamlı stack underflow hatası vermekte..

neyden kaynaklanıyor olabilir?

eve gidinde resimleri yükleyeceğim..!

mesaj birleştirme:: 21 Eylül 2012, 19:48:13

isisin ekranındaki hata :




18f8720 kod:

INCLUDE "PROTON_G4.INT" ' Use a 4MHz XTAL

 
DIM  Xpos    AS BYTE	'Xpos BİLGİSİ 0....127
DIM  Ypos    AS BYTE	'Ypos BİLGİSİ 0....63
DIM  Addr    AS WORD     'EPROM ADRES BİLGİSİ
DIM  char    AS BYTE     'FONT KARAKTER BİLGİSİ

DIM VAR2 AS WORD
DIM VAR1 AS WORD
 
GOTO  START

 BASLA:
 CLS 
 DELAYMS 500
 
 PRINT AT 1,3,"TEKDAG_ELEKTRONiK"
 PRINT AT 3,2,"tekdag-elektronik@"
 PRINT AT 4,3,"   gmail.com"
 PRINT AT 6,4,"Mustafa CAMBAZ" 
 DELAYMS 5000
 CLS 
 DELAYMS 300 
 PRINT AT 2,4,"RUZGAR GULU "
 PRINT AT 5,4,"PROJESi"
 DELAYMS 5000
 CLS 
 DELAYMS 300 
 PRINT AT 1,1,
 PRINT AT 5,2,"%0" 
 PRINT AT 5,16,"%100" 
 PRINT AT 2,4," SYSTEM"
 PRINT AT 3,4," loading..."

 FOR Xpos = 30 TO 90                  ' Create a loop of 128 
 LCDWRITE 5, Xpos, [%1010111]       ' Write to the LCD's top line 
 DELAYMS 10  'çubuğun süresini kısar
 NEXT
 DELAYMS 5000
 CLS
 DELAYMS 500
 
   
 GOTO SSS
 
 SSS:
 GOTO SSS
 
 





 START:
 'LCDWRITE 4,1,[$MUSTAFA]
 'LCDWRITE 5,1,"MUSTAFA CAMBAZ"
 'LCDWRITE 6,1,"MUSTAFA CAMBAZ"
 'LCDWRITE 7,1,"MUSTAFA CAMBAZ"
 
 GOTO STAR2
 
 
 STAR2:
 FOR Ypos = 0 TO 7
 FOR Xpos = 0 TO 127
              
 Addr = (Ypos*128)+Xpos
 char = CREAD AAA+Addr
 LCDWRITE Ypos,Xpos,[char]
 NEXT
 NEXT

 DELAYMS 100
 
END




INCLUDE "PROTON_G4.INT":

   
DEVICE = 18F8720
        XTAL = 4
        TRISE=0
        
		LCD_DTPORT = PORTH
		LCD_RSPIN = PORTG.2
		LCD_ENPIN = PORTG.0
		LCD_RWPIN = PORTG.1
        LCD_CS1PIN = PORTG.4
		LCD_CS2PIN = PORTG.3
        LCD_TYPE = GRAPHIC
		INTERNAL_FONT = ON
		FONT_ADDR = 0
        
	
        
        ALL_DIGITAL = True	' Set PORTA and PORTE to all digital
       


AAA İNCLUDE DOSYASI : Resmin cdata formatındaki verileri

AAA: 

    CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0C
	CDATA	$7C,$FC,$FC,$FC,$FC,$FC,$7C,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80
	CDATA	$C0,$C0,$F0,$D0,$D0,$D0,$D0,$F0,$C0,$C0,$80,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$60,$E0
	CDATA	$E0,$E0,$E0,$E0,$E0,$E0,$E0,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$40,$40,$80,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80
	CDATA	$80,$C3,$FF,$FF,$FF,$C3,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF
	CDATA	$FF,$0F,$87,$C7,$E3,$71,$39,$19,$FF,$FF,$FF,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3F
	CDATA	$FF,$FF,$FF,$FF,$FF,$EF,$E0,$E0,$60,$20,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$00,$00,$FF,$4A,$4A,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$0C,$1C,$7E,$FE,$7F,$3F,$1F,$07
	CDATA	$03,$01,$FF,$FF,$FF,$01,$03,$07,$0F,$1F,$1F,$3F,$7E,$3E,$1C,$0C
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF
	CDATA	$FF,$83,$C1,$E0,$70,$38,$1C,$1E,$FF,$FF,$FF,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$C1,$F1,$FD,$7F,$3F,$1F,$07,$01,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$80,$80,$FF,$FF,$FF,$FF,$89,$89,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$40,$40,$40,$40
	CDATA	$40,$40,$7F,$7F,$7F,$40,$40,$40,$40,$40,$40,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03
	CDATA	$0F,$1F,$1F,$1D,$1C,$1C,$1C,$1E,$0F,$07,$03,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$78,$1F
	CDATA	$07,$03,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$0F,$1F,$3F,$7F,$7F,$7F,$7F,$3F,$1F,$0F
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	CDATA	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00



sıkıntı nedir bilemedim kafam durdu yemin ediyorum...






OG

Stack taşması "GİDİP DE DÖNEMEMEK" mevzusu :)

Kodların tümü bu mu, Arasından sildin mi? Çünkü bu hali ile mantıklı bir akış yok.
FORUMU İLGİLENDİREN KONULARA ÖM İLE CEVAP VERİLMEZ.

mustafa_cmbz

https://320volt.com/proton-glcd-resim-basma-uygulamasi/

uygulama kodlarım burdan alıntıydı...tekrar kopyala yapıştır yaptım sorun çözüldü.



birde dün paylaştığım kodların sonunda inc. tanımlamaları yok bendeki kodda var...anlamadım gitti sıkıntı ya bir eksiklikten kaynaklandı gözden kaçan bir kısım yada protonun tam olmamasından kaynaklandı...bazı bazı böyle sıkıntılar yaşıyorum..


Mucit23

Program Sonunda END komutundan önce stop komutu kullanıp program akışını durdurmalısınız. Aksi halde END komutu görüldüğünde program baştan başlar. Bundan kaynaklanabilir. Basic Dillerinde ucu açık etiketler bırakmamak gerekiyor. 

OG

Bu program nasıl çalışır anlamadım

En basitinden,

SSS:
GOTO SSS
FORUMU İLGİLENDİREN KONULARA ÖM İLE CEVAP VERİLMEZ.

tyildizak

#5
Alıntı yapılan: OG - 22 Eylül 2012, 09:51:14
Stack taşması "GİDİP DE DÖNEMEMEK" mevzusu :)


stack overflow ile stack underflow farklı şeylerdir.  Stack underflow'da taşma değil de, stack'tan eleman çekilmeye çalışıldığında  alınacak birşey olmaması, boş olması sözkonusu.

muhittin_kaplan

bu hatalar genelde
gosub la gidip goto ile dönüldüğünd
goto ile gidip return ile döüldüğünde oluşur.
ayrıca basic yada asm ile yazdığımda program sonuna sonsuz döngü kurarım.

OG

Alıntı yapılan: tyildizak - 22 Eylül 2012, 20:24:29
stack overflow ile stack underflow farklı şeylerdir.  Stack underflow'da taşma değil de, stack'tan eleman çekilmeye çalışıldığında  alınacak birşey olmaması, boş olması sözkonusu.
Ona da "GELİP DE GÖREMEMEK" diyelim :)
FORUMU İLGİLENDİREN KONULARA ÖM İLE CEVAP VERİLMEZ.

mustafa_cmbz

Alıntı yapılan: OG - 22 Eylül 2012, 16:18:20
Bu program nasıl çalışır anlamadım

En basitinden,

SSS:
GOTO SSS

yaf aslında bazı düzenlemeler yapıyordum mesela birkaç farklı resim denemesi yaparken ordan oraya dallandırıyordum yada kısır döngüye sokuyordum ondan dolayı :D