What do I need to get started? - Page 1
Forum section: electronics / general

author: Peter1964
author_rank: Contributor
timestamp: January 11, 2015, 02:28:08 pm
content: Hi EEV'sI want to do a timer-project and was at first looking at old-school timer IC's and so on.We are in the modern computer-age now - so I decided on a micro controller like PIC16F628A and a 2 by 16 lcd display to show what is going on.Now the problems starts.What hardware (beside the PIC) should I buy?What software to do C or Pascal programming?It only for hobby so I do need something that works but not cost a fortune.I did take a look at a lot of videos and articles on the net - but it seems kind of confusing and some very expensive.I am a programmer (that is what I do for a living).Regards Peter

author: mc
author_rank: Regular Contributor
timestamp: January 11, 2015, 03:36:00 pm
content: Hardware - whatever you need to program your chosen chip, and whatever else it needs to run.Software - C, or some variety of C.Personally, for somebody new to this, I'd be more inclined to recommend something Arduino.You can pick up cheap Arduino clones for not much money, they have everything onboard to program them, and the Arduino IDE is free. The Arduino IDE is a bit simplistic and uses C++, however there are lots of examples to get you going, and if you then want to use C, you can.I know lots of people criticise those that use Arduino, but I think it's a very good complete solution for anybody looking to use micros for the first time.Another option would be some of the ARM development boards that work with the mbed system.As a beginner, I'd avoid jumping straight into any of the more commercial orientated systems, as they can prove to be very overwhelming if you've never programmed a chip before.

author: dannyf
author_rank: Super Contributor
timestamp: January 11, 2015, 03:50:37 pm
content: QuoteYou need a programmer and whatever additional devices you may need - like transistors, lcd displays, buttons, etc.I use pickit2 a lot and really likely it. If you want to use newer parts, get a pickit3 for example.QuoteDepending on your approach. Most people code in C. For pic10/12/16/18 parts, you can get XC8 + mplab or mplab x. For pic24/32 parts, I would recommend C30/32 + emblocks. I have found the lower-end PICs easy to work with but hard to code for.If you haven't settled on the PIC, I think you should consider other alternatives, like the AVR, or STM8 or the newer 32-bit chips - they offer much better value but have much steeper learning curves too.

author: Wilksey
author_rank: Super Contributor
timestamp: January 11, 2015, 05:36:07 pm
content: Get yourself a PIC dev kit, all you really need is a button and LEDs, I had a PICKIT 2 starter kit years back which included a small PIC dev board, they probably have one similar now with the PK3, personally I would use the PK3 as support is better for them on later chips and with the MPLAB IDE, same as the ICD2 vs ICD3, I now use the 3's as support is much better.Look on the usual, Element14 / Farnell, Digikey, RS, Mouser, etc for kits

author: picandmix
author_rank: Frequent Contributor
timestamp: January 11, 2015, 06:12:56 pm
content: You have details above for both the Arduino and Pic options which I can add little to.However , you said Pics , so wonder what has taken you towards them ?A cheap ebay Arduino Uno clone is the simplest and most complete way to get going, though C++ can leave you a bit remote from the detailed functions of the micro.With Pics and C you have a more detailed approach or even Assembly if you want to really get down low and dirtyWhile everyone thinks of getting hardware programmer and dev board, don't forget you do not actually need them to get programming.Arduino and Microchips IDEs are free as are the programming languages C++, Assembly and versions of C,; plus there are free Simulators where you can draw your circuit and run your code, so you can really try before you buy.There are also masses of free tutorials /ytubes/projects for all the mentioned programming languages, even ones for doing exactly what you mention, just search and have a good look around and see how things are done and enjoy !

author: mathsquid
author_rank: Frequent Contributor
timestamp: January 11, 2015, 06:33:42 pm
content: Quote from: mc on January 11, 2015, 03:36:00 pmI agree with this completely. For someone new to microcontrollers, there's a lot to be said for having an integrated toolchain/IDE and not needing any extra hardware to program it with. I'd recommend starting with an arduino nano, a breadboard, some LEDs and resistors, and an LCD module.

author: nctnico
author_rank: Super Contributor
timestamp: January 11, 2015, 06:36:28 pm
content: Look at this thread:https://www.eevblog.com/forum/microcontrollers/introducing-the-arm-pro-mini-board-arm-made-eazy/It doesn't get much easier. Why bother to mess with an obsolete architecture like PIC?

author: miguelvp
author_rank: Super Contributor
timestamp: January 11, 2015, 07:05:49 pm
content: Get something that has good documented projects that are easy to follow, for example:http://www.element14.com/community/thread/23736/l/100-projects-in-100-days

author: Peter1964
author_rank: Contributor
timestamp: January 11, 2015, 08:16:00 pm
content: I have now looked at Arduino and think I will get a Nano Rev. 3 board and a LCD1602 Keypad Shield for Arduino - the rest I do have (breadboard and a lot of electronic).I am in denmark and here are links to those two:Uno Rev. 3:https://www.elextra.dk/main.aspx?page=article&artno=H31941LCD with keypad:https://www.elextra.dk/main.aspx?page=article&artno=H36463This will get the fun begins with a ATmega328 microcontroller.One question I did not find an answer to are: Can I take out the chip and solder it into a real board and have a running project? (This I can with a PIC)I read somewhere the chip need a Bootloader? Is that right and how do one do that?The goal will be to have a chip soldered into a finished project where the code are fixed even without power - still Arduino?Thanks for advice in this manner.

author: Thor-Arne
author_rank: Unknown
timestamp: January 12, 2015, 07:44:55 am
content: Quote from: Peter1964 on January 11, 2015, 08:16:00 pmThe 328 chip comes with the bootloader already loaded when you buy a Arduino.You can buy the 328 with the bootloader already loaded, or use a programmer to copy the one you have.When using the 328 in a circuit you only need a crystal and a couple of capacitors.

author: westfw
author_rank: Super Contributor
timestamp: January 12, 2015, 08:22:50 am
content: QuoteYes. You'll need a bit of support circuitry (crystal or resonator, bypass caps); the same as you would with a PIC.Also, on the "real board" you will lose the ability to talk to the chip via plug-in USB cable (unless you replace that capability on your board.)

author: picandmix
author_rank: Frequent Contributor
timestamp: January 12, 2015, 10:23:49 am
content: Quote from: Peter1964 on January 11, 2015, 08:16:00 pmThink you can find a lot cheaper boards on Ebay than those you mention.This clone even has a couple of user switches built on to the board for a fraction of the price.http://www.ebay.co.uk/itm/Version-Board-ATmega328P-UNO-R3-CH340T-Instead-16U2-USB-Cable-for-Arduino-UK-BT-/111468707118?pt=UK_Computing_Other_Computing_Networking&hash=item19f40d7d2ehttp://www.ebay.co.uk/itm/Hobby-Components-Uno-R3-fully-arduino-compatible-Free-USB-Cable-/141365503458?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item20ea0a65e2Same with the lcd shield.http://www.ebay.co.uk/itm/HOBBY-COMPONENTS-UK-LCD-1602-16x2-Keypad-Shield-For-Arduino-/131142448379?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1e88b2f4fbHave both boards and both worked well for ages..

author: dannyf
author_rank: Super Contributor
timestamp: January 12, 2015, 12:05:01 pm
content: -Can I take out the chip and solder it into a real board and have a running project? (This I can with a PIC)-The answer to that is a little convoluted.If you want to use the boot loader to program the chip, you will have to have a crystal at a minimum.However, you can use the arduino IDE to code and the resulting hex file can be burned into the chip via a standalone programmer. This approach allows you to use the internal rc oscillator, like on your pic.I buy a lot of arduino clones and never used its boot loader.

author: dannyf
author_rank: Super Contributor
timestamp: January 12, 2015, 12:22:17 pm
content: Just so you know, you can simply buy an avr, plus a programmer, and burn the boot loader to it, then you have an arduino.The chip will be a couple dollars and the programmer another couple.Alternatively, the newer Leonardo is like 10 USD off eBay.

author: Lesterwyatt
author_rank: Regular Contributor
timestamp: January 12, 2015, 04:27:29 pm
content: I have used Aurduino for many projects, and for a beginner it's great because it's quite strait forward to get a project up and running. However if your really interested in how your project runs under the hood I would suggest going for the pic16 and the pickit3 with MPLabx. And programming in assembler. There are plenty of books out there on the net. Just google. I have learned more in the last couple of months about micros then I ever did in 2 years with aurduino!Lester

author: Peter1964
author_rank: Contributor
timestamp: January 12, 2015, 07:32:14 pm
content: Quote from: Lesterwyatt on January 12, 2015, 04:27:29 pmMy worry with MPLabx are the price of a compiler - really expensive.Never thought going the assembler way - but I actually do understand assembler, did code an OS for a Motorola 68000 years ago.

author: picandmix
author_rank: Frequent Contributor
timestamp: January 12, 2015, 09:04:39 pm
content: QuoteMplabX has a perfectly useable free compiler XC8 should you need it.MPlab X and even the old MPlab IDE V8.92 ( PC only) come with Assembler built in.Suggest you load one up and start a little Assembler project off and see if you can follow it.You don't have to buy any books, masses of tutorials and info.Heres just one , its done using the old Mplab but should be easy enough with Mplab X.The chip used is the 16f84 which can be readily replaced with the 16f628AHave a try, plenty of help here ...http://www.amqrp.org/elmer160/lessons/If you are using a PC and want to download the old style MPlab V8.92 for that tutorial you can download it from here.It runs ok alongside X if you have it installed already.http://www.microchip.com/pagehandler/en-us/devtools/dev-tools-parts.html

author: Peter1964
author_rank: Contributor
timestamp: January 14, 2015, 01:11:04 am
content: Thank you all for advise.I have now bought an Arduino UNU board (original verision to support the project) and some LCD screens to get started.I have installed:Arduino IDEFritzing - to be able to do schematics and order PCB's - maybe there are a better tool for free - well I will make a donation so not completely free.I skipped the assembler idea. I like the C-style better.Regards Peter

author: Brutte
author_rank: Frequent Contributor
timestamp: January 14, 2015, 04:55:43 pm
content: Quote from: Peter1964 on January 14, 2015, 01:11:04 amMust be some niche product.AFAIK arduino is not debuggable. You are a programmer so I won't explain consequences of that. Besides, to debug these AVR tinies you have to use Atmel's dW debugger ($50) and ASes (Atmel Studio) as nothing else works with these.Not the smartest move.

author: Rick Law
author_rank: Super Contributor
timestamp: February 05, 2015, 11:12:42 pm
content: Quote from: Peter1964 on January 14, 2015, 01:11:04 amGood choice. The NANO V3 would be a good choice too, but would have given you a bit less available current when tapping into the 3.3V or the 5V pin.What about input? You need some way to say "Start Timer" and perhaps Time-for-how-long. You need a tac switch or something like that.If you have not purchased the LCD yet, consider the 20x4. It will give you a bit more screen space to display debugging messages/values as needed.