PDA

View Full Version : Discussion galvanic separated data transfer


coro
Dec 10, 2006, 07:34 AM
Hi dears,
I need to make communication between few avr processors but I have a problem.
- procesor I will use does NOT support any other than I2C (TWI) data. (it isnt joke, somebody is fool or wrong-minded in atmel, in my opinion...)
- ground of each mcu floats elsewhere, some just moved, some pulsing.
- i should really not waste energy as it is battery powered.
- the simplycity of dps and the price as well is the key.

So, I could use built-in twi (i2c) with quite complex optocoupled separation,
Or I can write my own SPI / RS232-like transfer support.

To skip development of allready developed, I would be very thankfull for a link to some kind of library or source code with implementation..
Thanks.

fredhs
Dec 12, 2006, 09:16 AM
...Or I can write my own SPI / RS232-like transfer support.


Hi coro,

well, as you appear to dislike I2C, why don't you go for the software UART implementation published by ATMEL:

http://www.avrfreaks.net/index.php?module=FreaksTools&func=viewItem&item_id=79

http://www.atmel.com/dyn/resources/prod_documents/doc0952.pdf

http://www.atmel.fi/dyn/resources/prod_documents/DOC0941.PDF



Regards,

Fred

coro
Dec 12, 2006, 10:06 AM
Thank You for pointing this.
Yes.. somehow I didnt catch it before. I will use it or something very like this.
Target is mega406, so I have plenty of space, but I want to use external interrupt as well. Probably this way will be the best, as I am short on timers, as usual, but I will see.
I do not dislike I2c, however, opto separation of both lines bi-directional is too complex to be adequate. I wonder why two-wire-inteface allways needs four wires :)
I am temporary on hold, as 406 has only jtag programming.

AndyKunz
Dec 12, 2006, 11:38 AM
JTAG is much nicer than proprietary, believe me. Once you try it, you'll never want to go back.

Andy

coro
Dec 12, 2006, 12:14 PM
AVRJTAGICEmkII is the only programmer on the list of supporting hw. It should cost 300usd, but here local it is available for 400EUR. ( ( http://www.gme.sk/index.php?action=vypis&pohled=1975305&typhledani=fulltext&pageskrok=10&setrid=3&lk=&sk= )
As the project is my pure hobby, i am very angry for that. I will try to force avr dragon to programm the chip, or look for parallel programer.

AndyKunz
Dec 12, 2006, 03:28 PM
There are many free JTAG things available.

Look for "Wiggler" to find good DIY JTAG adapters.\

Andy