Had the check engine light on my Dodge Ram 3500 come on with only 1700 miles on it and figured it was just the gas cap but decided to go ahead and find out how to pull the code and here's how.
Just turn the key from off to on 3 times and leave it in the on position the third time. The odometer will display any and all codes and when it's displayed them all it will show
------- and then it will say
done. This post has pictures as proof it works.
http://www.cumminsownerz.com/2668-post12.html