EmbDev.net

Forum: µC & Digital Electronics Basic I²C-Communication with UC3A (AVR32 AT32UC3A1512)


von Ernest B. (foizman)


Rate this post
useful
not useful
Hi gents,
absolute newby needs some hints.

I've got an AVR32-Board by Alvidi (AVR32-Modul AL-UC3AEB).
see http://alvidi.de/avr32_module.html

Atmel AT32UC3A1512: 
http://www.atmel.com/dyn/products/product_card.asp?part_id=4122
->PDF: www.atmel.com/dyn/resources/prod_documents/doc32058.pdf
->TQFP100 Package (page 44/45)

TQFP100 PIN   GPIO   Pin   Function A
83    PA29    GPIO   29    TWI - SDA
84    PA30    GPIO   30    TWI - SCL

So I have to use PortA Pin 29 and 30 for TWI communication. Right?

--------------------------------------

I want to send some bytes to a MAXIM6959 7-Segment-Driver using TWI/I²C.
see http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3638

->PDF: http://datasheets.maxim-ic.com/en/ds/MAX6958-MAX6959.pdf
->MAX6958BAPE+: Slave Adress 0111001 (page 17)
->Display test mode 0x07, LSB to 1 (page 16)

First step: I want basically reach something like
"Set MAXIM to 'Display test mode":

// device addresses
#define MAX6959BAPE       0x39
#define Display_test_mode 0x07

// initialize I2C library
i2c_init();

// set device address and write mode
i2c_start_wait(MAX6959BAPE+I2C_WRITE);

// go!
i2c_write(Display_test_mode);
i2c_write(1);

// set stop conditon, release bus
i2c_stop();

Did search many many times the forum and our friend google, didn't find 
anything. Wasn't able to adapt the Master/Slave-EEPROM-example of 
AVR32-Studio's tutorials, either.  It's an example, it's a concept, that 
'i2c_...' are dummy functions, which maybe show what I think the way 
could be. Don't know how to write it en detail.

Isn't there such a generic example out there? Hope someone can help.

regards,
Ernest

: Moved by Admin
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.