AD input and 7segment dysplay output


Closed Thread
Results 1 to 2 of 2
  1. #1

    Default AD input and 7segment dysplay output

    Hi all,

    Being my self at an early stage in self learning this wonderfull pic world, I'm always trying to find interesting circuits and code to build and learn.

    This time I remembered to make a car voltage monitor.
    This way I can learn how to use the Analog input of a pic, process the values and display them out.

    In my mind draft I will use one Analog input to receive the voltage.
    Since I will be working with voltages from 14v to 10v i will need a voltage divider to drop down to 5v ( one of the resistors I might use a pot to calibrate ).

    Then the pic will keep reading the input voltage and show it in one 3 digit 7segment display (xx,x volts).

    From left to right:
    Digit one will only need 1 i/o (to display 0 and 1 )
    Digit two will need 3 i/o ( to display 0 through 5 is enough )
    Digit three will need 4 i/o ( 0-9 )

    I'm guessing I will need some 4511 to drive the digits.

    Will also add 3 leds ( red,yellow,green ) as limit warnings.

    Besides the xtal, caps and resistors I guess that I will need no more components for this.

    My questions are for the picbasic code for :

    the analog readings ( what AD intructions ? )
    working with the values ( take the value and compare…like…>12v green =12v yellow <12v red )
    Output the value ( a simple way to take the value, split it and send each digit through it's I/O pins )

    I tried to get picbasic examples for this but I find everything to output though serial and nothing like I want :S

    Thanks in advance
    Last edited by ruijc; - 16th November 2007 at 13:32.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    No you really don't need any extra drivers, use the multiplexing method.
    http://melabs.com/resources/articles/ledart.htm
    http://melabs.com/resources/samples/pbp/7segment.pbp
    http://www.picbasic.co.uk/forum/showthread.php?t=1044

    for the ADC, you may want to use ADCIN. Simple search within this forum will give you few hits Also, have a look at the following
    http://melabs.com/resources/samples/pbp/adcin10.bas
    http://www.rentron.com/four-channel-ad.htm
    http://www.rentron.com/PICX2.htm

    HTH
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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