Error in CodeVision!!(this is my first project)

Go To Last Post
56 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everybody
this is my first project. when i want to compiling it, the CodeVision give me some error. how can i solve those!?

ks0108.h

#ifndef _KS0108_INCLUDED_
#define _KS0108_INCLUDED_

#pragma used+
//------------------------------------ Prototypes ------------------------------------
// Prototypes of User Functions   
void glcd_Init();
void glcd_DrawBmpF(flash unsigned char Pat[],unsigned char x, unsigned char y,unsigned char h,unsigned char w);
void glcd_DrawBmp(unsigned char Pat[],unsigned char x, unsigned char y,unsigned char h,unsigned char w);
void glcd_DrawF(flash unsigned char Pat[]);
void glcd_Draw(unsigned char Pat[]);										
void glcd_WriteByte(unsigned char x, unsigned char y, unsigned char dat);// x: Page ,y: Column
void glcd_Putchar(unsigned char x, unsigned char y, unsigned char ch);
void glcd_Printf(unsigned char x, unsigned char y,char* str);
void glcd_Clear();

// LCD's  methods
void address_right(int x,int y);
void address_left(int x,int y);  
void write_right(unsigned char x );
void write_left(unsigned char x );
//---------------------------------------------------------------------------------------


#pragma used-
#pragma library KS0108.lib
#endif

KS0108.lib:

/*
---------------------  www.eca.ir  ---------------------
	Graphic Lcd KS0108 controller Library
*/

#include 
#include 

//------------------------------------ Definitions ------------------------------------
#ifndef	GLCDTYPE 
	#define GLCDTYPE KS0108		// Graphic Lcd Controller type
#endif

// Default Port definition
#ifndef RS	
	#define	RS		PORTD.0
#endif

#ifndef RW
	#define	RW		PORTD.1
#endif

#ifndef EN
	#define	EN   		PORTD.6
#endif

#ifndef CS1
	 #define	CS1  	PORTD.3
#endif

#ifndef CS2
	#define	CS2  	PORTD.4
#endif

#ifndef RST
	#define	RST		PORTD.5   
#endif

#ifndef DATA
	#define	DATA	PORTC
#endif
//---------------------------------------------------------------------------------------


//------------------------------------ Functions ------------------------------------
// Initialize Graphic LCD
void glcd_Init()
{
	int i=0,com[4] = {0xc0,0xb8, 0x40, 0x3f};
	
	RS = 0;
	while(i<4)
	{
		write_left(com[i]);
		i++;
	}
	i=0;
	while(i<4)
	{
		write_right(com[i]);
		i++;
	}
} 

// Clear Lcd screen
void glcd_Clear()
{
        unsigned char page[8]={0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf };
        int i=0,j=0,index=0;
        while(index<1024)
        {    
                address_left(page[i],0x40);   
                RS=1;
                for(j=0;j<64;j++)
                {
                        write_left(0);
                        index++;
                }
                address_right(page[i],0x40);
                RS=1;
                for(j=0;j<64;j++)
                {
                        write_right(0);
                        index++;
                }  
                i++;
        }
}

// Write a byte in Row x{0..7} and Column y{0..127}
void glcd_WriteByte(unsigned char x, unsigned char y, unsigned char data)
{            
	//unsigned char j;
	
	if(y<64) // Left
	{
		address_left(((x|0b10111000)&0b10111111)
					,((y|0b01000000)&0b01111111));
		RS = 1;
		write_left(data);   		
	 } 		
	else	// Right
	{                   
		y -= 64;
		address_right(((x|0b10111000)&0b10111111)
					,((y|0b01000000)&0b01111111));
		RS = 1;
		write_right(data);
	}
}

// Drawing a pattern that is stored in FLASH memory
void glcd_DrawF(flash unsigned char Pat[])
{              
	unsigned char i,j;
	unsigned int k=0;
	
	for( i= 0; i<8; i++)
		for( j =0; j<128; j++)
	 		glcd_WriteByte(i,j,Pat[k++]);
}

// Drawing a pattern that is stored in SRAM memory
void glcd_Draw(unsigned char Pat[])
{              
	unsigned char i,j;
	unsigned int k=0;
	
	for( i= 0; i<8; i++)
		for( j =0; j<128; j++)
	 		glcd_WriteByte(i,j,Pat[k++]);
}

// Drawing a pattern that is stored in FLASH memory from dot[x,y] until width w and Height h 
void glcd_DrawBmpF(flash unsigned char Pat[],
			unsigned char x, unsigned char y,
			unsigned char h,unsigned char w)
{
	unsigned char i,j;
	unsigned int k=0;

	for( i= x ; i

font.H

flash char FontLookup [91][6] =
{
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },   // sp
    { 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00 },   // !
    { 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00 },   // "
    { 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00 },   // #
    { 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00 },   // $
    { 0x23, 0x13, 0x08, 0x64, 0x62, 0x00 },   // %
    { 0x36, 0x49, 0x55, 0x22, 0x50, 0x00 },   // &
    { 0x00, 0x05, 0x03, 0x00, 0x00, 0x00 },   // '
    { 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00 },   // (
    { 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00 },   // )
    { 0x08, 0x2A, 0x1C, 0x2A, 0x08, 0x00 },   // *
    { 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00 },   // +
    { 0x00, 0x50, 0x30, 0x00, 0x00, 0x00 },   // ,
    { 0x08, 0x08, 0x08, 0x08, 0x08, 0x00 },   // -
    { 0x00, 0x30, 0x30, 0x00, 0x00, 0x00 },   // .
    { 0x20, 0x10, 0x08, 0x04, 0x02, 0x00 },   // /
    { 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00 },   // 0
    { 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00 },   // 1
    { 0x42, 0x61, 0x51, 0x49, 0x46, 0x00 },   // 2
    { 0x21, 0x41, 0x45, 0x4B, 0x31, 0x00 },   // 3
    { 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00 },   // 4
    { 0x27, 0x45, 0x45, 0x45, 0x39, 0x00 },   // 5
    { 0x3C, 0x4A, 0x49, 0x49, 0x30, 0x00 },   // 6
    { 0x01, 0x71, 0x09, 0x05, 0x03, 0x00 },   // 7
    { 0x36, 0x49, 0x49, 0x49, 0x36, 0x00 },   // 8
    { 0x06, 0x49, 0x49, 0x29, 0x1E, 0x00 },   // 9
    { 0x00, 0x36, 0x36, 0x00, 0x00, 0x00 },   // :
    { 0x00, 0x56, 0x36, 0x00, 0x00, 0x00 },   // ;
    { 0x00, 0x08, 0x14, 0x22, 0x41, 0x00 },   // <
    { 0x14, 0x14, 0x14, 0x14, 0x14, 0x00 },   // =
    { 0x41, 0x22, 0x14, 0x08, 0x00, 0x00 },   // >
    { 0x02, 0x01, 0x51, 0x09, 0x06, 0x00 },   // ?
    { 0x32, 0x49, 0x79, 0x41, 0x3E, 0x00 },   // @
    { 0x7E, 0x11, 0x11, 0x11, 0x7E, 0x00 },   // A
    { 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00 },   // B
    { 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00 },   // C
    { 0x7F, 0x41, 0x41, 0x22, 0x1C, 0x00 },   // D
    { 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00 },   // E
    { 0x7F, 0x09, 0x09, 0x01, 0x01, 0x00 },   // F
    { 0x3E, 0x41, 0x41, 0x51, 0x32, 0x00 },   // G
    { 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00 },   // H
    { 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00 },   // I
    { 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00 },   // J
    { 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00 },   // K
    { 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00 },   // L
    { 0x7F, 0x02, 0x04, 0x02, 0x7F, 0x00 },   // M
    { 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00 },   // N
    { 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00 },   // O
    { 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00 },   // P
    { 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00 },   // Q
    { 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00 },   // R
    { 0x46, 0x49, 0x49, 0x49, 0x31, 0x00 },   // S
    { 0x01, 0x01, 0x7F, 0x01, 0x01, 0x00 },   // T
    { 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00 },   // U
    { 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00 },   // V
    { 0x7F, 0x20, 0x18, 0x20, 0x7F, 0x00 },   // W
    { 0x63, 0x14, 0x08, 0x14, 0x63, 0x00 },   // X
    { 0x03, 0x04, 0x78, 0x04, 0x03, 0x00 },   // Y
    { 0x61, 0x51, 0x49, 0x45, 0x43, 0x00 },   // Z
    { 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00 },   // [
    { 0x02, 0x04, 0x08, 0x10, 0x20, 0x00 },   // 55
    { 0x41, 0x41, 0x7F, 0x00, 0x00, 0x00 },   // ]
    { 0x04, 0x02, 0x01, 0x02, 0x04, 0x00 },   // ^
    { 0x40, 0x40, 0x40, 0x40, 0x40, 0x00 },   // _
    { 0x00, 0x01, 0x02, 0x04, 0x00, 0x00 },   // '
    { 0x20, 0x54, 0x54, 0x54, 0x78, 0x00 },   // a
    { 0x7F, 0x48, 0x44, 0x44, 0x38, 0x00 },   // b
    { 0x38, 0x44, 0x44, 0x44, 0x20, 0x00 },   // c
    { 0x38, 0x44, 0x44, 0x48, 0x7F, 0x00 },   // d
    { 0x38, 0x54, 0x54, 0x54, 0x18, 0x00 },   // e
    { 0x08, 0x7E, 0x09, 0x01, 0x02, 0x00 },   // f
    { 0x08, 0x14, 0x54, 0x54, 0x3C, 0x00 },   // g
    { 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00 },   // h
    { 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00 },   // i
    { 0x20, 0x40, 0x44, 0x3D, 0x00, 0x00 },   // j
    { 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00 },   // k
    { 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00 },   // l
    { 0x7C, 0x04, 0x18, 0x04, 0x78, 0x00 },   // m
    { 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00 },   // n
    { 0x38, 0x44, 0x44, 0x44, 0x38, 0x00 },   // o
    { 0x7C, 0x14, 0x14, 0x14, 0x08, 0x00 },   // p
    { 0x08, 0x14, 0x14, 0x18, 0x7C, 0x00 },   // q
    { 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00 },   // r
    { 0x48, 0x54, 0x54, 0x54, 0x20, 0x00 },   // s
    { 0x04, 0x3F, 0x44, 0x40, 0x20, 0x00 },   // t
    { 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00 },   // u
    { 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00 },   // v
    { 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00 },   // w
    { 0x44, 0x28, 0x10, 0x28, 0x44, 0x00 },   // x
    { 0x0C, 0x50, 0x50, 0x50, 0x3C, 0x00 },   // y
    { 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00 }    // z
};

a picture of it:

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

Last Edited: Sat. Jul 13, 2013 - 03:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely the errors are self-explanatory? It tells you this is an invalid expression:

            str[]=A;

If you check your C manual you will find that it's telling the truth. That is not valid C code. In an assignment to an array element there must be an index so something like:

            str[3]=A;

would be valid.

Your problems actually start here:

char str[];

Presumably "str" is a "string"? You have to decide how many characters you want in it and put that number between []. So if you expect string up to 9 characters use:

char str[10];

always allow 1 more than you think you need as C uses a hidden 0x00 to mark the end of strings.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Cliff,
i changed and now it give me 8 error.

B.T.W: the code and picture of first post updated.

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When you look up "abs" function description in the CodeVision Help or manual, what does it say about the header file used for the prototype?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rohalamin wrote:

i changed and now it give me 8 error.

The correct procedure is...

While (error) {
    fix_first_error_in_list();
    compile();
}

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Follow Brian's strategy and you won't go far wrong.

You have got more than eight errors in your code from a swift inspection.

I reckon that if you format the code first, you can read it easily. This will reveal most of the syntactical and logical errors.

If a punter has gone to the effort of producing neatly formatted readable code, you will get lots of help and advice.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
When you look up "abs" function description in the CodeVision Help or manual, what does it say about the header file used for the prototype?

stdlib.h! :mrgreen:
solved!

Thanks Lee,David and Brain
Actually, my code is for a graphical LCD by Base KS0108 controller. now, i get 28 errors at lib file.

i attached picture and code of lib for you.
why do it give me this error(all errors are "undefined symble")!?

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no picture attachment? But can you not just copy/paste the error text? It's then easier to read and easier to quote in replies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
There is no picture attachment?
Actually he meant "I have edited the OP again" (bad practice IMO).

Stefan Ernst

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

CodeVision comes with full Graphics Libraries for KS0108 and most other chips.

So I would start off with the CV examples. There should be some pre-compiled hex files with the Evaluation CV.

A full licence gives you all the libraries. i.e. you can write your own programs.

Of course, you can always use third-party code or write your own KS0108 code.

Bear in mind that most GLCD programs will be too big for the Evaluation version of the Compiler. If you have a full licence, you can use the built-in libraries anyway.

Let us know which licence you have.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

(bad practice IMO).

Totally agree - utter madness.

Clearly it's a missing #include.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i solved it(some functions was cluttered that i corected those) but now i have a new problem. i compiled my project and put it to proteus, but it bad work(or maybe better i say it's not work :( )(the displayer show me some odd thing)!
who can check it for me and tell me that why it's not work? :(

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

Last Edited: Sun. Jul 14, 2013 - 06:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i put the lib files to one file. look:

/*
---------------------  www.eca.ir  ---------------------
	Graphic Lcd KS0108 controller Library
*/

#include 

flash char FontLookup [91][6] =
{
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },   // sp
    { 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00 },   // !
    { 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00 },   // "
    { 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00 },   // #
    { 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00 },   // $
    { 0x23, 0x13, 0x08, 0x64, 0x62, 0x00 },   // %
    { 0x36, 0x49, 0x55, 0x22, 0x50, 0x00 },   // &
    { 0x00, 0x05, 0x03, 0x00, 0x00, 0x00 },   // '
    { 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00 },   // (
    { 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00 },   // )
    { 0x08, 0x2A, 0x1C, 0x2A, 0x08, 0x00 },   // *
    { 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00 },   // +
    { 0x00, 0x50, 0x30, 0x00, 0x00, 0x00 },   // ,
    { 0x08, 0x08, 0x08, 0x08, 0x08, 0x00 },   // -
    { 0x00, 0x30, 0x30, 0x00, 0x00, 0x00 },   // .
    { 0x20, 0x10, 0x08, 0x04, 0x02, 0x00 },   // /
    { 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00 },   // 0
    { 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00 },   // 1
    { 0x42, 0x61, 0x51, 0x49, 0x46, 0x00 },   // 2
    { 0x21, 0x41, 0x45, 0x4B, 0x31, 0x00 },   // 3
    { 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00 },   // 4
    { 0x27, 0x45, 0x45, 0x45, 0x39, 0x00 },   // 5
    { 0x3C, 0x4A, 0x49, 0x49, 0x30, 0x00 },   // 6
    { 0x01, 0x71, 0x09, 0x05, 0x03, 0x00 },   // 7
    { 0x36, 0x49, 0x49, 0x49, 0x36, 0x00 },   // 8
    { 0x06, 0x49, 0x49, 0x29, 0x1E, 0x00 },   // 9
    { 0x00, 0x36, 0x36, 0x00, 0x00, 0x00 },   // :
    { 0x00, 0x56, 0x36, 0x00, 0x00, 0x00 },   // ;
    { 0x00, 0x08, 0x14, 0x22, 0x41, 0x00 },   // <
    { 0x14, 0x14, 0x14, 0x14, 0x14, 0x00 },   // =
    { 0x41, 0x22, 0x14, 0x08, 0x00, 0x00 },   // >
    { 0x02, 0x01, 0x51, 0x09, 0x06, 0x00 },   // ?
    { 0x32, 0x49, 0x79, 0x41, 0x3E, 0x00 },   // @
    { 0x7E, 0x11, 0x11, 0x11, 0x7E, 0x00 },   // A
    { 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00 },   // B
    { 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00 },   // C
    { 0x7F, 0x41, 0x41, 0x22, 0x1C, 0x00 },   // D
    { 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00 },   // E
    { 0x7F, 0x09, 0x09, 0x01, 0x01, 0x00 },   // F
    { 0x3E, 0x41, 0x41, 0x51, 0x32, 0x00 },   // G
    { 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00 },   // H
    { 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00 },   // I
    { 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00 },   // J
    { 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00 },   // K
    { 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00 },   // L
    { 0x7F, 0x02, 0x04, 0x02, 0x7F, 0x00 },   // M
    { 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00 },   // N
    { 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00 },   // O
    { 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00 },   // P
    { 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00 },   // Q
    { 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00 },   // R
    { 0x46, 0x49, 0x49, 0x49, 0x31, 0x00 },   // S
    { 0x01, 0x01, 0x7F, 0x01, 0x01, 0x00 },   // T
    { 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00 },   // U
    { 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00 },   // V
    { 0x7F, 0x20, 0x18, 0x20, 0x7F, 0x00 },   // W
    { 0x63, 0x14, 0x08, 0x14, 0x63, 0x00 },   // X
    { 0x03, 0x04, 0x78, 0x04, 0x03, 0x00 },   // Y
    { 0x61, 0x51, 0x49, 0x45, 0x43, 0x00 },   // Z
    { 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00 },   // [
    { 0x02, 0x04, 0x08, 0x10, 0x20, 0x00 },   // 55
    { 0x41, 0x41, 0x7F, 0x00, 0x00, 0x00 },   // ]
    { 0x04, 0x02, 0x01, 0x02, 0x04, 0x00 },   // ^
    { 0x40, 0x40, 0x40, 0x40, 0x40, 0x00 },   // _
    { 0x00, 0x01, 0x02, 0x04, 0x00, 0x00 },   // '
    { 0x20, 0x54, 0x54, 0x54, 0x78, 0x00 },   // a
    { 0x7F, 0x48, 0x44, 0x44, 0x38, 0x00 },   // b
    { 0x38, 0x44, 0x44, 0x44, 0x20, 0x00 },   // c
    { 0x38, 0x44, 0x44, 0x48, 0x7F, 0x00 },   // d
    { 0x38, 0x54, 0x54, 0x54, 0x18, 0x00 },   // e
    { 0x08, 0x7E, 0x09, 0x01, 0x02, 0x00 },   // f
    { 0x08, 0x14, 0x54, 0x54, 0x3C, 0x00 },   // g
    { 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00 },   // h
    { 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00 },   // i
    { 0x20, 0x40, 0x44, 0x3D, 0x00, 0x00 },   // j
    { 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00 },   // k
    { 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00 },   // l
    { 0x7C, 0x04, 0x18, 0x04, 0x78, 0x00 },   // m
    { 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00 },   // n
    { 0x38, 0x44, 0x44, 0x44, 0x38, 0x00 },   // o
    { 0x7C, 0x14, 0x14, 0x14, 0x08, 0x00 },   // p
    { 0x08, 0x14, 0x14, 0x18, 0x7C, 0x00 },   // q
    { 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00 },   // r
    { 0x48, 0x54, 0x54, 0x54, 0x20, 0x00 },   // s
    { 0x04, 0x3F, 0x44, 0x40, 0x20, 0x00 },   // t
    { 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00 },   // u
    { 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00 },   // v
    { 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00 },   // w
    { 0x44, 0x28, 0x10, 0x28, 0x44, 0x00 },   // x
    { 0x0C, 0x50, 0x50, 0x50, 0x3C, 0x00 },   // y
    { 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00 }    // z
};


//------------------------------------ Definitions ------------------------------------
#ifndef	GLCDTYPE 
	#define GLCDTYPE KS0108		// Graphic Lcd Controller type
#endif

// Default Port definition
#ifndef RS	
	#define	RS		PORTD.0
#endif

#ifndef RW
	#define	RW		PORTD.1
#endif

#ifndef EN
	#define	EN   		PORTD.6
#endif

#ifndef CS1
	 #define	CS1  	PORTD.3
#endif

#ifndef CS2
	#define	CS2  	PORTD.4
#endif

#ifndef RST
	#define	RST		PORTD.5   
#endif

#ifndef DATA
	#define	DATA	PORTC
#endif
//---------------------------------------------------------------------------------------


void write_right(unsigned char x )
{     
	CS1	= 0;
   	CS2	= 1;
   	delay_us(1);
  	DATA	= x;
    	EN	= 1;
    	delay_us (1);
    	EN	= 0;
    	CS1	= 0;
    	CS2	= 0;
}
 
void address_right(int x,int y)
{
	RS = 0;
	write_right(x);
	write_right(y);
}

void write_left(unsigned char x)
{                
	CS1	= 1;
 	CS2	= 0;
  	delay_us(1);
   	DATA	= x;
    	EN	= 1;
    	delay_us (1);
	EN	= 0;
 	CS1	= 0;
  	CS2	= 0;
}

void address_left(int x,int y)
{
	RS = 0;
	write_left(x);
	write_left(y);
}      




//------------------------------------ Functions ------------------------------------
// Initialize Graphic LCD
void glcd_Init()
{
	int i=0,com[4] = {0xc0,0xb8, 0x40, 0x3f};
	
	RS = 0;
	while(i<4)
	{
		write_left(com[i]);
		i++;
	}
	i=0;
	while(i<4)
	{
		write_right(com[i]);
		i++;
	}
} 

// Clear Lcd screen
void glcd_Clear()
{
        unsigned char page[8]={0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf };
        int i=0,j=0,index=0;
        while(index<1024)
        {    
                address_left(page[i],0x40);   
                RS=1;
                for(j=0;j<64;j++)
                {
                        write_left(0);
                        index++;
                }
                address_right(page[i],0x40);
                RS=1;
                for(j=0;j<64;j++)
                {
                        write_right(0);
                        index++;
                }  
                i++;
        }
}

// Write a byte in Row x{0..7} and Column y{0..127}
void glcd_WriteByte(unsigned char x, unsigned char y, unsigned char data)
{            
	//unsigned char j;
	
	if(y<64) // Left
	{
		address_left(((x|0b10111000)&0b10111111)
					,((y|0b01000000)&0b01111111));
		RS = 1;
		write_left(data);   		
	 } 		
	else	// Right
	{                   
		y -= 64;
		address_right(((x|0b10111000)&0b10111111)
					,((y|0b01000000)&0b01111111));
		RS = 1;
		write_right(data);
	}
}

// Drawing a pattern that is stored in FLASH memory
void glcd_DrawF(flash unsigned char Pat[])
{              
	unsigned char i,j;
	unsigned int k=0;
	
	for( i= 0; i<8; i++)
		for( j =0; j<128; j++)
	 		glcd_WriteByte(i,j,Pat[k++]);
}

// Drawing a pattern that is stored in SRAM memory
void glcd_Draw(unsigned char Pat[])
{              
	unsigned char i,j;
	unsigned int k=0;
	
	for( i= 0; i<8; i++)
		for( j =0; j<128; j++)
	 		glcd_WriteByte(i,j,Pat[k++]);
}

// Drawing a pattern that is stored in FLASH memory from dot[x,y] until width w and Height h 
void glcd_DrawBmpF(flash unsigned char Pat[],
			unsigned char x, unsigned char y,
			unsigned char h,unsigned char w)
{
	unsigned char i,j;
	unsigned int k=0;

	for( i= x ; i

i attached a picture of proteus simulated.

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just cant understand the big fascination with proteus. Why not just get an avr and an lcd and a plastic proto board? Total cost much less than giant simulation program. After it runs fine in the simulation, it STILL wont run on the real avr and the 'whats wrong with this program?' thread will start all over again.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, Bob,
is it possible that the proteus do mistake?
in other word; is it possible that my project is be correct?

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Theory Of Logical Troubleshooting is something like start with something simple that works and apply stepwise refinement. Can you edit, compile, burn and run a c program to turn an output hi for 100ms and lo for 300ms? Make this work first.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

is it possible that the proteus do mistake?
in other word; is it possible that my project is be correct?
Yes of course that is possible. But it's not unusual for code not to work first time, especially when it's been thrown together rather than designed, so the whole point of using a debug tool like a simulator is to aid you in finding out how your implementation differs from your design. Just bailing out and asking other engineers to debug your own implementation faults is bad engineering practice. If you insist on doing it at least give a detailed description of what's wrong. What is expected behaviour? What is actual behaviour?

This is not a professional engineer's fault description :

Quote:
but it bad work(or maybe better i say it's not work Sad )(the displayer show me some odd thing)!

Also don't expect many of the people here to have access to Proteus. Most including me cannot justify the £300/$500 cost.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Like one professor in the Teheran Technical Institute bought one copy once now every engineer gets yet another copy to do his homework. Just use AtmelStudio maybe?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I thought that I should try your project.

I thought that perhaps a nice person had zipped up the project files into your "1.zip" attachment.

Anyway, I had to copy-paste the files you had posted.

There are one or two changes to make. e.g.
I used different port pins on the LCD.
I used a mega32.

Your main problems are:
1. you don't know how to convert an integer to ascii string e.g. itoa()
2. the "library.lib" did not include so it did not know any PORTD etc
3. the "library.lib" does not set the DDR for the appropriate port pins

Of course there are probably lots of other problems.

Incidentally, it is 3500 bytes. So it would compile with the Evaluation CV. Mind you, the program does not do anything much !

A real application will be > 8192 bytes (or whatever the evaluation limit is).

David.

p.s. I see that your main.c sets the DDR bits before calling glcd_init(). This will work, but is not good practice.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
The Theory Of Logical Troubleshooting is something like start with something simple that works and apply stepwise refinement. Can you edit, compile, burn and run a c program to turn an output hi for 100ms and lo for 300ms? Make this work first.

i tested. it's work.

clawson wrote:
What is expected behaviour? What is actual behaviour?

i want to the LCD show for me three parameter and three loading(bar-graph).the program is this:
1- get ADC amount
2- convert this amout to between -3v to 5v(the original voltage is -3v to 5v that i changed it by an op-amp to 0v to 8v and read it by ADC and convert by micro)
3- then show me some amount

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should:
try to display a string on your GLCD (ex : 3.5v)
try to display an integer on your GLCD (ex : 3500 should be displaied as V=3.5v)
try the ADC (I do not know whether you simulate?, you have a serial link?)
Once all this pieces of code an head (not three) can manage debugged, put them together..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you David, but i can't understand good these two part of your statement.

david.prentice wrote:

3. the "library.lib" does not set the DDR for the appropriate port pins

david.prentice wrote:
Incidentally, it is 3500 bytes. So it would compile with the Evaluation CV. Mind you, the program does not do anything much !

A real application will be > 8192 bytes (or whatever the evaluation limit is).

David.


David, i think that man that had wrote this lib was a
dilettante( :? ).

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I presume that you have got this working in Proteus now.
Have you tried it on real hardware.

You may have noticed that your library does not do much more than draw text or copy a whole screenful of bitmap.

A regular GLCD library can draw lines, circles, arcs, rectangles etc as well as text. And it can draw without destroying the existing display.

First off, you should get your current project working nicely. That library is plenty good enough to display some text and a bargraph.

Instead of calling glcd_clear(), just gotoxy() and draw spaces over your old message. Then gotoxy() again and write the new message.

Alternatively, you pad any message with spaces. e.g. xxx456 or 456xxx.
Then you overwrite on each loop.

Likewise with your bargraph.

I am not too sure what a dilettante is !
You should be able to find other KS0108 libraries.
Most are written for avr-gcc but it is simple to port to Codevision.

You have set DDRC and DDRD in your main.c
This means that the data and control lines to your KS0108 are outputs. Your library only ever writes.

A good KS0108 library will both read and write. e.g. you read the existing display RAM so that you can plot single pixels.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Have you tried it on real hardware

well no.

Quote:
Instead of calling glcd_clear(), just gotoxy() and draw spaces over your old message. Then gotoxy() again and write the new message.

but, maybe the new text(or other) put on previous.

Quote:
You should be able to find other KS0108 libraries.
Most are written for avr-gcc but it is simple to port to Codevision.

also, i already found this:

the ProGFX engine

or Osama's lib(it has a codevision version ):

GLCD Library

but if i can port GCC lib to codvision, how can i port the ProGFX engine to codevision(i think the ProGFX is very better of Osama's lib)?

Quote:
You have set DDRC and DDRD in your main.c
This means that the data and control lines to your KS0108 are outputs. Your library only ever writes.

but, i already configured it.

for lib, now i use of this lib(of this post)=> https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1082395#1082395

Despite this, i still have that problem. also the proteus give me some error but i think it can't related with this subject.

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

Last Edited: Sun. Jul 14, 2013 - 06:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Probably the problem is with lib. because when i wrote this program and simulated, i known that it's not work,too. look to picture attached(i tested lcd by the program that author of the Library wrote, it's good work.).

#include 
#include 
#include "KS0108.h"

unsigned char str[]="Rohalamin";
// Declare your global variables here

void main(void)
{

PORTA=0x00;
DDRA=0x01;

PORTB=0x00;
DDRB=0x00;

PORTC=0x00;
DDRC=0xff;

PORTD=0x00;
DDRD=0xde;

// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;

while (1)
      {
      glcd_Clear();
      glcd_WriteByte(1,50,0Xff);
      delay_ms(1000);
      glcd_Putchar(3,50,'m');
      delay_ms(1000);
      glcd_Printf(4,40,str);
      delay_ms(1000);// Place your code here
      }
}

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

Last Edited: Sun. Jul 14, 2013 - 07:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Design a little.
Code a little.
Test.

Repeat until done to taste.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Schematic... PD2 isn't not correct. Pin floats when switch is open.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your main.c has:

    // Port D initialization
    // Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
    // State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
    PORTD = 0x00;
    DDRD = 0xde;

Your library.lib has:

#ifndef RS   
   #define   RS      PORTD.0
#endif

So RS is never made an output pin. Hence you will get strange results.

It is very important to have truthful comments. You have clearly not got DDRD=0xde from the CodeWizard. If you alter a line of code, make sure that you alter the comment too.

stevech noted that you have a floating PD2 pin.
Actually it is an output pin. (DDRD=0xde)

If you do use it as an input pin. It is always wise to use a pull-up (or pull-down) resistor.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks David.
i decided to changing my lib for GLCD(because i thing it has so problem). now, i choose osama's lib for this job. it's good compiling.
just a thing is strange for me, because seems it hasn't any function for initialization the LCD. i wrote a program for use of it:

the program:

#include 
#include 
#include "glcd.h"

char str[]="Rohalamin";
// Declare your global variables here

void main(void)
{

PORTA=0x00;
DDRA=0x00;

PORTB=0x00;
DDRB=0x00;

PORTC=0x00;
DDRC=0xff;

PORTD=0x00;
DDRD=0xDC;

// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;

while (1)
      {
      glcd_clear();
      glcd_puts(str,5,5,0,1,0);
      delay_ms(1000);
      // Place your code here
      }
}

it compiled very good. but it doesn't show any thing at proteus :( .seems some port doesn't work.
aoww! god! god! god!

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i changed the configuration of lib like this:

//DEBUG
//#define DEBUG_READ 0
//#define DEBUG_GLCD 0
//----------------------
#define E_DELAY 5
#define DATAPORT PORTC
#define DATADDR DDRC
#define DATAPIN PINC
//#define CONTROLPORT PORTB
#define CS1 PORTD.5
#define CS2 PORTD.3
#define RS  PORTD.4
#define RW  PORTD.0
#define EN  PORTD.1
//#define CS_ACTIVE_LOW   0   //Define this if your GLCD CS 
                              //is active low (refer to datasheet)
#pragma used+
                           

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please post a link to the GLCD library that you are using now.

You still seem to initialise DDRC and DDRD when most libraries would do this for you in the glcd_init() function.
e.g. they probably want to know which DATAPORT and CTRLPORT you are using.

You have not called a glcd_init() function.

You have not connected the /RST pin.
Proteus thinks that it is 0 i.e. in permanent RESET.

If your library uses RST, you need to connect a /RST to a port pin.
If it doesn't use it, you connect it to VCC.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seems no necessary(it hasn't any port for RST),
David,
if see to my picture, you will found some port/pin that is turn off!! but i configured those!(i don't know why they are turn off).

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

you can see and download it here:

GLCD Library

also i attached for you the lib.

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. I downloaded and compiled the "Codevision_H" project. Since my control wires are on different pins, I amended the glcd.h to:

#define CS1 PORTD.3
#define CS2 PORTD.4
#define RS  PORTD.0
#define RW  PORTD.1
#define EN  PORTD.2

And consequently needed to amend the main.c:

    DDRD = 0x3F;       // my control lines are PD0..PD5
    PORTD.5 = 1;       // and my /RST is on PD5

The example worked fine.

Likewise, there are many KS0108 libraries that all work fine.

Note that you must make sure that your control lines are outputs. And ensure that the /RST line is in the correct state.

David.

p.s. the code size was 13918 bytes. i.e. too big for the 4kB evaluation version, you need a full CV licence.

In which case, why don't you use the regular CV libraries and examples ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HA! :shock:
my example worked fine! then why did not it work for me!?
David, do you use of proteus or by real MCU and circuit?
can you put the code here that i compiling it and see it?

Quote:
why don't you use the regular CV libraries and examples ?

well, i don't know how i can use of it(i Guess it's difficult). i can't find any tutorial and etc for use of it... :(

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just do File->Open and browse to the /cvavr/examples directory.
Since the Open dialog expects you to look for C files, you need to change the search to "*.prj" or "all files"

The regular Help menu gives many code examples too.

Yes, if you promise me to connect /RST to 5V in your Proteus schematic, I will post you a suitable project.

No, I do not have a Proteus licence.
As far as I know, it simulates pretty well.

But it also allows bad practice like "no 100nF capacitors". And you can have inappropriate resistor values too.

So I always run the code on a real AVR and real KS0108.

I suggest that you read the AVR data sheet for DDRx, PORTx, PINx and write some programs that blink LEDs.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks David,
my codes is ready. you can see in this post:

https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1082504#1082504

i just necessary that i put some functions instead other functions.

glcd_Init(); ------->> this function initialize the lcd
glcd_Putchar(); ->> this function put a character to lcd by coordinate.
glcd_Printf();----->> this function put a string(that did put an array)

and finally this loop:

for(i=0;i<=abs(L);i++){
                glcd_WriteByte(1,S,0xff);
                S++;
            }
            S=0;L=0; 

it make a laoding by amount of the L.
i already worked so much with DDRx, PORTx, PINx and wrote many programs to blink LEDs. i make good this program but i think i'm not in luck. :(
as you already said, i connected RST to VCC(5 volt).

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think the osama's lib has a function for make rectangle. i think i can make a loading(bar-graph) by the L variable and this function. i think it's rectangle().

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

YYYYAAAHHHHOOOOO!!!!
It's corected(i bad set the DDRX).
David, i really thank you!!!

Attachment(s): 

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

Last Edited: Mon. Jul 15, 2013 - 02:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well done!

If you run the Codevision_H example from Osama, does it work with Proteus?

Simulators are pretty clever, but they don't always work perfectly.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
If you run the Codevision_H example from Osama, does it work with Proteus?

Yeah, but i think it has some problem because i changed the codes(all my program) for ATMEGA32, but now, it can't run the code.
Quote:
but they don't always work perfectly.

exactly!
as i said, i changed the MCU from ATMEGA16 to ATMEGA32 but, my computer can't simulate it.

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Take the project exactly as Osama has written it.

"Wire" up your AVR in Proteus like Osama does. Remember /RST pin to VCC.

I am sure that it will Simulate ok.
I don't know how 'fast' it will look.

Likewise, you can use Proteus with anyone's examples.
Just make sure to connect virtual 'wires' to the same pins as the author used.

This is one of the reasons why it is essential that you make any comments truthful. e.g. if your code uses PORTD.5 for EN, don't leave a comment saying PORTA.4

I have a real-life KS0108 display that mates with 5x2 headers. So I must use MY wiring. I don't want to solder different wires just to match your virtual wires.

Incidentally, does your University (or job) provide you with CV and Proteus ?

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i corected it, David. :wink: (for mega32)
but now i have some problem for setting the coordinate of the char and loading.

Quote:
does your University (or job) provide you with CV and Proteus ?

well, these both programs is base for learn the AVR in iran(thus no just for my University).

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Quote:
does your University (or job) provide you with CV and Proteus ?

well, these both programs is base for learn the AVR in iran(thus no just for my University).


He was, very gently, asking you where your licenses for Proteus and CodeVision came from..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
He was, very gently, asking you where your licenses for Proteus and CodeVision came from..

Uh-hha
Thanks johan,
i think i'm wrong for understanding that sentence. :)
so, i don't know exactly.

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

Last Edited: Tue. Jul 16, 2013 - 02:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I suppose Iran has a 40 years old embargo, prohibiting to *sell*; but one can give...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That was a question you shouldn't answer on an open forum. "Hi everybody, i use pirate software". The response to your other thread would've given you a hint.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who, Kartman? me?
do i should changing my post?

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think there is a cultural difference between western capitalists that like to invent and sell things to make a living, and some other cultures that like everyone to be given everything from up above somehow. Houses, cars, food, electricity, water, electronics microcontroller simulators, etc. Us dudes that write microcontroller programs for a living will give out some examples to help the new guys learn, but if I was trying to pay the mortgage selling a compiler or a simluator I wrote, I don't think I'd help the dude that stole it without paying any. Compri?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
That was a question you shouldn't answer on an open forum. "Hi everybody, i use pirate software".
This has been brought up before. In Iran it is not illegal to copy material that has been copyrighted in the U.S. as there is no official agreement between the U.S. and Iran. There are of course still the moral objections.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was hoping that the University supplied educational software to its students. All educational establishments can get good deals.

When I studied for my Open University degree, the OU supplied both MathCad and C++ compiler.

It does seem unfortunate that Proteus and CodeVision should have their products cracked. After all, both companies need to make a living. I would also guess that both companies would be happy to sell educational licences to any country in the world.

Software piracy exists in every country!

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, if you have a very old embargo -I bet you were not born and maybe it wonot last -, prohibiting to sell: a vendor might *give* some products, for people to get accustomed (MS was rather kind with "pirates" at the beginning of the 90s for people to get accustomed to) and wait for the end of embargo: once people have appreciated their products, they might buy them... to have support for other products, say.

OTOH, if you explain/hint you stole (and you were born and conscious) some software, people wonot be that helpful.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guys,
i think you can't solve this subject thus, better, we finish this discussion.

"One's value is inherent; money is not inherent"

 

Chuck, you are in my heart!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

This has been brought up before. In Iran it is not illegal to copy material that has been copyrighted in the U.S. as there is no official agreement between the U.S. and Iran.

HOWEVER--

See this Wikipedia article: http://en.wikipedia.org/wiki/Int...

Quote:
Intellectual property in Iran
From Wikipedia, the free encyclopedia
Jump to: navigation, search

Iran is a member of the WIPO since 2001 and has acceded to several WIPO intellectual-property treaties.[1] Iran joined the Convention for the Protection of Industrial Property (Paris Convention) in 1959. In December 2003 Iran became a party to the Madrid Agreement and the Madrid Protocol for the International Registration of Marks. In 2005 Iran joined the Lisbon Agreement for the Protection of Appellations of Origin and their International Registration, which ensures the protection of geographical names associated with products. As at February 2008 Iran had yet to accede to The Hague Agreement for the Protection of Industrial Designs.[1]

-- CodeVision comes from Romania
-- Proteus comes from Canada

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The guy that writes Codevision (Pavel) lives in the EU somewhere. You guys buy and sell stuff from them? Just buy a full CV license, and dont give it out to anyone else.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Proteus comes from Canada

Have they moved from North Yorkshire then?

Anyway let's make that rhetorical shall we as:

Quote:

better, we finish this discussion.

seems like a good moment for me to follow the thread owner's wishes...

Locked.

Topic locked