Help Please !!??

General discussion on mikroC.
Post Reply
Author
Message
sevanjam
Posts: 7
Joined: 26 Apr 2006 21:46

Help Please !!??

#1 Post by sevanjam » 02 May 2006 11:49

Hello
void main() {

//TURNING ON THE GM-862
PORTB = 0;
TRISB = 0x00;

Delay_ms(2000);

PORTB = 255;
TRISB = 0x00;

Usart_Init(9600);

Delay_ms(15000);

//TURNING OFF THE GM-862 AFTER 15 SECONDS
Usart_Write('A');
Usart_Write('T');
Usart_Write('#');
Usart_Write('S');
Usart_Write('H');
Usart_Write('D');
Usart_Write('N');

Usart_Write('\n');
Usart_Write('\r');


}
This code is only to turn the module on and off , but everytime i try to build it, it gives me an error, i couldn't figure out what the error is , and froom all the examples that i saw on the net , they seem very simillar to the one i wrote.

please can anyone check what might be the error, thanks

Sevan

Storic
Posts: 393
Joined: 01 Oct 2004 00:20
Location: Australia (S.A.)

#2 Post by Storic » 02 May 2006 12:46

What is the Micro you are using,
what is the error.

I tried it on the 18f1320 All compiles OK

sevanjam
Posts: 7
Joined: 26 Apr 2006 21:46

#3 Post by sevanjam » 02 May 2006 15:57

i am using MikroC , and 16F877A Pic @ 8 MHz

Storic
Posts: 393
Joined: 01 Oct 2004 00:20
Location: Australia (S.A.)

#4 Post by Storic » 03 May 2006 08:36

OK, I have compiled under MikroC for 16F877A micro running at 8m xtal, All compiles OK.

Try reinstalling your MikroC compiler, I found a corupt library file could cause your problem (i had something simular some time ago, Reinstalled MikroC) all OK.

Try installing a fresh copy.

Andrew

sevanjam
Posts: 7
Joined: 26 Apr 2006 21:46

#5 Post by sevanjam » 03 May 2006 19:49

thanx for your help, but i read from one of the posts that i need to add an empty line at the end of my code , and that solved the problem, thanx again

Sevan

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

#6 Post by pizon » 04 May 2006 08:16

sevanjam wrote:thanx for your help, but i read from one of the posts that i need to add an empty line at the end of my code , and that solved the problem...
This has been solved starting from version 5.0.0.0.
pizon

Post Reply

Return to “mikroC General”