+ Reply to Thread
Page 2 of 3
First 1 2 3 Last
Results 16 to 30 of 31

Thread: Blinking LED using PWM - PIC18f4520

  1. #16
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    I would run it through MPLAB's simulator, you can watch any I/O pin including PWM waveforms.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/


  2. #17
    arhi Excellent arhi Excellent arhi Excellent arhi Excellent arhi Excellent arhi Excellent
    Join Date
    Apr 2008
    Location
    Belgrade, .rs
    Posts
    832

    Default

    attach a scope and look at the signal. That is the easiest way if you own a scope. If not then some simulator (MPLAB, ISIS, OshonSoft ..)

    the CCPRXL is there to change duty cycle ... the duty cycle defines the ratio between on and off cycle so if DC is 100% the signal is effectively 100% ON, if DC is 0% the signal is effectively OFF, and if DC is 50% the signal is effectively half time on and half time off ...

    Check figure 15-4 on page 144 of the datasheet....

  3. #18
    Ecappp Newbie
    Join Date
    Apr 2009
    Posts
    16

    Default

    Thanks for all the replies. They have been very helpful.

  4. #19
    fightstar Newbie
    Join Date
    Jun 2009
    Posts
    16

    Default

    hi everyone, im adam from france im 20
    im in an internship now ,

    im working on an interactive panel of monochrom leds, i have done the scheme on the electronic board using a pic18F4520 via TLC 5940 for driving 16 leds plus 2 IR leds "one transmits the signal while the second receives it" in order to blink leds just by moving one's hand upon the panel, i have beeen inspired by the schemes with "arduino" micros already done on the web by other people , and i tried to do the same with the pic , i think im ready for the next level by programming the 16 leds ,I HAVE TO DO IT WITH c language, but as im not that good with C , i hope you could give me some help through this study,

    i have done the same with my pic http://students.washington.edu/acleo...5940_close.png

    YouTube - Interactive LED Panels: New version, white LEDs its the concept but that is analogic , im using microcontroler so as to be programmed in a digital way

  5. #20
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    Give Swordfish BASIC a try. Very easy to learn & use.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  6. #21
    3v0
    3v0 is offline
    3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent
    Join Date
    Jul 2006
    Location
    USA
    Posts
    6,463
    Blog Entries
    11

    Default

    He has to do it in C Bill.

    Do it like you would any project.

    Break the problem down into parts and write code for each part.

    I would start by writing a function to light and combination of LEDs.
    Please post questions to the forums. PM's are for personal communication.

    BCHS/3v0's Tutorials
    Junebug USB PIC programmer kit., USB Bit Whacker,
    The 15 Minute Printed Circuit Board! (+drill time)

  7. #22
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    Ahh, then it's a good time to learn C, I had to learn it a short while ago it's not so bad.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  8. #23
    fightstar Newbie
    Join Date
    Jun 2009
    Posts
    16

    Default

    hi guys ,

    i gave up with PIC18F4520 and mplab, i have bought an arduino atmega 168 board , and i have done the circuit connecting it with a tlc 5049and 16 leds , i have found some libraries in arduino software it's very helpful than the mplab , now my circuit works and my leds blink ,but i have to connect the whole thing with 2 photo IR diodes, the first emmits and the second receives so as to get an interactive panel with leds blinking just by moving my hand upon the circuit , so my problem remains in how can i connect these IR photodiodes on the test board , ihave followed some instruction on some websites on how to connect them but , im not getting any results , please , my internship period of time is running out unfortunately , i have to get it done this week . thanks for any suggestions
    i ve been based on many ancient projects similar to mine coz im using exactly the same components but unfortunatly it doesnt contain IRleds for interactivity , you can understand more , by seeing these links thanks tlc5940arduino - Google Code "photodiodes"
    Photo-Reflectors
    YouTube - Interactive LED Panels: New version, white LEDs you will understand more with this vid , but this one is an analogic panel (without) microcontroller , me i have to do it with microcontroller that's why ive chosen arduino instead of pic , btw i have a confusion abt using phototransistor or photodiode , they play the same role but i dont knw whiwh one i can use to be with the diode that receives plus i dont knw how to get them on the board , ive tried different schemes but it didnt work thanks

  9. #24
    be80be Excellent be80be Excellent be80be Excellent be80be Excellent be80be Excellent be80be Excellent
    Join Date
    Aug 2008
    Location
    morristown,tn
    Posts
    2,000

    Default

    phototransistor or photodiode
    Don't make good switches by themselves if you want something easy use IR module. And IR led use the pwm to send out 38khz pulses with the led and when you run your hand over it it will bounce down and trigger you module. You'll need to shield the IR led with some heat shrink tubing.
    Burt

  10. #25
    fightstar Newbie
    Join Date
    Jun 2009
    Posts
    16

    Default

    hi all,

    my problem is that i can't find eagle 4.09r2 libraries for tlc4950 and ARDUINO MINI, i've already tested some examples found on the net but all of them was conceived for eagle 5.6.0 and that wasn't accepted by the 4.09 version .so i'm really pissed off , it's making me sick ,lol, i don't know where to get them,

    thank you for all suggestion

  11. #26
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    Why not update your Eagle software?
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  12. #27
    fightstar Newbie
    Join Date
    Jun 2009
    Posts
    16

    Default

    i dont thnk its upgradable , i dont knw how , any other suggestions thanks

  13. #28
    fightstar Newbie
    Join Date
    Jun 2009
    Posts
    16

    Default

    how to create in version 4.09r2? i've succeeded in creating the package , and the symbol but when i go to create the device and click on "add" i just cant find the symbol that i created in order to make the connections between the symbol and the package .

    ps : when i go to look at the libraries i only find the package not the symbol besides him as all the components are

  14. #29
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    Guess you're not using the free version. Contact Eagle about a license upgrade.
    The free version should have no problem with a small PCB.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  15. #30
    fightstar Newbie
    Join Date
    Jun 2009
    Posts
    16

    Default

    someone told me i should export the libraries of the 5.6 version as a script to my 4.09 version, but i dont knw how , thanks for any suggestions

+ Reply to Thread
Page 2 of 3
First 1 2 3 Last

Similar Threads

  1. I2C in PIC18F4520
    By hmk in forum Electronic Projects Design/Ideas/Reviews
    Replies: 3
    Latest: 18th February 2009, 12:12 PM
  2. New To Pic18f4520
    By sokalpunx in forum Micro Controllers
    Replies: 3
    Latest: 7th November 2008, 08:08 PM
  3. Pic18F4520
    By jster28 in forum Micro Controllers
    Replies: 2
    Latest: 3rd December 2007, 08:49 PM
  4. PIC18f4520
    By lihsheng in forum Micro Controllers
    Replies: 1
    Latest: 20th November 2007, 09:27 AM
  5. help with pic18f4520
    By MenessFreak in forum Micro Controllers
    Replies: 8
    Latest: 24th November 2006, 06:04 AM

Tags for this Thread