CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Anyone used Atmel cryptomemory AT88SCxxxx chip I2C ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dahonig



Joined: 05 May 2008
Posts: 2

View user's profile Send private message

Anyone used Atmel cryptomemory AT88SCxxxx chip I2C ?
PostPosted: Tue May 06, 2008 9:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 06, 2008 1:05 pm     Reply with quote

Post a link to the datasheet for the exact part number that you're using.
dahonig



Joined: 05 May 2008
Posts: 2

View user's profile Send private message

AT88SC 0808C datasheet
PostPosted: Wed May 07, 2008 2:22 pm     Reply with quote

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

The read-out sequence may be the problem.. You have to write
a read command to an even address then read out the bytes.

I'm using the AT88SC 0808C part for learning with.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 08, 2008 1:17 am     Reply with quote

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
PostPosted: Mon May 12, 2008 11:06 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group