fingerprint based attendance system

Status
Not open for further replies.

Ismail2011

Newbie level 5
Joined
Apr 25, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
what is the problem with the follwing code it has some error
i am using avr studio4 and mikroc pro for avr

#include <avr/io.h>
#include <util/delay.h>
#include<studio.h>

#include "softuart.h"
char i, error, byte_read;
void main()
{

DDRB = 0xFF; // Set PORTB as output (error signalization)
PORTB = 0; // No error

error = Soft_UART_Init(&PORTD,0,1,9600,0); // Initialize Soft UART at 9600 bps
if (error > 0)
{
PORTB = error; // Signalize Init error
while(1) ; // Stop program
}
_delay_ms(100);

for (i = 'z'; i >= 'A'; i--)
{ // Send bytes from 'z' downto 'A'
Soft_UART_Write(i);
_delay_ms(100);
}

while(1)
{ // Endless loop
byte_read = Soft_UART_Read(&error); // Read byte, then test error flag
if (error) // If error was detected
PORTB = error; // signal it on PORTB
else
Soft_UART_Write(byte_read); // If error was not detected, return byte read
}

}

the massage is
Build started 3.6.2011 at 17:25:40
In file included from ../softwarUsart.c:2:
c:/winavr-20100110/lib/gcc/../../avr/include/util/delay.h:85:3: warning: #warning "F_CPU not defined for <util/delay.h>"
../softwarUsart.c:3:19: error: studio.h: No such file or directory
../softwarUsart.c:5:23: error: softuart.h: No such file or directory
../softwarUsart.c:7: warning: return type of 'main' is not 'int'
../softwarUsart.c: In function 'main':
../softwarUsart.c:13: warning: implicit declaration of function 'Soft_UART_Init'
../softwarUsart.c:23: warning: implicit declaration of function 'Soft_UART_Write'
../softwarUsart.c:29: warning: implicit declaration of function 'Soft_UART_Read'
make: *** [softwarUsart.o] Error 1
Build failed with 2 errors and 5 warnings...

:lol::lol::lol::lol::lol::lol::lol:
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…