Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 23, 2024, 07:35:38 19:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: Problem with compiling  (Read 5007 times)
0 Members and 1 Guest are viewing this topic.
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« on: February 04, 2010, 07:48:44 07:48 »

Hi, Guys

I got this code from internet and it is written using MIKROC AVR from MIKROELEKTRONIKA  then I want to compie it but after compiling it I got alot of errors

Would you please check it?

 
Logged
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« Reply #1 on: February 04, 2010, 04:27:05 16:27 »

Hi, Guys again

I am sorry, after making some research I saw that the code is written under codevision AVR  Compiler but there are still some errors can you please check it?

then the errors are at lines:

279 integral expression required
300 integral expression required
323 integral expression required
346 integral expression required
369 integral expression required


I am waiting your replies

« Last Edit: February 04, 2010, 04:30:10 16:30 by eleckits » Logged
leptro
V.I.P
Junior Member
*****
Offline Offline

Posts: 93

Thank You
-Given: 605
-Receive: 26


« Reply #2 on: February 04, 2010, 05:18:15 17:18 »

Hello,

the Switch  directive need a int value.

You have two solution here:

1: replace the switch  by  (device_x can only have two value, so its the best solution)

if (device_x)
{

}

else
{

}



2:

int device;


device= device_x;

switch(device)

Logged
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« Reply #3 on: February 04, 2010, 05:49:37 17:49 »

Hi, again

dear leptro,

Device_2
Device_3
Device_4
Device_5
Device_6

are defined as :

PORTC.0
PORTC.1
PORTC.2
PORTC.3
PORTC.4
PORTC.5

can you please explain more?



Logged
leptro
V.I.P
Junior Member
*****
Offline Offline

Posts: 93

Thank You
-Given: 605
-Receive: 26


« Reply #4 on: February 04, 2010, 07:15:52 19:15 »

Device_*  = PORTC.X  are define as Bit and switch(Y) need a int for Y.

you can also use define Device_2 int(PORTC.0) in this case Device_2 is a int
and now switch(Device_2) will work.

Logged
eleckits
Junior Member
**
Offline Offline

Posts: 54

Thank You
-Given: 36
-Receive: 18


« Reply #5 on: February 05, 2010, 01:06:42 13:06 »

I will build the project then test the adaption of the code as you suggestion.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC