[En-Nut-Discussion] Device driver using TWI and 1-wire

Lars Andersson laran at ikp.liu.se
Tue Jun 15 11:03:27 CEST 2004


Harald,

Ok, I'll start working on something and we'll see how it turns out. By the way the device I am working with is a LIS3L02DS 3-axis accelerometer from ST. It generates new measurements in 280Hz. This requires a bandwidth of 1960 bytes/s on the TWI interface. Is there a known maximum bandwidth supported for the TWI driver?

Regarding the battery backup, did you mean that one should let the state machine handle the communication with the ds2760?
I am having some trouble figuring out the best way to mount the battery backup on the Ethernut board. I would prefer if it can be placed underneath the main board leaving the J3 connector open. If anyone has ideas about the design, please let me know !

Well, if the battery is used with Ethernut 2.0 it will not be classified as "backup" :)


Regards,

/Lars A Andersson

-----Original Message-----
From: Harald Kipp [mailto:harald.kipp at egnite.de]
Sent: den 14 juni 2004 11:34
To: Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] Device driver using TWI and 1-wire


Hi Lars,

>I would like to know if there is any documentation on how to implement 
>drivers for Nut/OS or how memory should be handled when new sensor data is 
>generated (who owns the memory?). The device generates an interrupt signal 
>when new data is ready and it needs to be collected directly. Is there a 
>driver implemented today that work in a similar way that I can have a look at?

In general, there is no specific requirement for
a device driver at all. You can use any AVR sample
code and run it with Nut/OS.

No need to register an interrupt handler either.
You can simply use SIGNAL or INTERRUPT like you
would do without any RTOS.

The initial idea with NutRegisterIrqHandler() was,
to have a central point for later enhancements. This
had been used by Oliver, to implement a separate
interrupt stack and may be used later for performance
measuring.

For some tasks like fast timer interrupts, this may
be too much overhead. In this case you can still
use native interrupt handling.

Writing a specific device driver is an advantage,
if you want to use stdio routines, like printf, scanf
etc. Right now this is only available for UARTs
and LCDs.

There is no such thing like memory ownership. This
would require an MMU.


>Also, has anyone implemented anything for a the Dallas DS2760 or ds2770 
>1-wire devices? (the ds2760 is the same chip as used in the ipaq h5450) I 
>am planning to develop a battery backup for the ethernut and I feel it 
>would be nice to have some battery monitoring functions together with the 
>battery.

Hope, you intend to use the Ethernut 1 design, as the
battery would not enjoy much fun with the LAN91C111. :-)

Michael Fischer informed me, that he got quite far with
a CPLD implementation of a state machine, which handles
CompactFlash handshake for Ethernut without blind delay
loops. This hardware with Michael's WLAN driver and
a battery charger...that would make a really cool Ethernut.

Harald


_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion



More information about the En-Nut-Discussion mailing list