Discussion in "Project Addition or Changes" started by    Matt    Feb 28, 2007.
Wed Feb 28 2007, 01:44 am
#1
I attached the files that I have been working on to edit the LCD out of the HA projec. I waswondering if you could take a look at them. Thanks!
[/html]
Wed Feb 28 2007, 02:50 am
#2
Looks like its right! you can remove the interrupt part also.
as no LCD so no switches
interrupt from serial.c, remove checking of flag.
from HA.c, remove interrupt subroutine and enabling and disabling of interrupt.
Wed Feb 28 2007, 06:40 am
#3
Do I need "extern bit_8 flag;" in cmd.c & serial.c or "bit_8 flag;" in HA.c?
Wed Feb 28 2007, 01:40 pm
#4
no.. remove it and tell me the results.
Wed Mar 07 2007, 09:58 am
#5
Here is the code that I have. I tested it but it just keeps outputting:

please type ? for help!
*** Welcome to Home Automation Server ***

I am not sure why it is continuously outputting that. Can you look at the code and see what the problem is?
Fri Mar 09 2007, 11:06 pm
#6
Where are you testing this program?
it must be tested along with HAserver!
Sat Mar 10 2007, 04:33 am
#7
I am testing it with the HAserver. I am going to review the code this weekend and see if I can come up with something.
Thu Mar 15 2007, 09:27 am
#8
I have not had any luck with the changes I have made. At least now it does not stay in a forever loop printing:

please type ? for help
*** Welcome to Home Automation Server ***

Now it will print that but it will not do anything when I type a valid command. I attached my code hoping that you would take a look at it and maybe see something that isn't right. Thanks.
Fri Mar 16 2007, 02:12 am
#9
problem is in the serial.c file....
in the function recieve..
Defined in file as...
bit_8 recieve(void)
{
	bit_8 rbuf[4],i;
	for(i=0;rbuf[i-1]!=0x0D;i++)
	{
		ri=0;
		rbuf[i]=sbuf;
		if(rbuf[i] == 0x0d)
		{
			i++;
			break;
		}
	}
	return(str_chk(rbuf));
}

There is one statement missing in it..
it should be like this..
bit_8 recieve(void)
{
	bit_8 rbuf[4],i;
	for(i=0;rbuf[i-1]!=0x0D;i++)
	{
                [b]while(!ri);[/b] // the missing statement
		ri=0;
		rbuf[i]=sbuf;
		if(rbuf[i] == 0x0d)
		{
			i++;
			break;
		}
	}
	return(str_chk(rbuf));
}


try making this change.. and check..

Edit: did u make change in the serial.c file?


[ Edited Fri Mar 16 2007, 02:15 am ]
Sat Mar 17 2007, 12:41 am
#10
That worked. Thank you very much. There are a couple of things that I need to work out to get it working like I want, but that fixed the problem that I was having. Thank you very much.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am