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'm sure that I'm getting 5V to power my PIC.

    T

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    How long is "pausetime"

    You are toggling the pin between high and low and your meter will probably not see the voltage stable for long enough to get a true reading.

    Currently the pin is operating on a 50% duty cycle and 2.5 volts just happens to be 50% or 5V !!!!

    Comment out the "low port b.7" statement which means once the LED comes on it will stay on but you will then have a stable condition on the pin to be able to measure.

    My guess is that it will then read 5V
    Keith

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

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    also cant see what the code is meant to achieve because irrespective of whatever value you have for pausetime the led will alsways be at 50% brightness as the on and off times are the same.

    If you are trying to get a variable brightness then with pausetime being 0-255 you should have something like

    Code:
    main:
    
    adcin 0, timeVar
    
    pauseTime = timeVar / 12
    
    high portb.7
    
    pause pauseTime
    
    low portb.7
    
    pause (255-pauseTime)
    
    goto main
    which will give a total time of 255 but the on will vary from 0-255 whilst off will also change from 255-0
    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

    Yes, you're right. The on-off time is too fast for the meter to register.

    I am just trying to achieve a TTL pulsing; 5V, 0V, on/off at different rates. The LED was put in there just for a visual reference, it's not part of my finished circuit.

    The purpose of this pulsing of the pic pin is to replace a Schmitt Trigger Pulse Oscillator.

    It is working the way I expected "in circuit", but I was just wondering why I couldn't read discreet 5V and 0V on my meter, (taking reading on the bare pin, not resistor or LED).

    If I had an Oscilloscope I guess I would see the TTL (I would see the square wave pulse).

    I'm starting to see the benefits of an Oscilloscope...

    Thanks for all the help, I appreciate it very much.

    T

  5. #5
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by TonyA View Post
    I'm sure that I'm getting 5V to power my PIC.

    T
    Depends on where you are measuring your Voltage at.

    A - B, A - C , B - C ?


    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2534&d=1208936533">
    Attached Images Attached Images  
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

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