What's the voltage on output pin when it's HIGH?


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    I am using 18F452, and reading portb.7.

    It lights an LED the way it should, but I only read 1-2V.

    Thanks,
    T

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by TonyA View Post
    I am using 18F452, and reading portb.7.

    It lights an LED the way it should, but I only read 1-2V.
    With or with out the LED attached?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    With or with out the LED attached?
    And if WITH the LED attached, did you also include a current limiting resistor in series with the LED ?
    Keith

    www.diyha.co.uk
    www.kat5.tv

  4. #4
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by keithdoxey View Post
    And if WITH the LED attached, did you also include a current limiting resistor in series with the LED ?

    I don't remember... I'll test again and re-post.

    Thanks again,
    T

  5. #5
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Yes, with the resistor and LED disconnected, I still read 2V out of the portb.7

    Code:
    'DEFINITIONS'
    DEFINE OSC 20
    DEFINE ADC_BITS 10        ' Set number of bits in result
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 15
    
    'PORT SETUP'
    TRISA = %11111111       'set up all pins on portA as input pins
    ADCON1 = %10000010      'Set PORTA analog conversion and right justify result
    
    timeVar   var word
    pauseTime var byte
    
    
    
    main:
    
    adcin 0, timeVar
    
    pauseTime = timeVar / 12
    
    high portb.7
    
    pause pauseTime
    
    low portb.7
    
    pause pauseTime
    
    goto main
    I'm using the pic like this to provide a TTL pulse, (replacing a Schmitt trigger osc.). I had it hooked up in place of the Schmitt trigger and it works the way I expected, however I don't know why I only read 2V from my multi meter.

    The Schmitt trigger's pulse read close to 5V.
    Last edited by TonyA; - 22nd April 2008 at 23:59.

  6. #6
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    I see no code saying "port b shall be used for output" .... do you ?
    Ramon.

  7. #7
    Join Date
    Apr 2006
    Posts
    92


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ramonetnet View Post
    I see no code saying "port b shall be used for output" .... do you ?
    Ramon.
    I was wondering about that too, but when you say "portb.7 HIGH", doesn't that automatically take care of that?

    OR do you still have to define port b as output before the code?

    Thanks,
    T

Similar Threads

  1. SERIN MIDI out of Synch?
    By jncortes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th June 2009, 20:08
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07

Members who have read this thread : 0

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