L.e.d


Closed Thread
Results 1 to 40 of 40

Thread: L.e.d

  1. #1
    Join Date
    Oct 2007
    Posts
    15

    Default L.e.d

    Hi, i go to college and my teacher randomly said make a circuit containing L.E.D and micro-controllers. However i have no idea how to program a micro controller an i don't have any softwares to do this. Can anyone give me some advise please?

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


    Did you find this post helpful? Yes | No

    Default

    Is this an electronics class?
    Does your school have a programmer?

    Goto microchip.com and download MPLAB (free), but you will also need some parts and a programmer.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Which Mplabs should i get because there are several downloads available to download from

  4. #4
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Hi, i have downloaded MPlabs (the correct one) but i have no idea on how to use it.
    Can anyone help?
    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    Most of the information needed is in the help file, but I know it can be daunting the first time through.

    So to better help you.
    What programming language do you plan to use?
    What are you planning for a programmer?
    What PIC chips do you have available?
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    I prefer English
    Well i am planning to make an electronic game where a button is pressed and L.E.D flashes and create a pattern and the micro controller controls which ones to flash
    I don't know which Microchip is the best though.
    thanks

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


    Did you find this post helpful? Yes | No

    Default

    I prefer English
    funny
    The closest thing to English I know of is PIC BASIC, so you are in the right place.

    Your project is a good one to work up to, but you need to start with one LED blinking, add a button and so on.

    There are several chips that would work, I will recommend the16F676. This chip has an internal oscillator, ADCs, comparators, and I think pretty cheap. The data sheet is only 130 pages

    Now, what about a programmer? Do you or your school have one? (not a person, a device)
    Dave
    Always wear safety glasses while programming.

  8. #8


    Did you find this post helpful? Yes | No

    Default

    dont forget you can get free samples from microchip website. something like 2 or 3 each of 3 different types. stay away from the cheap ebay jdm programmers if at all possible. they look like a good deal but aside from learning the hard way not worth the 10 bucks i saved.

  9. #9


    Did you find this post helpful? Yes | No

    Default

    oh and i'd probably start with a 16f628a or similar. the simpler the better for starting out.

  10. #10
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    No my school is a Noob they don't have anything.
    Which programmers would you recommend?
    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    I woud go with the PICKIT2 Starter KIt http://www.microchipdirect.com/Produ...eid=6&lmid=602

    And here is how to make PIC BASIC work with MPLAB http://www.melabs.com/support/mplab.htm
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Smile How to use basis

    I got some idea on how to use basis but i don't exactly knoq how to program the process i want.

    Also the microchip you recommended for me '16F676' is good but i couldn't find out how many pins and inputs it has. Can you help me please?

    Thanks you

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


    Did you find this post helpful? Yes | No

    Default

    Hi Marty,

    Have you got PIC BASIC yet? and a programmer?

    Go to Micro Chip's web site for the data sheet and read it. The data sheet tells everything about every pin on the chip.

    To make a LED blink :
    Code:
    LOOP:             'label
    HIGH PORTC.5    'makes the pin output a positive voltage  
    PAUSE 100         'will pause for 100 milli seconds
    LOW PORTC.5     'makes the pin zero voltage
    PAUSE 100
    GOTO LOOP        'starts over
    Dave
    Always wear safety glasses while programming.

  14. #14
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Marty,

    Since the assignment didn't specify PIC's as the microcontroller. And since it's such an easy project...

    I think you'll be much happier using a Basic Stamp.
    No programming hardware required (other than your computer).
    No messing with oscillators and config settings and analog pins and ... and ... and ...

    Many people here started out with Basic Stamps, Me included.
    None of them will ever go back to Stamps after using PIC's, but it's a MUCH better place to start.

    You'll have it up and running the first day or 2.
    With PIC's It might be a Week or 2.

    http://www.parallax.com
    <br>
    DT

  15. #15
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Cool Basic

    Hi i have got all the items i need to create my project but i do not know how to use BASIC and i've researched how to do it but i found nothing. Can anyone help me?
    Also is there any 32 pin microchip with 16 outputs?
    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    Are you going to use a Basic Stamp or a straight PIC chip.
    Dave
    Always wear safety glasses while programming.

  17. #17


    Did you find this post helpful? Yes | No

    Default PickAxe - simpler and cheaper than the Parallax Stamp

    For the lowest cost system, have a look at the PickAxe. It is very similar to the Parallax Stamp but much cheaper, at least downunder. There are plenty of examples and the entire system can cost as little as $45. Additional PicAxe chips are $10 - $45. Available from many places. Here is one to start.

    http://www.microzed.com.au/18pin.htm

    HTH
    Brian

  18. #18
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Cool Joining pics together

    Hi i am not going to use BASIC Stamp because i already got one similar to it but now i need a pic with at least 16 outputs and i found several but there are quite expensive so i thought about connecting one of the outputs of a pic with an input of another pic.
    Would this be possible?
    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    You could do that, but for a first project it would be a nightmare.

    Go to microchip.com and look at their sample program. They give free samples!

    I would point you to 16F877A for starters.
    Dave
    Always wear safety glasses while programming.

  20. #20


    Did you find this post helpful? Yes | No

    Default

    The 16F877A is a nice start is rather friendly. I personally like the 18F series though. I find they are easier to configure. At least for selecting the ADC ports.

  21. #21
    Join Date
    Jul 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Picaxe

    Marty,

    I STRONGLY suggest you to go with Picaxe chips. Much easier to start with and most of what you will learn will be usefull if you later want to 'upgrade' to picbasic. I DID IT and enjoyed it.

    You will be able to do almost everything you can do with picbasic too, but it's not as fast because the program is interpreted instead of being compiled (no hex files). On top of that you will NOT need to pay for a compiler and you don't need a programmer (hardware) either. And you know what, a picaxe is just a microchip PIC with a bootloader and an interpreter!

    Look at their forums, they are very friendly with newbies.
    http://www.picaxeforum.co.uk/

    J-P

  22. #22


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Go to microchip.com and look at their sample program. They give free samples!

    thought I already mentioned that. lol

  23. #23
    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 nomad View Post
    thought I already mentioned that. lol
    Yup, but when the high cost was mentioned I figured it needed said again.
    Dave
    Always wear safety glasses while programming.

  24. #24
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Hi, my electronic teacher has suggested me to connect 2 pic's together but i don't have a clue how to. Can someone help me please

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


    Did you find this post helpful? Yes | No

    Default

    You can hook two PICs together with some sort of serial communication but again for a first project I would not recommend.

    The basic idea is to send a command from PIC#1 to PIC#2. When PIC#2 receives a command it will execute an operation. The manual tells how to get started with serial comms.

    Have you blinked a LED with one chip yet?
    Dave
    Always wear safety glasses while programming.

  26. #26
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Wink

    Yes i want control over around 16 L.E.Ds but i cannot find a pic with 16 outputs so i thought connecting 2 pic together would be a better solution. Which command should i send from pic 1 to pic 2?
    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    Marty,

    For your first project I strongly recommend using just one chip. There are plent of PICs with 16 and more IOs.

    The 16F877A-I/P would be a good one to start with. At least I like it. 33 I/Os.
    http://www.microchip.com/stellent/id...cName=en010242
    But if you look here you can find others. Just make sure your programmer will support it. And get something in the "F" , 16Fxxxx. These are flash memory.
    http://www.microchip.com/ParamChartS...g=en&pageId=74

    If you still want to use two the send part would look something like this.
    Code:
    SEROUT PORTC.4,T2400,[9,3] '9 is the character the receiving
                                               PIC is waiting for, 3  is the command
    The receiving code
    Code:
    SERIN PORTC.4,T2400,[9],net  'when  9  is received  the  next  
                                       character  is  written  to  variable  "net"
    
    IF net = 3 THEN Do something
    Here is a simple example of how to control more LEDs than you have pins.
    http://www.mackrackit.com/mac/www/dave/LED/LEDs.html
    Dave
    Always wear safety glasses while programming.

  28. #28
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Cool

    Hi, i want to buy the micro controller - pic 28x but i don't know its code name (e.g. PIC 16F87X) can anyone tell me its name please?
    Also i need to programme my pic after i've purchased it but i can't find any resources to help me learn to programme it. Can anyone suggest a good source which could help me pleasE?

    Thank you very much!

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


    Did you find this post helpful? Yes | No

    Default

    Hi Marty,
    Are you still working on that school project? If it is finished, how did it go?

    I am not sure what you mean by 28x, do you want a chip with 28 IOs?
    In the previous post on this thread several chips were recommended, if you can give some detail of the planned project we can help you choose a starter chip. But again, all of the ones recommended are good for starters and will also be good for more advanced projects in the future.

    A good source for learning? When (if you do not have it yet) you get you copy of PIC BASIC, the manual has example code for all of the commands. There are more examples on MELABS web site, and I like www.rentron.com also.

    Most of all, hang out on this forum and follow the questions and answers from others, some of the topics may not be clear at first, but sooner or later they will.
    Dave
    Always wear safety glasses while programming.

  30. #30
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I am not sure what you mean by 28x, do you want a chip with 28 IOs?
    Maybe the SX28 from Scenix/Ubicom?

  31. #31
    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 skimask View Post
    Maybe the SX28 from Scenix/Ubicom?
    Never heard of it
    Dave
    Always wear safety glasses while programming.

  32. #32
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Never heard of it
    Really? You serious?
    I love them for those quick and dirty fast jobs...especially those older 75Mhz parts...work great as a multi-channel 555 replacement type thing.

  33. #33
    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 skimask View Post
    Really? You serious?
    I love them for those quick and dirty fast jobs...especially those older 75Mhz parts...work great as a multi-channel 555 replacement type thing.
    Yeah, I have used them, I was being a smart _ _ _
    Dave
    Always wear safety glasses while programming.

  34. #34
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Yeah, I have used them, I was being a smart _ _ _
    I kinda figured, but wasn't 100% sure...
    Sometimes ya just don't know for sure...

  35. #35
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Smile

    the pic im after is '' www.rev-ed.co.uk/picaxe/images/picaxe28x.jpg ''

    Im in the process of soldering my components in but my school doesnt provide a 28 pin pic so i need to purchase it myself.

    Thanks for the website but is there any more simplier sites that just tells you what code does what?

    Thank you :P

  36. #36
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Marty View Post
    the pic im after is '' www.rev-ed.co.uk/picaxe/images/picaxe28x.jpg ''
    Im in the process of soldering my components in but my school doesnt provide a 28 pin pic so i need to purchase it myself.
    Thanks for the website but is there any more simplier sites that just tells you what code does what?
    Thank you :P
    That isn't a PIC, that's a PICAXE, something similar but different than what this forum deals with primarily.
    As far as simple goes, you can't get much simpler than a PICAXE, except for maybe a BASIC stamp..or maybe LOGO on an Apple IIe.

    That website (http://www.rev-ed.co.uk/picaxe/) practically leads you by the hand from purchase to first ready made finished program, both software and hardware.

  37. #37
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    What is the difference between a pic and a picaxe? I've already started my circuit with that picaxe so i can't change it but il build some other ciruits with a pic in the future.

    By the way, people in this forum are electronic engineers and not other engineers right?

    Thank you

  38. #38
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Marty View Post
    What is the difference between a pic and a picaxe? I've already started my circuit with that picaxe so i can't change it but il build some other ciruits with a pic in the future.
    PIC = standalone microcontroller, comes from the factory blank, no code, does nothing. Call it a dumb blonde standing in a desert...she's capable of a lot, but doesn't have any instructions or anything to do, or any common sense (that's a stretch )

    PICAXE = standalone microcontroller which is pre-programmed with a basic set of instructions which act on code downloaded to it's internal eeprom and runs that code according to it's program in flash. (back to the dumb blonde --- ) Call this one a blonde with a job assembling something, or coaching a game, or directing traffic.

    You can yell at the dumb blonde all day and not get anything accomplished because she doesn't know anything.

    You can yell at the blonde with a job to do something different because she's got directions.

    You can make a PIC into a PICAXE by programming it with the core code... (give the dumb blonde some direction and a job)... Or make the PIC into something resembling a PICAXE by giving it a completely different job like lighting up some lights or something...i.e. writing your own program.

    You can make a PICAXE into a PIC by erasing it completely... (fire the dumb blonde and drop her off in the desert)... Or make the PIC into something resembling a PIC or a PICAXE by giving it a completely different job like lighting up some lights or something...i.e. writing your own program.

    See where the similarities are?

    By the way, people in this forum are electronic engineers and not other engineers right?
    Not neccessarily... I ain't got no degree in nothing... (good grammar eh?)

  39. #39
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Cool

    Lol i thought people here would be all professors etc... maybe its just you? Joking :P

    i've got 1 more question and that is if i buy a PICAXE 28 ( Noobie stuff) do i have to buy the programmer which is '' PICAXE 28x starter pack '' or can other programmers to program it?

    Have you anyone got examples of BASIC they could show me because i know some of the codes but im not sure how to apply it...

  40. #40
    Join Date
    Oct 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Wink

    Heyy i've almost completed my project now but i need to buy an ABS box to fit my PCB inside to make it look like a electronic game. Does anyone know where i may be able to buy them? I need them to be around 140mm by 140mm or bigger.

    Thanks! :P

Members who have read this thread : 1

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