Help getting started

Discussion in 'Embedded Systems and Microcontrollers' started by magnadyne, Mar 4, 2008.

  1. magnadyne

    Thread Starter Member

    Mar 4, 2008
    16
    0
    Hello,

    I am wanting to start a project, but there are several questions rolling around my head even before I start that I am hoping you may be able to help me answer.

    My project in general would be a device that takes the place of a switch pannel. Instead of having several physical switches you just have a couple buttons to scoll to what switch you want to turn on, and another button to actually turn it on or off. I would have this device trigger relays so output voltage shouldn't be too much of an issue.

    This seems like an easy job for a PIC of EPROM, but I have absolutely no programming experiance with this. I am also not sure if this is the right path to go down.

    If something like a PIC would work, what one do I choose?

    Is there halfway inexpensive software out there to help me program it?

    Any other suggestions would be appreciated.

    Thanks
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Electronic cats may be skinned in lots of ways. What are you switching? It's very different if it's 5KV @ 25 amps, or audio signals. How many signals?
     
  3. magnadyne

    Thread Starter Member

    Mar 4, 2008
    16
    0
    I was looking to replace a switch panel in my vehicle. (12v system)
    Specifically my lights on my Jeep. :)

    These are all turned on & off by a 12v switch powering a relay. I figued it wouldn't be too hard to control these relays with a PIC.

    Your thoughts...
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Not at all hard. The PIC can't drive the relays directly, but you can use FET's or transistors for that.
     
  5. magnadyne

    Thread Starter Member

    Mar 4, 2008
    16
    0
    Great! I am hoping to make something that will control 4 pairs of lights, or 4 "switches".

    Is there a chip that would work better for this than another? Minimum requirements?

    I ordered a programmer, so I am ready to enter the world of microcontrolellers. :)
     
  6. magnadyne

    Thread Starter Member

    Mar 4, 2008
    16
    0
    I was planning on starting with the famous PIC16F84. Will this be good enough to get me going, or is there something better suited I should be looking for?
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Make sure that the programmer you purchased is able to program the PIC you have chosen.

    hgmjr
     
  8. 0xFF

    Member

    Feb 26, 2008
    12
    0
    The 16F84 is obsolete -- unless you have them on hand, I'd recommend something newer. If you've got code examples for the 16F84, the 16F628, 16F627 and 16F88 chips are much cheaper, pin compatible with the 16F84, and offer more features -- such as built in oscillator, built in UART, I2C and more timers to name a few.

    Most, if not all, modern programmers can program, and even debug, an 'F88.

    Where to start is a tough question -- do you know any programming languages, such as C? It depends on where you want to go with the knowledge you're going to obtain. Personally, I learned assembler first which gave me a true, low-level understanding of how the uC operates. Now, I program in C -- but that stems from my programming background in which I was already familiar with the language. I didn't start with C as it hides a lot of what is going on with the uC -- I wanted to fully understand what was happening before I started hiding things.

    That said, I have found no problems with programming under the MPLAB environment -- in both assembler and C18. I mention this as it is a FREE suite that will, most likely, meet all your needs. You can find both of the software packages on Microchips website. I also mention this as if you DO plan on programming in C, you may wish to look at the 18F series chips (which you'll need to use if you use the C18 compiler), such as the 18F1320 -- which is also pin compatible to the 16F84.

    I hope that helps you make a few educated decisions! :)
     
  9. magnadyne

    Thread Starter Member

    Mar 4, 2008
    16
    0
    It does, thank you.

    I have done very little VB, BASIC, HTML. While I understand the very basics of most programming languages, I have never really gotten good at any. I am not a programmer so they have always been something I have half learned because of something I have wanted to make or do. (Just like this situation here.)
    Something easy to understand and program would be great at first. I plan on expanding the features of this device as I learn, but for now baby steps.
     
  10. 0xFF

    Member

    Feb 26, 2008
    12
    0
    Absolutely! You have to start somewhere! I think we've all done the "Hello World" project to get our feet wet!

    As for "something easy to understand and program" -- well, I don't want to start a language war here, so I'll defer the question! ;) Besides, I could only tell you what I, personally, find easy to understand -- that's going to change from person to person.

    You need to have a look at your options and choose one that you, personally, feel would be the best choice for YOU. I love assembler -- I can get anything I want done, but I find it tedious, taking much longer to develop applications. As I said above, I now use C -- simply because I was familiar with the language -- but I still use inline assembler from time to time.

    I've got a buddy who has just started with Swordfish Basic and he loves it (he comes from an assembler background as well).

    Unfortunately, you're going to have to make that decision. On the bright side, I'm sure there is someone here who has tried just about any compiler that you can find -- so, if you have questions about a specific language / compiler, fire away!
     
  11. wakhyudwi

    New Member

    Apr 1, 2008
    1
    0
    You may try to start with simple cases, such as port addressing, simple programming etc.

    if you need some example, you may visit http://sainteknika.890m.com
     
Loading...