View previous topic :: View next topic |
Author |
Message |
dahonig
Joined: 05 May 2008 Posts: 2
|
Anyone used Atmel cryptomemory AT88SCxxxx chip I2C ? |
Posted: Tue May 06, 2008 9:45 am |
|
|
Hi, I'm trying to get a PIC 16F886 to talk to an Atmel cryptomemory (tm)
chip over an I2C bus. I can talk to a regular serial eeprom ok,
using the CCS i2c functions, but the slightly different AT88SC protocol is giving me problems. I'm currently pursuing a lower-level bit
banging port but wonder if anyone has done this before. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue May 06, 2008 1:05 pm |
|
|
Post a link to the datasheet for the exact part number that you're using. |
|
|
dahonig
Joined: 05 May 2008 Posts: 2
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu May 08, 2008 1:17 am |
|
|
Quote: | You have to write a read command to an even address then read out the bytes. |
In addition to that, there are two other things you must do:
Quote: |
7.1 Start-up Sequence
When first powering up the device, 5 pulses are required on CLK-SCL for
reading of internal registers. |
This is probably easiest to do if you use the CCS i2c library in software
i2c mode. You can take over the bus, send the 5 pulses on SCL, and
then restore the SCL pin to the required state with the output_float()
function.
Quote: | 7.4 Acknowledge Polling
Each command is ended with a stop condition. Certain commands are
required to be followed by an acknowledge polling sequence.
• Read Commands: No ACK polling required.
• Write Commands: ACK polling required except encrypted write
commands. Any command may be used.
• Set commands: No ACK polling required.
• Verify commands: ACK polling required with B2 or B6 commands only.
|
This appnote has some sample command sequences, starting on page 6:
http://atmel.com/dyn/resources/prod_documents/doc5051.pdf |
|
|
Guest
|
Cryptomemory i2c |
Posted: Mon May 12, 2008 11:06 am |
|
|
Thanks for the help. I ended up using a bit-banging implementation
of the I2C protocol, which was done by porting simple i2c functions
(eg void ll_Clockhigh(void)) in Atmel's ll_port.c (As you suggest)
This let me talk to the chip --both user memory and config memory.
Their authentication protocol isn't publicly documented enough to
code, but I found a FAE team at Atmel that volunteered to do
a PIC16 build of their library, and I'll be delighted with that.
Very nice when this stuff comes together --I was learning PIC
architecture, the IDE, compiler, i2c, and the atmel chips
at the same time.
I'm quite impressed how quickly the compiler & IDE get you up
and running. Also fascinated with the 'stuff more peripherals
into the component than you have pins' PIC architecture. |
|
|
|