I don't understand this code!


Closed Thread
Results 1 to 40 of 47

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    I still would like to know between which points are you measuring the wave (voltage) from?
    I'm guessing just looking at the LEDs, not actually measuring voltage...
    I could be wrong...been there before

  2. #2
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile don't blink

    Quote Originally Posted by skimask View Post
    I'm guessing just looking at the LEDs, not actually measuring voltage...
    I could be wrong...been there before
    Bet you’re right. Must be difficult to tell if both come on together at 60 Hz tho...
    Ohm it's not just a good idea... it's the LAW !

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Bet you’re right. Must be difficult to tell if both come on together at 60 Hz tho...
    Unless the guy has REALLY FAST eyes!

  4. #4
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Unless the guy has REALLY FAST eyes!
    Hard on the eyes!
    Maybe that's why they call it 60 hurts.
    Ohm it's not just a good idea... it's the LAW !

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Hard on the eyes!
    Maybe that's why they call it 60 hurts.
    Me anyways, even after a good sleep and a cup of coffee cannot see the 50 Hz. As for the 60....

    Ioannis


    P.S. May be it's the age!

  6. #6
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Suggestions:

    1: When developing a project its always worth building the hardware on something like a solderless breadboard as it makes changes a doddle and saves on the cost of designing, etching and then throwing away a PCB.

    2: I always drive LEDs from pins with their own series resistor connected to the pin, and all commoned to GND. Connecting the LEDs from +ve will cause them to light when the PIC provides a source to ground.

    3: At the frequencies you are hoping to monitor (60 Hz) it will be very hard to monitor whats happening with LEDs as the eye will not be able to register the pulses. Try setting the delays and pulse timing to something that you can see, possibly by some scale factor (say by a factor of 10). Once you have the code working with the correct sequence of pins going high and low with the correct delay at this factor, then you can scale it back.

    Just my 2p's worth

  7. #7
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    You guys are cracking me up! Of course I am using a dual trace scope and Pic_User has posted the correct waveform, which I have not been able to produce. I re-installed the software but that was no help. I like the idea of putting extra PAUSEUS in, I will try that.

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

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