I2C bus

Milosch Meriac meriac at bitmanufaktur.de
Fri Jul 20 06:48:06 UTC 2007


Dear Dave,

Kn1ght L0rd wrote:
> in to get the syntax and functions for the serial debug interface?  Is
> this just a straight serial connection, I mean could we knock out the
> I2C theory and just use the serial debug interface as long as we are
> using serial EEPROM?  Also if I wanted to use the unit without
> connection to a PC how would you suggest I power the unit/units?

You don't need a external EEPROM at all - I already have working FLASH
functions to store nonvolatile data inside the AT91SAM7 - so no external
storage like an EEPROM is needed.

With this approach it's very easy to do asynchronous serial
communication - see dbgu.c:debugp()

> The scenario being you walk by someone with a RFID card of some type and
> as you walk by you read the card and the PCD passes that information to
> the PICC in which it broadcasts that data so you have essentially cloned
> the card without any transaction taking place other than the PCD/card

I suggest you to use the serial debug interface for interdevice
communication and to use the I2C for your display.

> gets a hit back for the different tags.  I was trying to look for the
> code for handling the carrier modulation and I wasn't able to see
> anything.  Granted I am still getting used to the whole embedded

The carrier modulation is currently handled by the RC632 itself - but
it's possible to switch the RC632 to a bitbanging mode where you can
send arbitrary waveforms from AT91SAM7 via DMA to modulate them on the
carrier.
I made sure that the carrier is fed back into an Timer input where you
can divide it down and feed the divided clock to the DMA engine. This
allows you to send/receive arbitrary waveforms via DAM synchronously to
the clock.

A good start is to look into main_reqa.c - it provides a huge toolset
for sending all kinds of modulation pattern and depth out - it's fully
controlled via serial debug terminal:

        DEBUGPCR("r: REQA         w: WUPA        a: ANTICOL\r\n"
                 "A: 14443A       +: inc speed   -: dec speed\r\n"
                 "y: inc cw cond  x: dec cond    c: inc mod cond");
        DEBUGPCR("v: dec mod cond o: dec ana_out p: dec ana_out\r\n"
                 "h: trigger high l: trigger low u: dec MFOUT mode");
        DEBUGPCR("i: inc MFOUT md <: dec cdiv ph >: inc cdiv phase\r\n"
                 "{: dev cdiv     }: inc cdiv");


> Back to the I2C bus for a second.  I looked through the datasheet a
> little bit yesterday and did a search for I2C in the text and it didn't
> return anything.  Do you know what section it would be in?  I noticed

It's called TWI - two wire interface because of patent issues (chapter 30).

Warmest regards,

Milosch
-- 
Bitmanufaktur :: Schwedter Strasse 23 :: 10119 Berlin
Fon +49 (0)30 4172 5006 :: Fax +49 (0)30 4172 5054
meriac at bitmanufaktur.de :: http://bitmanufaktur.de



More information about the openpcd-devel mailing list