help D/A converter


Closed Thread
Results 1 to 5 of 5
  1. #1
    matelda's Avatar
    matelda Guest

    Default help D/A converter

    hi :
    how i can make pic work as d/a converter
    thanks

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Matelda,

    M>>how i can make pic work as d/a converter
    thanks<<

    1. Make *sure* your chip has a ADC on it. Some pics do not. Some have comparators instead of AD's on them.
    2. Make *sure* you are using the pin that has the AD on it.
    3. Make *sure* you set your flags correctly to use the ADC.

    Here is some code for a 12F675


    number var word

    ANSEL=0
    CMCON=%00000111
    TRISIO=%00001010

    ' Define ADCIN parameters
    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50

    Loop:
    ADCIN 1, number 'Read value.
    'Output your data to whatever device you want
    'LCDout number
    goto Loop


    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    matelda's Avatar
    matelda Guest


    Did you find this post helpful? Yes | No

    Default thanks for your idea

    thanks
    but i want to convert digital signal to analouge using pic
    matelda

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    See the thread "HPWM problem". Use the techique I posted there with a Resistor and Capacitor to give you your DC output.

    See also the thread "0-10V Output Needed" for an example circuit which I posted which includes not only that Resistor and Capacitor, but also how to typically buffer your output with an Op-Amp.

    Using the search facility on this forum can work wonders.

  5. #5
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    hello Matelda,


    M>>thanks
    but i want to convert digital signal to analouge using pic
    matelda<<

    Ooops!! I am sorry Matelda, My dyslexic eyes turn the AD/DA around... please forgive me.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

Similar Threads

  1. Replies: 9
    Last Post: - 31st July 2008, 08:56
  2. RS-232 async to sync converter
    By jmartin in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th October 2005, 23:04
  3. question regarding an external AD converter
    By dtoohey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th March 2005, 05:50
  4. Need help, high speed D/A converter, see code
    By rpatel in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 20th December 2004, 01:33
  5. Audio D/A idea
    By Radiance in forum General
    Replies: 1
    Last Post: - 21st July 2003, 21:39

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts