programming for a dummy

Discussion in 'Embedded Systems and Microcontrollers' started by tibbles, Oct 3, 2009.

  1. tibbles

    Thread Starter Active Member

    Jun 27, 2008
    hi all
    apologies if im on the wrong forum.
    after years of putting it off ,i'd like to have a go at programming, i have no idea whats involved.
    a quick google revealed nothing but gobbldegook to me, is it that hard ?
    presumably, starting from scratch, i need a programmer unit, which can then plugged into the computer.
    and a program to transfer the code.
    i do have a fairly good electronics knowledge.
    some idea of costs?

    any help much appreciated
  2. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    If you are just getting started then you might want to try something like an arduino. It is an open source hardware platform that uses very common Atmel microcontrollers. They are inexpensive and can be programmed while on board through a USB cable. An Arduino Starter Kit from Sparkfun Electronics cost $60 and even gives you some quick prototyping components. The basic boards cost around $20.

    The language it uses is similar to C. There is a lot of example and source code freely available.

    Similar kits exist for Microchip microcontrollers, maybe someone with some more familiarity with them will post a link to give you a good idea of where to start with them...
  3. ElectroKen

    New Member

    Oct 3, 2009
    > I'm not the brightest color in the box but I know the Basic programming language and I wanted a microcontroller that understood Basic, and was cheap (around $5). I read a book about building robotics and they recomended the PIC microcontroller. So I bought a handfull. Now what?? How do I program it?? After reading about PICs online (hundreds of sites) I knew I needed a compiler.
    > After getting more online info, I found a site that had a free downloadable compiler, The compiler has tons of info attached to it by means of a forum like this one. The compiler understands my typed Basic commands such as;
    DIM, FOR/NEXT, IF/THEN/ELSE, GOTO, SUB PROCEDURE, and more plus libraries.
    > So I type in a program that will blink 8 LEDs in sequence. Now what?? Now the program gets converted from Basic and compiled into machine language that the chip needs. How do I do it cheaply?? There are programmers (chip burner) you can buy that is like a labratory-it has built in LEDs and input/output pins so connections can easily be made, or you can buy just the programmer like I did. To get one as cheap as possible I got mine from Ebay for $25 plust $10 shipping.
    > I connect the programming board to the PC with a dual USB cable, insert the chip onto the special Ziff socket, then ease the chip and I'm ready to burn. My 8 LED Sequencer program is in the PC, I tell the programmer to load that program, then about 15 seconds later it's complete.
    > On a breadboard (remember I'm cheap. I can't buy a PICkit) I place the chip, a 10K resistor, an 8 mhz ceramic oscillator, 8 330 resistors, 8 LEDs, and 6 volts. Blink, blink, blink, blink...
    > parts including the chip is 10 bucks, not including breadboard or power supply, and $35 for the compiler.
    > Learning about this stuff was hard. I had no one to talk to. Some forum members are so high and mighty that the won't help you because you are like a fly to them, a nusience.
    > I am here to help new PIKers if I can. You are bound to ask me something I don't know (there is alot I don't know. I'm new to this game myself), but I'll try.

    ElectroKen...Stop by and say hi...
  4. tibbles

    Thread Starter Active Member

    Jun 27, 2008
    thanks guys for taking the time, i really appreciate it, i'll give it a go over the next few days. and get back. im sure others will find this useful.

    i,m old enough to remember the early computers where we had to put in something called machine code,, programming a chip sounds a bit similar.

    thanks again
  5. tibbles

    Thread Starter Active Member

    Jun 27, 2008
    ps re breadboard
    i dont know whether i got a poor quality bread board but i absolutely hated it.
    what i do for a quick one off board ,i stick my artwork,( i use proteous) to some .1" perforated board.lining up the holes,( i use a tube of overlap adhesive,)and then use this as a guide to drill the actual pcb,then i just join the dots with the dalo pen.
  6. tibbles

    Thread Starter Active Member

    Jun 27, 2008
  7. ke5nnt

    Active Member

    Mar 1, 2009
    When looking at PIC programmers, check to see what devices are supported. I notice the programmer you're looking at only has a capacity for 18 pin chips, which is ok, but there are so many programmers that can support so many more pins, greatly increasing the number of microchip processors you can program with it.

    I have had a lot of success with THIS PROGRAMMER from ebay. I realize it ships from Hong Kong, but, it's cost is $36.00 (after shipping charges) which is pretty close to your 25 British Pounds, and supported devices are:
    Code ( (Unknown Language)):
    2. [COLOR=#666666][FONT=Verdana][COLOR=#666666][FONT=Verdana][COLOR=#666666][FONT=Verdana][COLOR=#666666][FONT=Verdana][COLOR=#000000][COLOR=#666666][FONT=Verdana][FONT=Arial][COLOR=#fb0034][LEFT][LEFT][COLOR=#000000][COLOR=black]10F[/COLOR][COLOR=black]200  16F202  10F204  10F206[/COLOR][/COLOR][/LEFT]
    3. [/LEFT]
    4. [/COLOR][/FONT][/FONT][/COLOR][/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][/COLOR][LEFT][COLOR=#000000][COLOR=#000000][COLOR=black]12F629 12F635 12F675[/COLOR][/COLOR][COLOR=black]12F683  12F508  12F509  12F510[/COLOR][/COLOR]
    5. [COLOR=#000000][COLOR=black]16C[/COLOR][COLOR=black]61  16C62  16C62A/B  16C63  16C63A  16C64  16C64A[/COLOR][/COLOR]
    6. [COLOR=#000000][COLOR=black]16C[/COLOR][COLOR=black]65  16C65A/B  16C66  16C67  16C620/A  16C621/A  61C622/A[/COLOR][/COLOR]
    7. [COLOR=#000000][COLOR=black]16C[/COLOR][COLOR=black]623  16C624  16C625  16C71  16C72  16C72A  16C73[/COLOR][/COLOR]
    8. [COLOR=#000000][COLOR=black]16C[/COLOR][COLOR=black]73A[/COLOR][COLOR=black]/B  16C74    16C74A/B  16C76  16C77  16C710  16C711[/COLOR][/COLOR]
    9. [COLOR=#000000][COLOR=black]16C[/COLOR][COLOR=black]712  16C716  16C745  16C765  16C773  167C774  16C923[/COLOR][/COLOR]
    10. [COLOR=#000000][COLOR=black]16C[/COLOR][COLOR=black]924  16C925  16C926[/COLOR][/COLOR]
    11. [COLOR=#000000][COLOR=black]16F[/COLOR][COLOR=black]627  16F627A  16F628  16F628A  16F630  16F636  16F639[/COLOR][/COLOR]
    12. [COLOR=#000000][COLOR=black]16F[/COLOR][COLOR=black]648A[/COLOR][COLOR=black]  16F676  16F684  16F688  16F73  16F74  16F76 [/COLOR][/COLOR]
    13. [COLOR=#000000][COLOR=black]16F[/COLOR][COLOR=black]77  16F716  16F737  16F747  16F767  16F777  16F83[/COLOR][/COLOR]
    14. [COLOR=#000000][COLOR=black]16F[/COLOR][COLOR=black]84  16F84A  16F87  16F88  16F818  16F819  16F870[/COLOR][/COLOR]
    15. [COLOR=#000000][COLOR=black]16F[/COLOR][COLOR=black]871  16F872  16F873  16F873A  16F874  16F874A  16F876[/COLOR][/COLOR]
    16. [COLOR=#000000][COLOR=black]16F[/COLOR][COLOR=black]876A[/COLOR][COLOR=black]  16F877  16F877A[/COLOR][/COLOR]
    17. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]242-2439  18F248  18F252-2539  18F442-4439[/COLOR][/COLOR]
    18. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]258  18F448  18F452-4539  18F458  18F1220  18F1320[/COLOR][/COLOR]
    19. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]2220  18F2320  18F4220  18F4320  18F2331  18F2431  18F4331[/COLOR][/COLOR]
    20. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]4431  18F6520  18F6620  18F6720  18F8520  18F8620  18F8720[/COLOR][/COLOR]
    21. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]2410  18F2420  18F2455  18F2480  18F2510  18F2515  18F2520[/COLOR][/COLOR]
    22. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]2525  18F2550  18F2580  18F2585  18F2610  18F2620  18F2680[/COLOR][/COLOR]
    23. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]4410  18F4420  18F4455  18F4480  18F4510  18F4515  18F4520[/COLOR][/COLOR]
    24. [COLOR=#000000][COLOR=black]18F[/COLOR][COLOR=black]4525  18F4550  18F4580  18F4585  18F4610  18F4620  18F4680[/COLOR][/COLOR][/LEFT]
    I've had great luck with this programmer. It's also USB, so in most cases you don't need an external power source for programming. It does not, however, have the LED test area that the board you're suggesting does. Not sure how important a feature like that is to you, all I can say is, do your research.

    Looking over the website you provided, it looks like that board ONLY supports the PIC16F84A-04/P. I can't find anything on the site or in the documentation to suggest otherwise. As you learn programming, you'll certainly want to use different PIC chips than just the 16F84A.
    Last edited: Oct 3, 2009