Basic I²C-Communication with UC3A (AVR32 AT32UC3A1512)

OP #1035289
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

Reply

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.