[En-Nut-Discussion] need advice

Matthias Ringwald mringwal at inf.ethz.ch
Thu Apr 8 10:30:25 CEST 2004


hi sergey

  I don't know to much about smart card chips.
But in general communication is either asynchron or synchron.

I assume smart cards have clock line and a data line.
With something like that the SPI mode of the ATmega can be used.
Read the atmel datasheet upon this and the SPI driver.
Also the uart can be set to synchronous mode

I'm confident, that you don't need to to bit-bashing...

matthias

On 08.04.2004, at 00:11, Sergey Basmanov wrote:

> Hello,
> Can somebody give me an advice?
> I need to communicate with smartcard chip. There is some limitations:
> 1. clock must be present during session and in 1-5MHz range
> 2. bit length depends on clock - 1 bit = 372 clk.
>
> I found only one way to implement it:
> Use one timer for clock generation (pwm mode) and another timer that 
> runs 186 times slower for catching bit start/center.
> But I'm afraid that this will take a lot of cpu time at card clock 
> about 1.8 MHz (this gives comm speed about 4900bps).
> Will ethernut2 board work properly if interrupt generated every 9910 
> cpu clocks (14745600/8/186)?
>
> Thank You.
>
>
> _______________________________________________
> 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