SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
User avatar
By playalong
#231887
Hi there, I'm trying to figure out which pins on the ATP support analogWrite() and which pins support only digitalWrite(). I see that the board says 3.3V max but is that the max input voltage or output voltage? Is 5V the max pin output voltage?
User avatar
By TS-Russell
#231891
Per the hookup guide https://learn.sparkfun.com/tutorials/ho ... e-overview

"⚡ Warning: All pins are 3.3V. DO NOT expose the pins to 5V. The ADC on the Artemis is 0-2V. Exposing an ADC pin to 3.3V will not harm the device but the ADC will saturate returning 16,383 (14-bit) for voltages greater than 2V."

So, keep 5v far away. Run through that guide for a lot of good info on how to configure the board; also see https://cdn.sparkfun.com/assets/8/2/3/3 ... apping.pdf and https://cdn.sparkfun.com/assets/8/7/5/3 ... _Guide.pdf for the pin mapping/GPIO info :-D
User avatar
By playalong
#231896
Thanks for posting - I'm still not clear after reading the documentation you linked. There are pins marked with "~" and pins marked with "~A". Can the "~A" pins be used with analogWrite()?
By paulvha
#231907
Just to set the right expectations, analogwrite() on the Artemis is actually a PWM signal. It is NOT a DAC (Digital Analog converter) like https://www.sparkfun.com/products/12918. In the library V2.x.x there is a call analogwriteDAC() but that does not do anything.

The PWM signal is generated by one of the CTIMERs. The Apollo3 hase 16 CTIMERS and the output of each can be mapped to 2 different pins, as such there are 32 pins that can perform analogwrite(). The document https://cdn.sparkfun.com/assets/8/2/3/3 ... apping.pdf shows which pins (indicated in pink with CTx, e.g. CT0).

On the ATP the relevant pins all have "~" as an indicator and can be used for PWM output and thus analogWrite().
 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