| Author |
Message |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
|
| Back to top |
|
 |
vijay s
Joined: 14 Jun 2008 Posts: 67 Helped: 5 Location: Coimbatore,India
|
26 Jun 2009 9:48 instade |
|
|
|
|
| have you altered 16f877a in same design you used for 18f452.. some times exception occurs when we do so.. Create new design for this circuit .. this sometimes works....
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
26 Jun 2009 10:22 18f452 vs 16f877 |
|
|
|
|
| this is A Very Simple program .. Any Microcontroll Can run it .. i'm sure that 877 Can be used instade of it
|
|
| Back to top |
|
 |
a3h
Joined: 17 Apr 2006 Posts: 2
|
27 Jun 2009 14:01 led matrix 16f877a ccs |
|
|
|
|
i think the cause is the different in ram size and it is big for pic18f452 than pic16f877A
the code using 2d array which is need more ram capacity
you must rewrite the code to proportion your pic
thanks
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
28 Jun 2009 2:02 18f452 |
|
|
|
|
| If You have another Idea to this project >> Tell Us about it
|
|
| Back to top |
|
 |
blueroomelectronics
Joined: 17 Sep 2006 Posts: 1681 Helped: 99 Location: Toronto, Canada
|
28 Jun 2009 3:18 how to use 16f877ainstade of 18f452 in led matrix |
|
|
|
|
| Why not just use a 18F452?
|
|
| Back to top |
|
 |
saeed_pk
Joined: 20 May 2006 Posts: 199 Helped: 5 Location: Islamabad, Pakistan
|
29 Jun 2009 10:25 18f452 fuses mikroc |
|
|
|
|
are u using same hex file for 16F877A?
if it is . t will not work
compile another hex file
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
29 Jun 2009 12:37 16f877a scrolling message display circuits |
|
|
|
|
"sutun_reg" ---> 320byte... You aren't use 16F877(A). But you can change source codes.
i can send to you different a project?
are you want?
Added after 23 minutes:
| Code: |
#include <16F877.H>
#fuses HS,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_A4, rcv=PIN_A5,RESTART_WDT, ERRORS)
#define PIN_ST_CP PIN_C2 // RCLK ----> Pin 12 ST_CP
#define PIN_SH_CP PIN_C3 // SRCLK ---> Pin 11 SH_CP
#define PIN_SER_IN PIN_C5 // SER -----> Pin 14
//#define PIN_MRS PIN_C1 // PIN 10
//#define PIN_OE PIN_C3 // PIN 13
#use fast_io(B)
#use fast_io(C)
#use fast_io(D)
long s1_char_size=41;
char s1[79];
long i;
//***********************sutunlara bağlı hc595**********************************
#define clock PIN_B0 // RCLK ----> Pin 12 ST_CP
#define latch PIN_B2 // SRCLK ---> Pin 11 SH_CP
#define data PIN_B1 // SER -----> Pin 14
void HC595_OUT_satir(unsigned char send_data)
{
unsigned char bit_mask;
for (bit_mask=1; bit_mask ;bit_mask <<=1)
{
// On an AVR you can set the bit directly and i'd use
// "data = (send_data & bit_mask);"
//Else use this if/else ....
if((send_data & bit_mask))
output_high(data);
else
output_low(data);
output_high(clock);
delay_us(1);
output_low(clock);
}
output_high(latch);
delay_us(1);
output_low(latch);
}
//******************************************************************************
void get_line1(void)
{
for(i=0; i<s1_char_size; i++)
{
if(kbhit())
{
s1[i]=getc();
delay_cycles(2);
printf("%C",s1[i]);
delay_us(1);
}
else
i -= 1;
}
}
const char msg_default[] = "Sofie & ilker";
const char ascii1[32][5] = {
{0b00000000, // 0
0b00000000,
0b00000000,
0b00000000,
0b00000000}
{0b00000000, // 1
0b00000000,
0b01011111,
0b00000000,
0b00000000}
{0b00000000, // 2
0b00000111,
0b00000000,
0b00000111,
0b00000000}
{0b00010100, // 3 ("#" işareti)
0b01111111,
0b00010100,
0b01111111,
0b00010100}
{0b00100100, // 4 ("$" işareti)
0b00101010,
0b01111111,
0b00101010,
0b00010010}
{0b00100111, // 5 ("%" işareti)
0b00010101,
0b01101011,
0b01010100,
0b01110010}
{0b00110110, // 6
0b01001001,
0b01010110,
0b00100000,
0b01010000}
{0b00000000, // 7
0b00001011,
0b00000111,
0b00000000,
0b00000000}
{0b00000000, // 8 ( ")" işareti)
0b00011100,
0b00100010,
0b01000001,
0b00000000}
{0b00000000, // 9 ( "(" işareti)
0b01000001,
0b00100010,
0b00011100,
0b00000000}
{0b00101010, // 10
0b00011100,
0b01111111,
0b00011100,
0b00101010}
{0b00001000, // 11 ( "+" işareti)
0b00001000,
0b00111110,
0b00001000,
0b00001000}
{0b00000000, // 12 ( "'" işareti)
0b01011000,
0b00111000,
0b00000000,
0b00000000}
{0b00001000, // 13 ("-" işareti)
0b00001000,
0b00001000,
0b00001000,
0b00001000}
{0b00000000, // 14
0b01100000,
0b01100000,
0b00000000,
0b00000000}
{0b00100000, // 15 ("/" işareti)
0b00010000,
0b00001000,
0b00000100,
0b00000010}
{0b00111110, // 16 ( 0 rakamı )
0b01010001,
0b01001001,
0b01000101,
0b00111110}
{0b00000000, // 17 ( 1 rakamı)
0b01000010,
0b01111111,
0b01000000,
0b00000000}
{0b01110010, // 18 ( 2 rakamı)
0b01001001,
0b01001001,
0b01001001,
0b01000110}
{0b00100010, // 19 ( 3 rakamı)
0b01000001,
0b01001001,
0b01001001,
0b00110110}
{0b00011000, // 20 ( 4 rakamı)
0b00010100,
0b00010010,
0b01111111,
0b00010000}
{0b00100111, // 21 ( 5 rakamı)
0b01000101,
0b01000101,
0b01000101,
0b00111001}
{0b00111100, // 22 ( 6 rakamı)
0b01001010,
0b01001001,
0b01001001,
0b00110000}
{1, 113, 9, 5, 3} // 23
{54, 73, 73, 73, 54} // 24
{6, 73, 73, 41, 30} // 25
{0, 54,54,0,0} // {0, 54, 54,0,0,0}
// 26
{0, 91, 59, 0,0} // {0, 91, 59,0,0,0} // 27
{8, 20, 34, 65,0} // 28
{20, 20, 20, 20, 20} // 29
{65, 34, 20, 8,0} // 30
{2, 1, 81, 9, 6} // 31
};
const char ascii2[32][5] = {
{50, 73, 121, 65, 62} // 0
{124, 18, 17, 18, 124} // 1 A
{65, 127, 73, 73, 54} // 2 B
{62, 65, 65, 65, 34} // 3 C
{65, 127, 65, 65, 62} // 4 D
{127, 73, 73, 65, 65 } // 5 E
{127, 9, 9, 1, 1} // 6
{62, 65, 73, 73, 58} // 7
{127, 8, 8, 8, 127} // 8
{0, 65, 127, 65, 0} // {0, 65, 127, 65,0,0}
// 9
{32, 64, 65, 63, 1} // 10
{127, 8, 20, 34, 65} // 11
{127, 64, 64, 64, 64} // 12
{127, 2, 12, 2, 127} // 13
{127, 2, 4, 8, 127} // 14
{62, 65, 65, 65, 62} // 15
{127, 9, 9, 9, 6} // 16
{62, 65, 81, 33, 94} // 17
{127, 9, 25, 41, 70} // 18
{38, 73, 73, 73, 50} // 19
{1,1,127, 1, 1} // 20
{63, 64, 64, 64, 63} // 21
{7, 24, 96, 24, 7} // 22
{127, 32, 24, 32, 127} // 23
{99, 20, 8, 20, 99} // 24
{3, 4, 120, 4, 3} // 25
{97, 81, 73, 69, 67} // 26
{0, 127, 65, 65,0} // {0, 127, 65, 65,0,0}
// 27
{2, 4, 8, 16, 32} // 28
{0, 65, 65, 127,0} // {0, 65, 65, 127,0,0}
// 29
{4, 2, 1, 2, 4} // 30
{64, 64, 64, 64, 64} // 31
};
const char ascii3[32][5] = { // 0 -- 30 == 31 elements
{0, 0, 7, 11,0} // {0, 7, 11,0,0,0}
// 0
{32, 84, 84, 84, 56} // 1
{127, 40, 68, 68, 56} // 2
{56, 68, 68, 68,0} // 3
{56, 68, 68, 40, 127} // 4
{56, 84, 84, 84, 24} // 5
{8, 126, 9, 9, 2} // 6
{8, 84, 84, 84, 60} // 7
{127, 8, 4, 4, 120} // 8
{0, 68, 125, 64,0} // {0, 68, 125, 64,0,0}
// 9
{32, 64, 68, 61,0} // 10
{127, 16, 40, 68,0} // 11
{0, 65, 127, 64, 0} // {0, 65, 127, 64,0,0}
// 12
{124, 4, 120, 4, 120} // 13
{124, 8, 4, 4, 120} // 14
{56, 68, 68, 68, 56} // 15
{124, 20, 20, 20, 8} // 16
{8, 20, 20, 20, 124} // 17
{124, 8, 4, 4, 8} // 18
{72, 84, 84, 84, 36} // 19
{4, 63, 68, 68,0} // 20
{60, 64, 64, 32, 124} // 21
{28, 32, 64, 32, 28} // 22
{60, 64, 48, 64, 60} // 23
{68, 40, 16, 40, 68} // 24
{12,80, 80, 80, 60} // 25
{68, 100, 84, 76, 68} // 26
{0, 8, 54, 65,0} // {0, 8, 54, 65,0,0}
// 27
{0,0,119,0,0} // {0, 119,0,0,0,0} // 28
{0, 65, 54, 8,0} // {0, 65, 54, 8,0,0}
// 29
{2,1,2,4,2} // 30
{0b01111101, // ö harfi
0b10000010,
0b10000010,
0b10000010,
0b01111101,
}
};
void main(void)
{
int char_index;
int col_index;
int x = 0;
long MSD, LSD;
int delaycount;
int16 startposition;
set_tris_b(0);
set_tris_c(0x40);
set_tris_d(0);
HC595_OUT_satir(0);
output_c(0);
startposition = 0;
for(i=0; i<79; i++)
s1[i] = 46;
for(i=0; i<sizeof(msg_default); i++)
s1[i] = msg_default[i];
delay_ms(100);
do
{
if(!input(PIN_E1)) //BUTONA BASILDI MI?
{
do
{
delay_cycles(2);
printf("\f\r\n");
printf("\f\r\n Kac karakter.(0--99):");
MSD=getc();
delay_cycles(2);
printf("%C",MSD);
delay_us(1);
}while(!isamoung(MSD,"0123456789"));
do
{
LSD=getc();
delay_cycles(2);
printf("%C",LSD);
delay_us(1);
}while(!isamoung(LSD,"0123456789"));
s1_char_size = 10*(MSD-48) + (LSD-48);
delay_cycles(2);
printf("\r\n\n %lu karakter girin: ",s1_char_size);
get_line1();
}
delaycount=2; //-------> tarama hızı burdan ayarlanıyo..
while (delaycount)
{
col_index = startposition % 6;
char_index = startposition / 6;
if (char_index >= sizeof(s1))
{
startposition = 0;
char_index = 0;
col_index = 0;
}
x = s1[char_index];
// 74HC595 ler suruluyor
output_high(PIN_SH_CP);
output_high(PIN_ST_CP);
output_high(PIN_SER_IN);
output_low(PIN_SH_CP);
delay_us(1);
output_high(PIN_SH_CP);
output_low(PIN_SER_IN);
for (i=0;i<80;i++) // 80 tane kolon kullanıyoruz
{
//port_b=0;
output_low(PIN_ST_CP);
delay_us(200);
output_high(PIN_ST_CP);
delay_us(1);
output_low(PIN_SH_CP);
delay_us(1);
output_high(PIN_SH_CP);
if (col_index == 5)
{
col_index = 0;
char_index++;
if (char_index >= sizeof(s1))
char_index = 0;
x = s1[char_index];
}
else
{
if ( x < 32)
HC595_OUT_satir(0);
else if( x < 64)
HC595_OUT_satir(ascii1[x-32][col_index]);
else if( x < 96 )
HC595_OUT_satir(ascii2[x-64][col_index]);
else if( x < 128)
HC595_OUT_satir(ascii3[x-96][col_index]);
col_index++;
}
delay_us(120);
HC595_OUT_satir(0);
}
delaycount--;
}
startposition++;
} while(true);
} |
|
|
| Back to top |
|
 |
AhmadAbuOmar
Joined: 10 Jun 2009 Posts: 18 Helped: 1
|
29 Jun 2009 13:08 multimeter with 16f877 |
|
|
|
|
| smsm3650 wrote: |
Another Question .. what does the Extention PBP mean ,, what is this Language or what is it's Compiler ..
What can We Do ??? |
PBP stands for 'pic basic pro' and it means that the code was written using picbasic pro language and need to be compiled with pbpw.exe or pbp.exe
thats all i can afford to help.
good luck
|
|
| Back to top |
|
 |
Google AdSense

|
29 Jun 2009 13:08 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
29 Jun 2009 18:55 matrix led 6432 pic18 |
|
|
|
|
Yeeeeeeeeeees i'm very in need to that project
i Need Led Matrix with 877a with moving massage
All what i found move the letter from firest 5X7 to second 5X7 to third 5X7 .. it look like Litter Shift from first block to another
Pleas attache your project Eng.ilker_32
|
|
| Back to top |
|
 |
blueroomelectronics
Joined: 17 Sep 2006 Posts: 1681 Helped: 99 Location: Toronto, Canada
|
29 Jun 2009 19:09 16f877a to 18f452 |
|
|
|
|
1. Why not use a 18F452 as in the original design?
2. Is this your school project?
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
29 Jun 2009 19:27 led matrix 18f452 |
|
|
|
|
i'm Not Student ... i'm Communcation Eng.
But 452 more Expinsive than 877a .. When we need this project in Industerial perpuse it will be expinsive
Pleas help me using 877a to Get Moving massage
Added after 3 minutes:
Eng,ilker_32
when I use Your Code this error Appears
|
|
| Back to top |
|
 |
blueroomelectronics
Joined: 17 Sep 2006 Posts: 1681 Helped: 99 Location: Toronto, Canada
|
29 Jun 2009 21:03 18f452 |
|
|
|
|
| smsm3650 wrote: |
i'm Not Student ... i'm Communcation Eng.
But 452 more Expinsive than 877a .. When we need this project in Industerial perpuse it will be expinsive
Pleas help me using 877a to Get Moving massage
|
The 18F4620 (an upgraded 18F452) is not much more than a 16F877A in quantity and it doesn't need an external oscillator.
Since this is not a school project you should consider hiring a consultant as the coding seems to be beyond your companies skill.
Do you really expect someone to write it for free, do they get a royalty on units sold?
PS nice "c rack" directory in your screen caps
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
29 Jun 2009 21:22 16f887 datasheet |
|
|
|
|
sorry, my english is bad. And i love a swedish girl. For this, i'm learning english new.
it is not MikroC,
you will use the CCS C.
OK.
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
29 Jun 2009 21:32 pbp_2.5.rar megaupload |
|
|
|
|
don't forget. I'm using the Proteus 7.5 sp3.
output:
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
01 Jul 2009 11:53 18f452 assembler |
|
|
|
|
210cm,
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
01 Jul 2009 13:54 18f452 multimeter |
|
|
|
|
Thank'ssssssssssssssss for All ... But the Word ("Sofie & ilker") do LOOP Only after 80 characters
And display Dot's
i tried to change the code
for(i=0; i<79; i++)
s1[i] = 46;
to
for(i=0; i<79; i++)
s1[i] = msg_default[i];
Or
for(i=0; i<sizeof(msg_default) ; i++)
s1[i] = msg_default[i];
But it failure ... Pleas Help Me to make the code Calculate (sizeof(msg_default)) and Loop it Automaticly
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
02 Jul 2009 14:17 16f877+big clock |
|
|
|
|
| Where Are You MMMMMMMaaaaaaaaaannnnnnnnnn
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
02 Jul 2009 21:34 74hc595 + 18f |
|
|
|
|
sorry, i had work. I could enter to the web page today.
sorry man
| Code: |
#include <16F877.H>
#fuses HS,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_A4, rcv=PIN_A5,RESTART_WDT, ERRORS)
#define PIN_ST_CP PIN_C2 // RCLK ----> Pin 12 ST_CP
#define PIN_SH_CP PIN_C3 // SRCLK ---> Pin 11 SH_CP
#define PIN_SER_IN PIN_C5 // SER -----> Pin 14
//#define PIN_MRS PIN_C1 // PIN 10
//#define PIN_OE PIN_C3 // PIN 13
#use fast_io(B)
#use fast_io(C)
#use fast_io(D)
long s1_char_size=26;
char s1[26];
long i;
//***********************sutunlara bağlı hc595**********************************
#define clock PIN_B0 // RCLK ----> Pin 12 ST_CP
#define latch PIN_B2 // SRCLK ---> Pin 11 SH_CP
#define data PIN_B1 // SER -----> Pin 14
void HC595_OUT_satir(unsigned char send_data)
{
unsigned char bit_mask;
for (bit_mask=1; bit_mask ;bit_mask <<=1)
{
// On an AVR you can set the bit directly and i'd use
// "data = (send_data & bit_mask);"
//Else use this if/else ....
if((send_data & bit_mask))
output_high(data);
else
output_low(data);
output_high(clock);
delay_us(1);
output_low(clock);
}
output_high(latch);
delay_us(1);
output_low(latch);
}
//******************************************************************************
void get_line1(void)
{
for(i=0; i<s1_char_size; i++)
{
if(kbhit())
{
s1[i]=getc();
delay_cycles(2);
printf("%C",s1[i]);
delay_us(1);
}
else
i -= 1;
}
}
const char msg_default[26] = "sofie & ilker"; // Yazdığınız cümle 80 karakterden küçük olduğu için kalan alan noktalar ile doldurulur.
/*"sofie & ilker" -> 13 karakter 26 - 13 = 13 boşluk*/
const char ascii1[32][5] = {
{0b00000000, // 0
0b00000000,
0b00000000,
0b00000000,
0b00000000}
{0b00000000, // 1
0b00000000,
0b01011111,
0b00000000,
0b00000000}
{0b00000000, // 2
0b00000111,
0b00000000,
0b00000111,
0b00000000}
{0b00010100, // 3 ("#" işareti)
0b01111111,
0b00010100,
0b01111111,
0b00010100}
{0b00100100, // 4 ("$" işareti)
0b00101010,
0b01111111,
0b00101010,
0b00010010}
{0b00100111, // 5 ("%" işareti)
0b00010101,
0b01101011,
0b01010100,
0b01110010}
{0b00110110, // 6
0b01001001,
0b01010110,
0b00100000,
0b01010000}
{0b00000000, // 7
0b00001011,
0b00000111,
0b00000000,
0b00000000}
{0b00000000, // 8 ( ")" işareti)
0b00011100,
0b00100010,
0b01000001,
0b00000000}
{0b00000000, // 9 ( "(" işareti)
0b01000001,
0b00100010,
0b00011100,
0b00000000}
{0b00101010, // 10
0b00011100,
0b01111111,
0b00011100,
0b00101010}
{0b00001000, // 11 ( "+" işareti)
0b00001000,
0b00111110,
0b00001000,
0b00001000}
{0b00000000, // 12 ( "'" işareti)
0b01011000,
0b00111000,
0b00000000,
0b00000000}
{0b00001000, // 13 ("-" işareti)
0b00001000,
0b00001000,
0b00001000,
0b00001000}
{0b00000000, // 14
0b01100000,
0b01100000,
0b00000000,
0b00000000}
{0b00100000, // 15 ("/" işareti)
0b00010000,
0b00001000,
0b00000100,
0b00000010}
{0b00111110, // 16 ( 0 rakamı )
0b01010001,
0b01001001,
0b01000101,
0b00111110}
{0b00000000, // 17 ( 1 rakamı)
0b01000010,
0b01111111,
0b01000000,
0b00000000}
{0b01110010, // 18 ( 2 rakamı)
0b01001001,
0b01001001,
0b01001001,
0b01000110}
{0b00100010, // 19 ( 3 rakamı)
0b01000001,
0b01001001,
0b01001001,
0b00110110}
{0b00011000, // 20 ( 4 rakamı)
0b00010100,
0b00010010,
0b01111111,
0b00010000}
{0b00100111, // 21 ( 5 rakamı)
0b01000101,
0b01000101,
0b01000101,
0b00111001}
{0b00111100, // 22 ( 6 rakamı)
0b01001010,
0b01001001,
0b01001001,
0b00110000}
{1, 113, 9, 5, 3} // 23
{54, 73, 73, 73, 54} // 24
{6, 73, 73, 41, 30} // 25
{0, 54,54,0,0} // {0, 54, 54,0,0,0}
// 26
{0, 91, 59, 0,0} // {0, 91, 59,0,0,0} // 27
{8, 20, 34, 65,0} // 28
{20, 20, 20, 20, 20} // 29
{65, 34, 20, 8,0} // 30
{2, 1, 81, 9, 6} // 31
};
const char ascii2[32][5] = {
{50, 73, 121, 65, 62} // 0
{124, 18, 17, 18, 124} // 1 A
{65, 127, 73, 73, 54} // 2 B
{62, 65, 65, 65, 34} // 3 C
{65, 127, 65, 65, 62} // 4 D
{127, 73, 73, 65, 65 } // 5 E
{127, 9, 9, 1, 1} // 6
{62, 65, 73, 73, 58} // 7
{127, 8, 8, 8, 127} // 8
{0, 65, 127, 65, 0} // {0, 65, 127, 65,0,0}
// 9
{32, 64, 65, 63, 1} // 10
{127, 8, 20, 34, 65} // 11
{127, 64, 64, 64, 64} // 12
{127, 2, 12, 2, 127} // 13
{127, 2, 4, 8, 127} // 14
{62, 65, 65, 65, 62} // 15
{127, 9, 9, 9, 6} // 16
{62, 65, 81, 33, 94} // 17
{127, 9, 25, 41, 70} // 18
{38, 73, 73, 73, 50} // 19
{1,1,127, 1, 1} // 20
{63, 64, 64, 64, 63} // 21
{7, 24, 96, 24, 7} // 22
{127, 32, 24, 32, 127} // 23
{99, 20, 8, 20, 99} // 24
{3, 4, 120, 4, 3} // 25
{97, 81, 73, 69, 67} // 26
{0, 127, 65, 65,0} // {0, 127, 65, 65,0,0}
// 27
{2, 4, 8, 16, 32} // 28
{0, 65, 65, 127,0} // {0, 65, 65, 127,0,0}
// 29
{4, 2, 1, 2, 4} // 30
{64, 64, 64, 64, 64} // 31
};
const char ascii3[32][5] = { // 0 -- 30 == 31 elements
{0, 0, 7, 11,0} // {0, 7, 11,0,0,0}
// 0
{32, 84, 84, 84, 56} // 1
{127, 40, 68, 68, 56} // 2
{56, 68, 68, 68,0} // 3
{56, 68, 68, 40, 127} // 4
{56, 84, 84, 84, 24} // 5
{8, 126, 9, 9, 2} // 6
{8, 84, 84, 84, 60} // 7
{127, 8, 4, 4, 120} // 8
{0, 68, 125, 64,0} // {0, 68, 125, 64,0,0}
// 9
{32, 64, 68, 61,0} // 10
{127, 16, 40, 68,0} // 11
{0, 65, 127, 64, 0} // {0, 65, 127, 64,0,0}
// 12
{124, 4, 120, 4, 120} // 13
{124, 8, 4, 4, 120} // 14
{56, 68, 68, 68, 56} // 15
{124, 20, 20, 20, 8} // 16
{8, 20, 20, 20, 124} // 17
{124, 8, 4, 4, 8} // 18
{72, 84, 84, 84, 36} // 19
{4, 63, 68, 68,0} // 20
{60, 64, 64, 32, 124} // 21
{28, 32, 64, 32, 28} // 22
{60, 64, 48, 64, 60} // 23
{68, 40, 16, 40, 68} // 24
{12,80, 80, 80, 60} // 25
{68, 100, 84, 76, 68} // 26
{0, 8, 54, 65,0} // {0, 8, 54, 65,0,0}
// 27
{0,0,119,0,0} // {0, 119,0,0,0,0} // 28
{0, 65, 54, 8,0} // {0, 65, 54, 8,0,0}
// 29
{2,1,2,4,2} // 30
{0b01111101, // ö harfi
0b10000010,
0b10000010,
0b10000010,
0b01111101,
}
};
void main(void)
{
int char_index;
int col_index;
int x = 0;
long MSD, LSD;
int delaycount;
int16 startposition;
set_tris_b(0);
set_tris_c(0x40);
set_tris_d(0);
HC595_OUT_satir(0);
output_c(0);
startposition = 0;
//for(i=0; i<79; i++)
//s1[i] = 46;
for(i=0; i<sizeof(msg_default); i++)
s1[i] = msg_default[i]; i=0;
delay_ms(100);
do
{
if(!input(PIN_E1)) //BUTONA BASILDI MI?
{
do
{
delay_cycles(2);
printf("\f\r\n");
printf("\f\r\n Kac karakter.(0--99):");
MSD=getc();
delay_cycles(2);
printf("%C",MSD);
delay_us(1);
}while(!isamoung(MSD,"0123456789"));
do
{
LSD=getc();
delay_cycles(2);
printf("%C",LSD);
delay_us(1);
}while(!isamoung(LSD,"0123456789"));
s1_char_size = 10*(MSD-48) + (LSD-48);
delay_cycles(2);
printf("\r\n\n %lu karakter girin: ",s1_char_size);
get_line1();
}
delaycount=2; //-------> tarama hızı burdan ayarlanıyo..
while (delaycount)
{
col_index = startposition % 6;
char_index = startposition / 6;
if (char_index >= sizeof(s1))
{
startposition = 0;
char_index = 0;
col_index = 0;
}
x = s1[char_index];
// 74HC595 ler suruluyor
output_high(PIN_SH_CP);
output_high(PIN_ST_CP);
output_high(PIN_SER_IN);
output_low(PIN_SH_CP);
delay_us(1);
output_high(PIN_SH_CP);
output_low(PIN_SER_IN);
for (i=0;i<80;i++) // 80 tane kolon kullanıyoruz
{
//port_b=0;
output_low(PIN_ST_CP);
delay_us(200);
output_high(PIN_ST_CP);
delay_us(1);
output_low(PIN_SH_CP);
delay_us(1);
output_high(PIN_SH_CP);
if (col_index == 5)
{
col_index = 0;
char_index++;
if (char_index >= sizeof(s1))
char_index = 0;
x = s1[char_index];
}
else
{
if ( x < 32)
HC595_OUT_satir(0);
else if( x < 64)
HC595_OUT_satir(ascii1[x-32][col_index]);
else if( x < 96 )
HC595_OUT_satir(ascii2[x-64][col_index]);
else if( x < 128)
HC595_OUT_satir(ascii3[x-96][col_index]);
col_index++;
}
delay_us(120);
HC595_OUT_satir(0);
}
delaycount--;
}
startposition++;
} while(true);
} |
OK!
Added after 11 minutes:
smsm3650,
where are you from
AND, TEACH ME ENGLISH!!!
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
03 Jul 2009 5:51 16f877a ccs printf() getc() |
|
|
|
|
hhhhhhhhh I'll teach you English , Arabic And Germany
i'm From Egypt
country Of pyramids and Sphinx
First I want to say (THANK YOU VERY MMUCHHHHHHHH)
Second the New Code Became Very Very marvelous
But another Problem Appears  
When I change
| Code: |
long s1_char_size=26;
char s1[26];
...
.....
const char msg_default[26] = "sofie & ilker"; |
TO
| Code: |
long s1_char_size=55;
char s1[55];
...
.....
const char msg_default[55] = "sofie & ilker"; |
this Error appears after 1:04 Minites
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
03 Jul 2009 6:17 16f877 18f452 |
|
|
|
|
thanks, nice country. I'm from Turkey.
| Code: |
long s1_char_size=23;
char s1[23];
...
.....
const char msg_default[23] = "1234567890"; // 10+13=23 |
can you doing compile the code? or Are you able to compile the codes?
.hex:
| Code: |
:1000000000308A00FD2B00000A108A100A118207B6
:10001000313432343334343435343634373438349C
:1000200039343034003400340034003400340034C7
:100030000034003400340034003400340034003420
:100040000034003400340034003400340034003410
:100050000034003400340034003400340034003400
:1000600000340034003400340034003400340034F0
:1000700000340034003400340034003400340A10FA
:100080008A100A118207003400340034003400342E
:10009000003400345F34003400340034073400345A
:1000A0000734003414347F3414347F34143424344B
:1000B0002A347F342A341234273415346B345434C0
:1000C00072343634493456342034503400340B34CE
:1000D00007340034003400341C34223441340034FA
:1000E0000034413422341C3400342A341C347F342C
:1000F0001C342A34083408343E34083408340034BC
:10010000583438340034003408340834083408349F
:100110000834003460346034003400342034103447
:100120000834043402343E345134493445343E34C6
:10013000003442347F34403400347234493449341A
:10014000493446342234413449344934363418343D
:10015000143412347F341034273445344534453454
:1001600039343C344A3449344934303401347134FC
:100170000934053403343634493449344934363487
:1001800006344934493429341E3400343634363484
:100190000034003400345B343B3400340034083421
:1001A00014342234413400341434143414341434E8
:1001B0001434413422341434083400340234013409
:1001C0005134093406340A108A100A11EA3E031821
:1001D0008A0A820032344934793441343E347C34E2
:1001E0001234113412347C3441347F34493449346C
:1001F00036343E34413441344134223441347F3446
:10020000413441343E347F344934493441344134FB
:100210007F3409340934013401343E3441344934E3
:1002200049343A347F340834083408347F34003495
:1002300041347F34413400342034403441343F343D
:1002400001347F3408341434223441347F34403450
:100250004034403440347F3402340C3402347F3430
:100260007F340234043408347F343E344134413422
:1002700041343E347F3409340934093406343E3481
:100280004134513421345E347F34093419342934F3
:100290004634263449344934493432340134013443
:1002A0007F34013401343F344034403440343F34EF
:1002B000073418346034183407347F342034183449
:1002C00020347F34633414340834143463340334F6
:1002D00004347834043403346134513449344534BB
:1002E000433400347F344134413400340234043424
:1002F0000834103420340034413441347F34003425
:100300000434023401340234043440344034403480
:10031000403440340A148A100A11913E03188A0AA4
:1003200082000034003407340B3400342034543459
:100330005434543438347F342834443444343834D6
:100340003834443444344434003438344434443449
:1003500028347F3438345434543454341834083402
:100360007E34093409340234083454345434543457
:100370003C347F3408340434043478340034443456
:100380007D34403400342034403444343D3400342F
:100390007F341034283444340034003441347F3402
:1003A000403400347C3404347834043478347C347D
:1003B0000834043404347834383444344434443411
:1003C00038347C3414341434143408340834143479
:1003D000143414347C347C34083404340434083445
:1003E0004834543454345434243404343F3444347E
:1003F000443400343C344034403420347C341C34A5
:100400002034403420341C343C34403430344034C4
:100410003C34443428341034283444340C345034BC
:10042000503450343C344434643454344C344434C4
:100430000034083436344134003400340034773426
:10044000003400340034413436340834003402348B
:1004500001340234043402347D34823482348234F0
:100460007D340A108A140A1182070C340D340A34C0
:1004700020344B346134633420346B34613472344F
:1004800061346B347434653472342E34283430342F
:100490002D342D343934393429343A3400340A10A7
:1004A0008A140A1182070D340A340A3420342034A5
:1004B00025346C34753420346B34613472346134D7
:1004C0006B34743465347234203467346934723474
:1004D00069346E343A34203400340130EA00EA08DA
:1004E0000319812A69086A050319782A8614792A6A
:1004F000861006147B2A7C2A000006100310EA0DE1
:100500006F2A0615832A842A0000061100346530FC
:1005100084008313000803199A2A0630F800F701B3
:10052000F70B902AF80B8F2A7B30F700F70B962AEF
:10053000800B8D2A8A110A123A2C83160512831217
:1005400005120830F800A42A0000F817B52AF8139D
:10055000EF0C03180516031C05127817B52A78133B
:10056000F80BA82AB32A00000516A7308400840BD4
:10057000B72ABA2A6400F81BA72A781BAF2A0034CE
:100580008316851664008312851EC82A8316C22A24
:100590000830F700E901F717DB2AF713DB2A03100D
:1005A000851A0314E90C7717DB2A7713F70BCF2A88
:1005B0006908F800E72AA730F71B2D30F800F80B80
:1005C000DF2A0000F71BCD2A771BD52ACF2A00345B
:1005D0001030EB00F701FA01E80CE70C031CF62AD7
:1005E0006908F7070318FA0A6A08FA07FA0CF70C01
:1005F000F90CF80CEB0BEC2A8A110A129B2CEE0179
:100600000408ED006E10831B6E14670EF038E900CD
:10061000E907E23EEA00323EEC0067080F39EA07DC
:10062000EA07EC07E93EEB00EB07EB07660E0F3934
:10063000EB07EC07EB0DEC0DEC09EC0D66080F3940
:10064000EC07E90D0730E8000A30EC07EB03031C68
:10065000252BEB07EA03031C292BEA07E903031CFC
:100660002D2BE907E803031C312B6830840083132A
:1006700007306D056D1384076C30040203196D1784
:100680000008F700031D4C2B6D1B4C2B6D1A5E2BC5
:10069000ED194C2B20304F2BED156D123030F70734
:1006A000E7010408E6006710831B67147708EF0072
:1006B0009D2266088400831367188317840A6D1FC0
:1006C0003C2B8A110A12C02CDA01D9015A082102E6
:1006D000031C9F2B031D702B2008590203189F2B0E
:1006E000851A952B22305907840083135A188317D3
:1006F000E8010408E7006810831B6814C02267083B
:10070000840083136818831778088000872B2230B1
:100710005907840083135A1883170008E500EF0077
:100720009D22922B932B00009B2B0130D90200308D
:10073000031C0130DA02D90A0319DA0A662B8A117E
:100740000A12CD2CF801F901F701FA016808031D1E
:10075000AC2B67080319C62B1030E9000310E50D18
:10076000E60DF70DFA0D68087A02031DB92B67082C
:100770007702031CC22B6708F702031CFA03680800
:10078000FA020314F80DF90DE90BAE2B0034033017
:10079000E502031CD52B6530840083130008031980
:1007A000D52BD32BD32B800BD22B8A110A120A2DD7
:1007B000F701F801670803106818F707F70CF80C41
:1007C000E818F707F70CF80C6819F707F70CF80C9E
:1007D000E819F707F70CF80C681AF707F70CF80C8C
:1007E000E81AF707F70CF80C681BF707F70CF80C7A
:1007F000E81BF707F70CF80C0034840183131F3053
:100800008305831605128312051683161F149F1481
:100810001F159F1137308312A000A101DD010030A8
:100820008316860040308700003088008312E9017B
:100830006D228701E401E301DA01D901DA08031D21
:10084000352C5908363C031C352C223059078400BE
:1008500083135A1883175A08FA0059080420F8001D
:100860008000D90A0319DA0A1E2CDA01D901643092
:10087000E500872A8316891483128918CD2C402C11
:100880000C30EF009D220D30EF009D220A30EF006A
:100890009D22E50165083122E50AF700EF009D225F
:1008A00019306502031D4A2CC022DF017808DE00E2
:1008B000592C5E08EF009D225D2C5E2C0000DF08A5
:1008C000031D662C5E082F3C03183F2CDF08031D18
:1008D0003F2C5E08393C031C3F2CC022E101780804
:1008E000E000722C6008EF009D22762C772C00002F
:1008F000E108031D7F2C60082F3C03186D2CE108D4
:10090000031D6D2C6008393C031C6D2C30305E02D9
:10091000F7005F08FA000030031C0130FA02770884
:10092000E5007A08E600E8010A30E7007A08EA0004
:100930007708E900E82A30306002F7006108FA0021
:100940000030031C0130FA0277087807A00079080C
:10095000A1007A0803187A0FA107AE2CE5016508FB
:100960004F22E50AF700EF009D2205306502031DC6
:10097000AF2C103084002108E7002008E600FF2A91
:100980000830E60066084F22E60AF700EF009D22D5
:1009900019306602031DC22C642B0230E200E2080B
:1009A00003196E2D6408E6006308E500E8010630CF
:1009B000E700A2237708DC006408E6006308E5008E
:1009C000E8010630E700A2237808DB005B08363C2C
:1009D0000318EE2CE401E301DB01DC0122305B07AC
:1009E000840083130008DD0087150715871687111B
:1009F000F92CFA2C000087158712DA01D901DA08E0
:100A0000031D6C2D59084F3C031C6C2D0711C83079
:100A1000E500C72B07150C2D0D2D00008711102D9B
:100A2000112D000087155C08053C031D242DDC01F9
:100A3000DB0A5B08363C031CDB0122305B078400C9
:100A400083130008DD00612D5D081F3C031C2B2D66
:100A5000E9016D22602D5D083F3C031C3D2D2030D7
:100A60005D02E600E7000530E800D8235C0878075F
:100A70003F20E800E9006D22602D5D085F3C031C0B
:100A80004F2D40305D02E600E7000530E800D82336
:100A90005C087807E320E800E9006D22602D5D081E
:100AA0007F3C031C602D60305D02E600E7000530EE
:100AB000E800D8235C0878078A21E800E9006D2265
:100AC000DC0AC730F700F70B632D662DE9016D22B4
:100AD000D90A0319DA0AFF2CE203CF2CE30A03191F
:060AE000E40A3A2C630059
:02400E003A3F37
:00000001FF
;PIC16F877 |
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
03 Jul 2009 13:08 18f452 rs232 (kbhit() |
|
|
|
|
I have No problem With Compiling .. i Compiled the Code successfully
I tried Your New Code
| Code: |
long s1_char_size=23;
char s1[23];
...
.....
const char msg_default[23] = "1234567890"; // 10+13=23 |
But Also the Same Message Appears After 59 Second
Also the first Code have the same problem After 27 Second
| Code: |
long s1_char_size=26;
char s1[26];
.....
..........
const char msg_default[26] = "sofie & ilker";
|
Try to run the Project for 5 minites .. If this message didn't Appear with You .. then the problem My Be in MY Computer
Is the Problem In Your Name ("sofie & ilker") Or What  Just joke
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
03 Jul 2009 19:51 18f452 printf |
|
|
|
|
"sofie & ilker" does not joke to you... and you can be sure in this subject.
i'm using the proteus 7.5 sp3. And there aren't the problem really. (windows XP)
which version are you using of the Proteus? And you can exchange it.
there isn't problem in the source code.
there is the problem in your Proteus i think.
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
03 Jul 2009 20:17 16f877a sata |
|
|
|
|
i'm Also using the proteus 7.5 sp3 , windows XP
Are you Tried to run the Project for 5 minites ..
Run it for 5 Minites .. If the message does not Appear with you then the problem My Be in MY Computer
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
03 Jul 2009 21:16 16f877a dot ledmatrix 8x8 |
|
|
|
|
8 minute for you
AND...
I am not trusting to the Proteus....
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
04 Jul 2009 4:27 16f877 use |
|
|
|
|
i'm TRUST you
what About removing this part
i tried that and the circuit does Not Affect
|
|
| Back to top |
|
 |
ilker_32
Joined: 22 Jun 2009 Posts: 39 Location: Turkey
|
04 Jul 2009 11:19 const char* [] + mikroc pro |
|
|
|
|
why are you throwing lasting kiss. Are you lady ?
anyway, my computer the peculiarity:
| Quote: |
SONY VAIO VGN-Z750D/B NOTEBOOK
İŞLEMCİ: Yeni Nesil Intel Montevina 1066 MHz. 2.66 GHz. 3 MB Cache Bellek P8800 İşlemci
RAM: 4 GB DDR3 1066 Mhz. (Max. 4 GB) Ram
HDD: 320GB SATA (7200 Rpm) HDD
OPTİK SÜRÜCÜ: DVD-RW Double Layer
EKRAN KARTI: NVIDIA® GeForce® 9300M GS Max. 2010 MB and Intel® 4500MHD Max. 1750 MB Ekran Kartı |
when did you set the circuit ? How did you test ? (in the real life)
which software you used for it ?
you can't understand with the Proteus. RS232 does not work.
|
|
| Back to top |
|
 |
smsm3650
Joined: 25 Apr 2009 Posts: 30
|
04 Jul 2009 12:41 led matrix ccs c 16f877 |
|
|
|
|
No i'm Man Like You But I kiss you As your Brother
tomorrow Or After tomorrow I'll implement the circuit ... And i'll Tell you What happened
i'm Very Very Admire of you because You are wonderful Helpful MAN And {{ Zeki Çok Çok}}
I bought this
waiting For your opinion
|
|
| Back to top |
|
 |