1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PWM on a PIC

Discussion in 'Microcontrollers' started by AtomSoft, Apr 7, 2008.

  1. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    When I was doing this I used a photransistor to see the modulated signal on the scope. If you can do that you have IR.

    Then I used a cheap IR reciever to detect modulated bursts. If that works you have the modulation/PWM working.

    After that worked I worried about what data I was sending.
     
  2. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    i know it sends the signal i see it blinking with a web cam and i know how to receive a signal i just have to get more chips so i can make the receiver and emitter boards... i cant fully test a signal without sending one out and receiving it on another board.
     
  3. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    Ahh but maybe there is another way, download the NEW PICkit2 2.50 software and run the IR LED lead to the Logic Analyzer tool, it will capture the datastream, you could turn off the modulation just to see the bitstream.
    It's an awesome new tool.
    [​IMG]
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US

    cool i seen this in another post from you.. will look into it but i might try converting my code to a lower end pic with pwm...(maybe) but its still a doubt..
     
  6. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    That logic tool will capture your IR datastream.
     
  7. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    i would have to download / update the picKit 2 software to get it?
    How would i use it
     
  8. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    i have latest software but how would i connect to june? what pins? and i suspect on the 1320 right?
    EDIT:
    1 = VPP/MCLR
    2 = VDD Target
    3 = VSS (ground)
    4 = ICSPDAT/PGD
    5 = ICSPCLK/PGC
    6 = Auxiliary
     
    Last edited: Apr 12, 2008
  9. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    Well
    Ch1 = PGD = RB1 (DIP SW-4 TX)
    Ch1 = PGC = RB4 (DIP SW-5 RX)
    It's also possible to use RB6 & RB7 (the programming pins)
    To use Aux you'll need a jumper from RB3 to AUX.
     
  10. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
  11. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The most common mistake people make is to build a system and expect it to work. It is far better to test it as you build it. Heathkit (possibly the worlds best ever kits) made extensive use of the test as you build approach. That is the approach I am suggesting here.

    The web cam shows you the IR is there, but with the scope and photo-transistor you can see the actual modulated signal as the IR receiver would see it.
    The Xmiter is just a IR LED or two and a resistor.
    To the receiver end you need is a photo-transistor and IR receiver from your local radio shack. About $5 for both.

    The IR receiver will confirm that you have the 38/40KHz modulation right. Most go low when the modulated IR is present.

    If that works all you have to do is send the right data.

    The PICkit LA could be used to look at what your are sending to the IR LEDs and to what the IR receiver (maybe photo-transistor) is getting.
     
  12. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    Then Zenith bought them, possibly the worst TVs ever made.
     
  13. Krumlink

    Krumlink New Member

    Joined:
    Aug 10, 2007
    Messages:
    2,080
    Likes:
    20
    Location:
    Michigan, USA
    Zenith makes really good Flyback Transformers...
     
  14. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    :( :( :( :( :(

    Do you suppose you could come up with a kit for a really nice tuner/amp/AV home theatre system ? :D

    Got to turn off that smart XXX switch.
     

Share This Page