سلام
برنامه وظیفش اینه که رو LCD کلمه " الکترونیک " رو نشون بده اما به وظیفش عمل نمیکنه :icon_razz:.
حالا میخوام بدونم تقصیر منه یا اینکه پروتیوس. :nerd:
برنامه وظیفش اینه که رو LCD کلمه " الکترونیک " رو نشون بده اما به وظیفش عمل نمیکنه :icon_razz:.
حالا میخوام بدونم تقصیر منه یا اینکه پروتیوس. :nerd:
/*********************************************
This program was produced by the
CodeWizardAVR V1.23.8c Professional
Automatic Program Generator
© Copyright 1998-2003 HP InfoTech s.r.l.
http://www.hpinfotech.ro
e-mail
ffice@hpinfotech.ro
Project :
Version :
Date : 2008/03/09
Author : NASA
Company :
Comments:
Chip type : ATmega16
Program type : Application
Clock frequency : 8.000000 MHz
Memory model : Small
External SRAM size : 0
Data Stack size : 256
*********************************************/
#include <mega32.h>
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15
#endasm
#include <lcd.h>
// Declare your global variables here
typedef unsigned char byte;
/* table for the user defined character
arrow that points to the top right corner */
flash byte char0[8]={
0b0000000,
0b0001001,
0b0001001,
0b0001001,
0b0001001,
0b0011001,
0b0000000,
0b0000000};
flash byte char1[8]={
0b0011111,
0b0000010,
0b0000010,
0b0000010,
0b0010010,
0b0011111,
0b0000000,
0b0000000};
flash byte char2[8]={
0b0000000,
0b0000000,
0b0000000,
0b0000011,
0b0000000,
0b0000111,
0b0000100,
0b0011100};
flash byte char3[8]={
0b0000000,
0b0000000,
0b0000000,
0b0000000,
0b0010111,
0b0010111,
0b0000001,
0b0000111};
flash byte char4[8]={
0b0000000,
0b0000000,
0b0000000,
0b0000001,
0b0000100,
0b0011111,
0b0000000,
0b0011000};
flash byte char5[8]={
0b0011111,
0b0000001,
0b0000001,
0b0000001,
0b0000001,
0b0011111,
0b0000000,
0b0000000};
flash byte char6[8]={
0b0000011,
0b0000000,
0b0000000,
0b0000000,
0b0010000,
0b0011111,
0b0000000,
0b0000000};
/* function used to define user characters */
void define_char(byte flash *pc,byte char_code)
{
byte i,a;
a=(char_code<<6) | 0x40;
for (i=0; i<8; i++) lcd_write_byte(a++,*pc++);
}
/*.........*/
main(void)
{
/*.........*/
// LCD module initialization
lcd_init(16);
/* define user character 0 to 6 */
define_char(char0,0);
define_char(char1,1);
define_char(char2,2);
define_char(char3,3);
define_char(char4,4);
define_char(char5,5);
define_char(char6,6);
/* switch to writing in Display RAM */
lcd_gotoxy(6,0);
/* display used defined char 0 t0 6*/
lcd_putchar(6);
lcd_putchar(5);
lcd_putchar(4);
lcd_putchar(3);
lcd_putchar(2);
lcd_putchar(1);
lcd_putchar(0);
/*.........*/
}
This program was produced by the
CodeWizardAVR V1.23.8c Professional
Automatic Program Generator
© Copyright 1998-2003 HP InfoTech s.r.l.
http://www.hpinfotech.ro

Project :
Version :
Date : 2008/03/09
Author : NASA
Company :
Comments:
Chip type : ATmega16
Program type : Application
Clock frequency : 8.000000 MHz
Memory model : Small
External SRAM size : 0
Data Stack size : 256
*********************************************/
#include <mega32.h>
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15
#endasm
#include <lcd.h>
// Declare your global variables here
typedef unsigned char byte;
/* table for the user defined character
arrow that points to the top right corner */
flash byte char0[8]={
0b0000000,
0b0001001,
0b0001001,
0b0001001,
0b0001001,
0b0011001,
0b0000000,
0b0000000};
flash byte char1[8]={
0b0011111,
0b0000010,
0b0000010,
0b0000010,
0b0010010,
0b0011111,
0b0000000,
0b0000000};
flash byte char2[8]={
0b0000000,
0b0000000,
0b0000000,
0b0000011,
0b0000000,
0b0000111,
0b0000100,
0b0011100};
flash byte char3[8]={
0b0000000,
0b0000000,
0b0000000,
0b0000000,
0b0010111,
0b0010111,
0b0000001,
0b0000111};
flash byte char4[8]={
0b0000000,
0b0000000,
0b0000000,
0b0000001,
0b0000100,
0b0011111,
0b0000000,
0b0011000};
flash byte char5[8]={
0b0011111,
0b0000001,
0b0000001,
0b0000001,
0b0000001,
0b0011111,
0b0000000,
0b0000000};
flash byte char6[8]={
0b0000011,
0b0000000,
0b0000000,
0b0000000,
0b0010000,
0b0011111,
0b0000000,
0b0000000};
/* function used to define user characters */
void define_char(byte flash *pc,byte char_code)
{
byte i,a;
a=(char_code<<6) | 0x40;
for (i=0; i<8; i++) lcd_write_byte(a++,*pc++);
}
/*.........*/
main(void)
{
/*.........*/
// LCD module initialization
lcd_init(16);
/* define user character 0 to 6 */
define_char(char0,0);
define_char(char1,1);
define_char(char2,2);
define_char(char3,3);
define_char(char4,4);
define_char(char5,5);
define_char(char6,6);
/* switch to writing in Display RAM */
lcd_gotoxy(6,0);
/* display used defined char 0 t0 6*/
lcd_putchar(6);
lcd_putchar(5);
lcd_putchar(4);
lcd_putchar(3);
lcd_putchar(2);
lcd_putchar(1);
lcd_putchar(0);
/*.........*/
}
دیدگاه