NO!!!!
Do NOT sell the stock and then write a check from a portion of the proceeds to the charity.... you will have to pay capital gains taxes. Instead donate the stock to the charity directly and have the charity sell it. You avoid ALL capital gains taxes that way AND can still get a deduction on 1040 schedule A for the FULL market value of the donation. Just make sure you submit form 8283 "non-cash contributions" with your tax return.