excuse me :wink:
well, i had a problem with my code in codevision AVR to display the running text works.
I built the running text with my own, and I had finished to display the character but I couldn't ran it till now :(
This is the code of mine to running the text of Dot Matrix 64x8 :o
/**************************************************** Chip type : ATmega32 Program type : Application Clock frequency : 12,000000 MHz Memory model : Small External RAM size : 0 Data Stack size : 256 ****************************************************/ #include#include #include #include #define latch PORTA.0 #define dta PORTA.1 #define clock PORTA.2 #define eo PORTA.3 // Alphanumeric LCD Module functions //#asm // .equ __lcd_port=0x18 ;PORTB //#endasm //#include #include typedef unsigned char uc; unsigned char hit=0; unsigned char w=0; unsigned char pos=0x01; unsigned char buf[8]={0xFF,0xFF,0xFF,0xFF1,0xFF1,0xFF,0xFF,0xFF}; //unsigned char buf[8]={0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; void send_data(); void geser(); //void geser2(); //void kopi(); void teks(); interrupt [TIM1_OVF] void timer1_ovf_isr(void) { // Reinitialize Timer 1 value TCNT1H=0xF4; TCNT1L=0x48; if(w>80) { teks(); w=0; } buf[0]=huruf[hit]; buf[1]=huruf[hit+8]; if(hit>7){ hit=0; } send_data(); PORTC=pos; pos=((pos<<1)|(pos>>7)); hit++; w++; } void main(void) { uc dt; PORTA=0xFF; DDRA=0xFF; PORTB=0xFF; DDRB=0xFF; PORTC=0xFF; DDRC=0xFF; PORTD=0xFF; DDRD=0xFF; // prescaler 8 // Crystal frequency 12Mhz // Clock value: 1500,000 kHz // Mode: Normal top=FFFFh TCCR1A=0x00; TCCR1B=0x02; TCNT1H=0xF4; TCNT1L=0x48; ICR1H=0x00; ICR1L=0x00; OCR1AH=0x00; OCR1AL=0x00; OCR1BH=0x00; OCR1BL=0x00; // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x04; ACSR=0x80; SFIOR=0x00; //#asm("sei"); // LCD module initialization //lcd_init(16); PORTA.3=0; // kopi(); //PORTC=0b00001111; while (1) { // teks(); // send_data(); if(w>100) { teks(); w=0; } buf[0]=huruf[hit]; buf[1]=huruf[hit+8]; if(hit>7){ hit=0; } send_data(); PORTC=pos; pos=((pos<<1)|(pos>>7)); hit++; w++; delay_ms(2); } } void geser(){ unsigned char b,c; for(b=0;b<8;b++){ c=buf[b]; c=((c<<1)|(c>>7)); buf[b]=c; } } void teks(){ uc temp,cary,z; uc x,c; geser(); c=buf[0]; temp=c&0x01; if(temp==0x01){z=0x01;} else {z=0x00;} for(x=1;x<8;x++){ temp=(buf[x] & 0x01); if(temp==0x01){buf[x-1]=buf[x-1] | 0x01;} else {cary=0x00; buf[x-1]=buf[x-1] & 0xFE;} } if(z==0x01){buf[7]=buf[7] | 0x01;} else { buf[7]=buf[7] & 0xFE;} } void send_data(){ unsigned char i,tmp,a; clock = 0; dta = 0; latch = 0; for(a=0;a<8;a++){ for (i=0; i<8; i++){ tmp = (buf[a]& 0x80); if (tmp==0x80) {dta = 1;} else{ dta = 0;} clock = 1; delay_us(10); clock = 0; buf[a]=((buf[a]<<1)|(buf[a]>>7)); } } latch = 1; latch = 0; }
The code just being the Dot Matrix (DM) 64x8 run. Please, help me to find the library and How can I include that library into my code to run the Display with library charater ??
I'll be thankful if master want to help me in this problem. I'll appreciate it :)
regards,
ArcticSoul