Pages: [1]   Go Down
Author Topic: Where is the code for analogWrite function  (Read 2542 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 3
Posts: 82
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to figure out how to do PWM on an Atmega168, so I was wondering if I could see anywhere how the analogWrite function is implemented.

Sorry if this is the wrong board, I wasn't sure where it would belong.

Thanks!
« Last Edit: March 06, 2010, 07:39:23 pm by Yes » Logged

MD, USA
Offline Offline
God Member
*****
Karma: 2
Posts: 663
A jack of all trades and a master of none!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.arduino.cc/en/Tutorial/PWM
http://www.arduino.cc/en/Reference/AnalogWrite
« Last Edit: March 06, 2010, 08:21:19 pm by digimike » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 94
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you're looking for the actual source code for the function, it's in the file:

arduino-xxxx\hardware\arduino\cores\arduino\wiring_analog.c
Logged

0
Offline Offline
Jr. Member
**
Karma: 3
Posts: 82
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah that's it programmer, thanks!
Logged

Pages: [1]   Go Up
Jump to: