 |
 |
| View previous topic :: View next topic |
| Author |
Message |
soulraven
Joined: 08 Feb 2009 Posts: 72 Location: campulung muscel
|
|
 |
soulraven
Joined: 08 Feb 2009 Posts: 72 Location: campulung muscel
|
|
Posted: Wed Jul 08, 2009 3:57 am |
|
|
| the function is called from flex_lcd.c. in the end of file is located the function |
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 3:58 am |
|
|
| So if you look in that project where is "Scroll" defined ? |
|
 |
soulraven
Joined: 08 Feb 2009 Posts: 72 Location: campulung muscel
|
|
Posted: Wed Jul 08, 2009 4:00 am |
|
|
| look in the flex_lcd.c in the end of file |
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 4:03 am |
|
|
It is not there.
You must be editing a different flex_lcd.c file than the one included in the directory where your project is.
Your project will use the one in the same folder and not see the function in the other file.
Check the path to the file you are editing and see if it is the same as the path for main. |
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 4:07 am |
|
|
You are using mplab right.
In main.c rightclick on "flex_lcd.c" and select open File.
Compare that to the one with Scroll in it. |
|
 |
soulraven
Joined: 08 Feb 2009 Posts: 72 Location: campulung muscel
|
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 4:16 am |
|
|
| Rather than me keep compiling your code for you could you please just post the errors you are getting and any relavent code to go with it. |
|
 |
soulraven
Joined: 08 Feb 2009 Posts: 72 Location: campulung muscel
|
|
Posted: Wed Jul 08, 2009 4:19 am |
|
|
| Code: | Executing: "G:\PIC Programmers IDE\PICC\Ccsc.exe" +FM "main.c" +DF +LN +T +A +M +Z +Y=9 +EA
*** Error 51 "main.c" Line 26(1,5): A numeric expression must appear here
*** Error 12 "main.c" Line 32(8,11): Undefined identifier row
*** Error 12 "main.c" Line 33(1,4): Undefined identifier row
*** Error 12 "main.c" Line 34(7,11): Undefined identifier Done
*** Error 12 "main.c" Line 36(5,10): Undefined identifier count
*** Error 12 "main.c" Line 36(13,18): Undefined identifier count
*** Error 12 "main.c" Line 36(22,27): Undefined identifier count
*** Error 12 "main.c" Line 38(7,12): Undefined identifier count
*** Error 12 "main.c" Line 39(4,11): Undefined identifier Message
*** Error 12 "main.c" Line 42(14,17): Undefined identifier row
*** Error 12 "main.c" Line 51(7,8): Undefined identifier -- Scroll
11 Errors, 0 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Wed Jul 08 13:00:22 2009 |
i put the defintion in main.c
| Code: | #include "main.h"
#include "flex_lcd.c"
#include "meniu.c"
#include "temperatura.c"
#include "voltmetru.c"
#include "turometru.c"
#include "DS1307.c"
#include "beeper.c"
#define stanga input(PIN_B5)
#define asterix input(PIN_B6)
#define dreapta input(PIN_B7)
void main()
{
lcd_init();
LCD_Clrscr();
delay_ms(50);
porturi();
ds1307_init();
//setare_ceas_calendar();
//---------------------------------------------------------
void Scroll(unsigned char row,const char Message[])
{
char Temps[30];
unsigned int MHead=0;
unsigned intDone=0;
unsigned intcount;
if(row >1) row=1;
row=row*40;
while(Done==0)
{
for(count=0;count<20;count++)
{
Temps[count]=Message[MHead+count];
if(Message[MHead+count+1]==0) Done=1;
}
MHead++;
lcd_gotoxy(1,row);
lcd_putc(Temps);
Delay_ms(200);
}
}
//-----------------------------------------------------
while(1)
{
Scroll(1,"You Wally! You are only ment to press one key at a time!!!!");
//interfata++;
//printf("timpi:%4.0i \r",interfata);
//delay_ms(80);
//lcd_send_byte(0, SHIFT_RIGHT);
//citeste_temperaturi();
//citeste_tensiuni();
//turometru();
citire_ceas();
}
} |
|
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 4:22 am |
|
|
You are trying to define the Scroll function within your main block of code.
you can not do this!
Move the Scroll function definition above void main()
Or put it in flex_lcd.c
What pic device are you using ?
You do not have a #include for it
e.g.
#include "18f6722.h"
Sorry, I found it in main.h |
|
 |
soulraven
Joined: 08 Feb 2009 Posts: 72 Location: campulung muscel
|
|
Posted: Wed Jul 08, 2009 4:25 am |
|
|
if ai put on flex_lcd i got the error like this
| Code: | Executing: "G:\PIC Programmers IDE\PICC\Ccsc.exe" +FM "main.c" +DF +LN +T +A +M +Z +Y=9 +EA
*** Error 28 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 357(42,46): Expecting an identifier
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 357(49,50): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 357(50,51): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 357(51,52): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 358(1,2): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(1,3): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(3,4): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(8,11): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(9,10): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(10,11): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(12,15): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(16,17): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 363(17,18): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 364(1,4): Expecting a (
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 364(5,8): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 364(9,11): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 364(11,12): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 365(1,6): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 365(6,7): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 365(7,11): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 365(13,14): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 365(14,15): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 366(1,2): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(1,4): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(4,5): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(5,10): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(11,12): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(12,13): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(13,18): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(19,21): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(21,22): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(22,27): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 367(29,30): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 368(1,2): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 369(1,6): Expecting a (
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 369(7,12): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 369(13,14): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 369(14,21): Expecting a (
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 369(22,27): Expecting a (
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 369(28,33): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 369(34,35): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(1,3): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(3,4): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(4,11): Expecting a (
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(12,17): Expecting a (
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(18,23): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(24,25): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(25,26): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(26,28): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(28,29): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(29,30): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(31,35): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(36,37): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 370(37,38): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 371(1,2): Expecting a declaration
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 372(1,6): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 372(8,9): Expecting a declaration
*** Error 28 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 373(12,13): Expecting an identifier
*** Error 48 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 373(14,17): Expecting a (
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 373(18,19): Expecting a declaration
*** Error 28 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 375(10,13): Expecting an identifier
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 375(14,15): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 376(1,2): Expecting a declaration
*** Error 43 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\flex_lcd.c" Line 377(1,2): Expecting a declaration
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 5(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 9(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 14(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 18(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 26(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 28(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 30(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 32(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 39(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 41(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 43(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 45(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 47(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 49(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 56(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 58(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 60(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 62(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 64(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 66(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 72(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 74(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 76(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 78(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 80(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 82(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 88(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\meniu.c" Line 90(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\temperatura.c" Line 19(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\temperatura.c" Line 33(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\temperatura.c" Line 38(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\temperatura.c" Line 43(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\voltmetru.c" Line 20(12,13): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\voltmetru.c" Line 26(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\voltmetru.c" Line 45(12,14): Expecting a close paren
*** Error 58 "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\turometru.c" Line 94(12,13): Expecting a close paren
*** "K:\dacia 1300\proiect DACIA\proteous project\Cod sursa MPLAB\turometru.c" Line 103: Error #58: Expecting a close paren
101 Errors, 0 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Wed Jul 08 13:11:36 2009
|
|
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 4:31 am |
|
|
You are proberbly missing a bracket or semicolon somewhere in your code.
look in the flex_lcd.c file abover line 357,
post the last 2 functions in the flex_lcd.c file, i assume they include the scroll function! |
|
 |
soulraven
Joined: 08 Feb 2009 Posts: 72 Location: campulung muscel
|
|
Posted: Wed Jul 08, 2009 4:34 am |
|
|
no, the scroll function is one
| Code: | //---------------------------------------------------------------
void lcd_blink_OnOff(int8 OnOff)
{
#BIT LCD_CURSOR_BIT = LCD_FUNCTION.LCD_BLINK // 0
LCD_CURSOR_BIT = OnOff;
lcd_send_byte (0,LCD_FUNCTION);
delay_us (50);
}
//---------------------------------------------------------------
void lcd_cursor_OnOff(int8 OnOff)
{
#BIT LCD_CURSOR_BIT = LCD_FUNCTION.LCD_CURSOR // 1
LCD_CURSOR_BIT = OnOff;
lcd_send_byte (0,LCD_FUNCTION);
delay_us (50);
}
//---------------------------------------------------------------
void lcd_display_OnOff(int8 OnOff)
{
#BIT LCD_CURSOR_BIT = LCD_FUNCTION.LCD_ONOFF // 2
LCD_CURSOR_BIT = OnOff;
lcd_send_byte (0,LCD_FUNCTION);
delay_us (50);
}
//---------------------------------------------------------
void Scroll(unsigned char row,const char Message[])
{
char Temps[30];
unsigned int MHead=0;
unsigned intDone=0;
unsigned intcount;
if(row >1) row=1;
row=row*40;
while(Done==0)
{
for(count=0;count<20;count++)
{
Temps[count]=Message[MHead+count];
if(Message[MHead+count+1]==0) Done=1;
}
MHead++;
lcd_gotoxy(1,row);
lcd_putc(Temps);
Delay_ms(200);
}
}
//----------------------------------------------------- |
|
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 4:44 am |
|
|
Right.
This brings us to the problem of using
const char Message[]
but before we get on to that you seem to be missing some spaces,
intDone should be int Done
intcount should be int count
Changing const char Message[] to char *Message moves the problem to the call.
Scroll(1,"You Wally! You are only ment to press one key at a time!!!!");
Which can easily be fixed by storing the string in a var
char myStr[80];
strcpy(myStr, "You Wally! You are only ment to press one key at a time!!!!");
Scroll(1, myStr);
I think. |
|
 |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Wed Jul 08, 2009 4:47 am |
|
|
in flex_lcd.c
| Code: |
//---------------------------------------------------------
void Scroll(unsigned char row, char *Message)
{
char Temps[30];
unsigned int MHead=0;
unsigned int Done=0;
unsigned int count;
if(row >1) row=1;
row=row*40;
while(Done == 0)
{
for(count=0;count<20;count++)
{
Temps[count] = Message[MHead+count];
if (Message[MHead+count+1] == 0)
Done=1;
}
MHead++;
lcd_gotoxy(1,row);
lcd_putc(Temps);
Delay_ms(200);
}
}
//-----------------------------------------------------
|
In main.c
| Code: |
void main()
{
char message[80];
lcd_init();
LCD_Clrscr();
delay_ms(50);
porturi();
ds1307_init();
//setare_ceas_calendar();
strcpy(message, "You Wally! You are only ment to press one key at a time!!!!");
while(1)
{
Scroll(1, message);
|
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|