if(read_usb() == checksum)//if checksums match
{
delay_us(100);
if(input(RXF)==0)//if more data in FIFO
{
delay_ms(5);//still have data in the FIFO but not exceed 100 bytes, read out. Or error!
while(input(RXF)==0)//clear the FIFO
for(count_bytes=0; count_bytes++; count_bytes=60000)
{
if(count_bytes<=100);
{
send(0x66);//no error
delay_us(100);
packet_ready=1;
}
else %%%[color=red]A numeric expression must appear here [/color] {
delay_ms(5);
read_usb();
}
send(0xEE);//error!
packet_ready=0;
I have a problem with 'A numeric expression must appear here'. I checked the previous topics, there were no similar problem as mine.
I want to output many commands at once. So I revise the original c source code and add some lines. I was wondering if there are someone who can help me with that.
Thank you!
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
Posted: Wed Jan 13, 2010 7:35 pm
Do you notice what is at the end of the first line below that shouldn't be there?
Code:
if (count_bytes<=100);
{
send(0x66);//no error
delay_us(100);
packet_ready=1;
}
_________________ Google and Forum Search are some of your best tools!!!!
Wing Guest
Posted: Thu Jan 14, 2010 11:55 am
Thank you, dyeatman. I revised it and it suceeded!
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