Pls send me timer code for mega AVR device. It should run all timer.
rgds,
raj
On Thu, 12 Nov 2009 23:54:02 +0530 wrote >
Hi,
On Thu, Nov 12, 2009 at 3:34 AM, Muhammad Yasir wrote: > I want to do GPS data logging on a serial memory
24C512
>
> Could somebody please email the c-code for real time circular buffer
>
> Data needs to be continuously copied to the buffer while data bytes
> are retrieved from the
> buffer only at will or on demand
I found a really nice set of circular buffer routines from an embedded
newletter (The Embedded Muse)
I've packaged them up into a header file, which you can find over here:
It can be used as a set of C macros, or as a C++ template.
On Thu, Nov 12, 2009 at 3:34 AM, Muhammad Yasir wrote: > I want to do GPS data logging on a serial memory
24C512
>
> Could somebody please email the c-code for real time circular buffer
>
> Data needs to be continuously copied to the buffer while data bytes
> are retrieved from the
> buffer only at will or on demand
I found a really nice set of circular buffer routines from an embedded
newletter (The Embedded Muse)
I've packaged them up into a header file, which you can find over here:
It can be used as a set of C macros, or as a C++ template.
On Thu, Nov 12, 2009 at 04:34:52PM +0500, Muhammad Yasir wrote: > I want to do GPS data logging on a serial memory
24C512
>
> Could somebody please email the c-code for real time circular buffer
A circular buffer is a very very basic thing, only one step up from
"Hello, World!\n".
uint8_t available_buffer( void )
{
// This is the hardest part,
// calculating the size of data in buffer.
return( (buffer_head - buffer_tail ) % BUFFER_SIZE );
}
// don't read from buffer unless it has data
if( available_in_buffer() )
c = get_from_buffer();
}
> Data needs to be continuously copied to the buffer
while data bytes
> are retrieved from the buffer only at will or on demand
You are going to have to do something for yourself. The basics are
demonstrated above. You have to expand it to apply to your serial
memory.
--
David Kelly N4HHE, d...@HiWAAY.net
=======================================================================Whom
computers would destroy, they must first drive mad.
Reply by Muhammad Yasir●November 12, 20092009-11-12
I want to do GPS data logging on a serial memory 24C512
Could somebody please email the c-code for real time circular buffer
Data needs to be continuously copied to the buffer while data bytes
are retrieved from the
buffer only at will or on demand