|
|
View previous topic :: View next topic |
Author |
Message |
C-H Wu Guest
|
Bug_3.200 and 3.191 ... delay_us |
Posted: Sat May 22, 2004 6:58 am |
|
|
PCH 3.191 and 3.200 both failed under the following simple test !
delay_us() is broken ! !
>> 3.191 An accuracy problem in the delay functions is fixed
It is NOT fully tested !
#include <18F458.H>
#fuses HS, OSCSEN, NOWDT, BORV27, PUT, STVREN, NODEBUG, NOLVP
#use delay(clock= 20000000)
#use RS232(baud = 115200, xmit= PIN_C6, rcv= PIN_C7)
void main()
{
int16 i; int8 k= 0;
while ( 1 )
{
// for(i=0;i<10000;i++) delay_us(100); <-- this is ok
for(i=0;i< 5000;i++) delay_us(200); // <-- crashed in this case !
printf("%u ", ++k);
}
}
what can I say? throw out a new release on Friday, pick up beta test report on Monday morning ? it is not good, NOT at all. |
|
|
Hans Wedemeyer
Joined: 15 Sep 2003 Posts: 226
|
Re: Bug_3.200 and 3.191 ... delay_us |
Posted: Sat May 22, 2004 5:17 pm |
|
|
C-H Wu wrote: | PCH 3.191 and 3.200 both failed under the following simple test !
delay_us() is broken ! !
>> 3.191 An accuracy problem in the delay functions is fixed
It is NOT fully tested !
#include <18F458.H>
#fuses HS, OSCSEN, NOWDT, BORV27, PUT, STVREN, NODEBUG, NOLVP
#use delay(clock= 20000000)
#use RS232(baud = 115200, xmit= PIN_C6, rcv= PIN_C7)
void main()
{
int16 i; int8 k= 0;
while ( 1 )
{
// for(i=0;i<10000;i++) delay_us(100); <-- this is ok
for(i=0;i< 5000;i++) delay_us(200); // <-- crashed in this case !
printf("%u ", ++k);
}
}
what can I say? throw out a new release on Friday, pick up beta test report on Monday morning ? it is not good, NOT at all. |
I just copy/pasted your code and compiled it using Version 3.19 and it did not crash.
When you say "crashed in this line" I assume you mean the compiler crashed ! or did you mean the code on the PIC crashed ?
Best regards
Hans Wedemeyer |
|
|
C-H Wu Guest
|
delay_us(200) delays less than 5 usec |
Posted: Sat May 22, 2004 8:48 pm |
|
|
Sorry for the term 'crashed', what happened is the numbers generated by printf("%u ", ++k) run so fast on the terminal instead of poping out once every second, it seems that delay_us(200) delays less than 5 usec !
delay_us(n) works fine for n < 154.
What really crashed is my delay_us() based simple beeper routine.
Best regards |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|