Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 16
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
No birthdays today

Next birthdays
05/04 Matthew T. (35)
05/04 Amrit Deshmukh (60)
05/05 Alexandre (32)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Computer Science
« Previous topic | Next topic »   

PIC Noobie

1 2 3 
Move Thread LAN_403
Part Scavenger
Thu Jul 20 2006, 12:00PM Print
Part Scavenger Registered Member #79 Joined: Thu Feb 09 2006, 11:35AM
Location: Arkansas
Posts: 673
I'd like to get into microprocessors, but I'm having trouble figuring out what I need. Does anyone recommend a certain chip (cheap would be nice)? How about the ATTiny? Is there a good place to start learning? I feel a bit lost in the Google pages.

I'd like to run stuff like simple robots, LCD displays, high speed triggers, complex timers, etc.

Thanks.
Back to top
Tom540
Thu Jul 20 2006, 02:43PM
Tom540 Banned on 3/17/2009.
Registered Member #487 Joined: Sun Jul 09 2006, 01:22AM
Location:
Posts: 617
I guess it depends on what laungauge you plan on using. If it's c then you could go with anything and could just pic up a mouser catalog and find the processor with the fastest speed or maybe cheapest price. I use MBasic for PIC micros. I honestly wouldn't recomend them though they only suppport a few diffrent types. For basic I think melabs picbasic would be the best. They suppot pretty much the full line of PICS. Link2 Pics aren't the most powerful but theyre good for learning.
Back to top
...
Thu Jul 20 2006, 04:27PM
... Registered Member #56 Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
Well as to which pic... Go looking around on the microchip website until you find one that you like, then sample a few. You want the flashed based ones, the internal oscillators ones are nice, a/d is always good (you can reconfigure the pins to be normal i/o anyway) and uarts are always helpful (but you can emulate them in code if you can't get the type you want in the chip you want) I would stay in the pic12 or pic16 series for now. I good starting point would the the pic12f675 and pic16f877a for small and large jobs respectively.

From there... You need to decided what code to program in. I would stay away from assembly, as it will be tons more work than any of the other languages. I would choose either C or BASIC, basic if you are just getting started or C if you want to make really complicated programs or already know some C.

If you go for BASIC, I would also stay away from picbasic, as it is incredibly expensive. I would look into mikroelectronica's basic compiler 'mikrobasic' as you can get a fully functional trial that is good for a 2k program (pretty big) and is very reasonable for a full licence. I have used it, and it is a little finicky, but it seems to work well once you get the hang of it. It integrates with the dev boards they sell, but you don't need them, as it gives you the hex output you can feed to any of the home brew programmers.


If you want C, I would go for either MPlab from microchip (as that is what most people use, so there is code around and all of microchips examples work with it) or mikroelectronica's (as you get more free libraries, the student version of mplab is somewhat limited)

So to recap, build a diy serial port programmer (JDM programmer) out of scavanged parts, then sample some chips, then use the a free trial of a compiler... Can't go wrong tongue

And most importantly, have fun!
Back to top
Avalanche
Thu Jul 20 2006, 04:37PM
Avalanche Registered Member #103 Joined: Thu Feb 09 2006, 08:16PM
Location: Derby, UK
Posts: 845
If you don't mind shelling out a bit for a starter kit, I would recommend the Microchip PicKit 1. You basically get a little USB programmer, a couple of pic micros, and a cd containing MPLAB and a few demos of c compilers if you need them (use the hi-tech one!)

My favourite 'do anything' chip is the PIC16F684, it's a good chip to start with, and will do everything you mentioned. Microchip are quite good with samples too, so grab a few more micros as well cheesey
Back to top
...
Thu Jul 20 2006, 05:40PM
... Registered Member #56 Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
Actually I just realised that I have a pic1 starter kit laying around.... You want it? The programmer is nice, although the dev board is sorta useless (a multiplexed grid of led's and a pot)
Back to top
Tom540
Thu Jul 20 2006, 07:36PM
Tom540 Banned on 3/17/2009.
Registered Member #487 Joined: Sun Jul 09 2006, 01:22AM
Location:
Posts: 617
As far as expensive. Picbasic probably isnt the cheapest but going with mocrochip and using all thier tools will cost you a FORTUNE. you have to buy diffrent programmers for dip and surface mount and the programmers are expensive as well. The promate programmers require you to buy socktes for each type of pic and they cost about 150 each. Like ... said a DIY Programmer is good and cheap.

The Mbasic software and hardware is cheap but only supports a few types of pic but you can make good use of the in circiut progamming feature. There is a pro version and a regular as well. If youre good at programming or just really smart I'd say try the free trial PIC stuff use C and make your own programmer. I hope im not beating a dead horse or repeating too much of someone elses post since I'm at work and can't read through all the posts.
Back to top
...
Thu Jul 20 2006, 08:21PM
... Registered Member #56 Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
No one uses the programmers from microchip, but their 12f645 dev kit 'pic kit #1' is cheap/easy to use/supported by MPlab so it is a good choice (I think I got mine for about $30 on ebay with a few '625's)

If I am not mistaken most people take the assembly code produced by MPlab and burn it to the pic with the jdm software, unless mplab has support for the jdm programmer in which case you use it normally.

Doesn't mbasic require you to buy their 3rd party (just as expensive as a basic stamp) atom stamps?

Mikrobasic supports just about every pic known to man, and has compilers for avr's and other stuff (check out the mikroelectronica home page)
Back to top
Bjørn
Thu Jul 20 2006, 10:04PM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
The ATtiny is not a PIC but a chip from a different manufacturer.

For proper understanding of a microcontroller you should learn assembly. If you are really clever you should be able to pick it up in a day or so. There are just a handful of commands you need to learn.

Grab just about any PIC and start making LED flashers in assembly, when you get the hang of it after a day or two you can decide what direction to go in.

Here are two versions of the classic "free" serial programmer for the PIC:
http://sciencezero.org/electronics/com84.htm
Back to top
Tom540
Fri Jul 21 2006, 05:02AM
Tom540 Banned on 3/17/2009.
Registered Member #487 Joined: Sun Jul 09 2006, 01:22AM
Location:
Posts: 617
The basic atom is totally seperate. It's kinda like the basic stamp. You buy one for each project. However, the Mbasic software is like MPLAB from microchip only it uses basic not C. You then get the 59.00 dollar programmer and you can buy the pics from anywhere. It only supports a few dozen diffrent pics. Supoosedly theyre having an update soon that will support the PIC18F series.

Assembly is insane. None of the commands look like what they do and unless youre learning to program soley to understand how pics work then you migtht as well learn c or Basic just to get the job done. Assembly is the hard way basically doing it the hard way. Its like using a hand pump to fill your tire when you got an air compressor right next to you. It takes like a ton of lines of code just to do something simple like flash an LED.
Back to top
Wolfram
Fri Jul 21 2006, 06:35AM
Wolfram Registered Member #33 Joined: Sat Feb 04 2006, 01:31PM
Location: Norway
Posts: 971
If you want fast, efficient code, learn assembly. I don't know what you mean about commands not doing what they look like they would do. ADDWF = add W to F, COMF = complement F, INCF = increment F etc.

The argument that assembly is faster and takes up less space argument is not very relevant for the bigger chips that are very fast and have lots of code space, but for the smaller chips, assembler is essential.

What programming language you choose also depends on what you want to do. If you just want to get something done fast, C or Basic works fine. If you want very impressive programs that uses your microcontroller in the best way possible, assembly is the answer. If you are writing bigger stuff (like OSes and stuff like that), C is propably the best choice. If you are just coding to have fun, assembly is IMO the best choice.

It also depends on what controller you are writing code for. I've heard that x86 assembly is a mess. PIC assembly is pretty straightforward, I learned it in a day. ARM assembly is propably the most beautiful assembly you will find.
Back to top
1 2 3 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.