SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
By Gyzmologist
#226883
I am a old PLC programmer and relearning C++ after many years.

I have an Artemis ATP and need to know how to access the IOMs on it. My project needs at least two each SPI and I2C channels, and I'm looking for the proper way to set them up. For this application I need to use hardware SPI/I2C for performance reasons. I have searched the forums and looked at the example programs, but haven't found the answer.

I read SPI.h and I2C.h and see references to VARIANT_SPI_INTFCS and VARIANT_WIRE_INTFCS which appear to determine how many of these interfaces are created. Where does VARIANT_SPI_INTFCS and VARIANT_WIRE_INTFCS come from, and how do I set them?

Is there another method for creating hardware SPI/I2C channels this that is preferred over this?

TIA!
Gyz
User avatar
By TS-Russell
#226962
This is a bit over our heads, but here goes:

Both of these libraries
https://github.com/sparkfun/Arduino_Apo ... 2C/I2C.ino
https://github.com/sparkfun/Arduino_Apo ... c/Wire.cpp

Have references to the VARIANT_SPI_INTFCS and VARIANT_WIRE_INTFCS - it looks like you can set whether you're using a pre-defined interface or create its MbedI2C objects using IOM pins...refer to the first link and the comments therein :-D

Hope this helps!
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]