Is I2C really as difficult as it looks on SAM D10?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Trying to get a SAM D10 to communicate with an MCP23017 I/O expander, and I am......well lost.

 

On the AVR this is a breeze.  Write a simple little library to translate the registers for the IC, and drop in Peter Fleury's TWImaster library and all is pretty much done.  BUt on these ARM devices it seems that EVERYTHING is a huge mess to accomplish.  SPI looks like it's a little easier, but not by much.

 

Is there an example project that might save my sanity on I2C for these D-series units, or am I in deeper dung that I think?

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Here is an example of reading temperature from AT30TS74. GPIO manipulation header can be found here https://github.com/ataradov/mcu-...

Attachment(s): 

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Alex!

 

Great to see you are stll here.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

on these ARM devices it seems that EVERYTHING is a huge mess to accomplish

 Are  you looking at ASF, or at the bare chip documentation?

Just curious - in general I've found the bare chip to be more complicated (which is ok, I guess), and vendor "libraries" to do a very poor job of simplifying things (which is quite sad.)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ASF.

 

I Have been using the 'Wizard" and all I keep saying is "Gee Wiz, this is a pain in the bumm".

 

I think whats also irritating me is the lack of decent documentation on the IDE, and the few videos I see are more marketing BS.

 

It's also hard for me to get past why I need 8k of flash just to set the damned thing up, before I write any code.

 

But I really need to learn how to get them working, it's as simple as that.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

jgmdesign wrote:
Great to see you are stll here.
I just stopped by to see what's new. I don't like, it, so I'm going back to a real forum.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A forum you would like to share? :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

atmellian wrote:

A forum you would like to share? :)

I would guess it's the one in his signature

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user