Beggining with programing microcontrollers

Need help with C, C++, perl, python, etc?

Beggining with programing microcontrollers

Postby boschow » 2007-02-22 00:01

Hi all,
the situation at the company that i work is like this, we have a programmer that is programing a application for about a year and a half, since he is on contract the boss decided to start looking for another programmer and
asked me if i am in the mood to try. I accepted the challenge but the problem suddenly emerged in my mind, i have a little experience with programming PLCs, I wrote programs in SCL language that is similar to Turbo Pascal, but i have no experience with programing micro controllers, that is why i have to ask you guys for some type of advises:
1. What should i know about the micro controller before starting to program?
2. Which book to you suggest to get familiar with the programing?
3. What programing language should i choose for programing ?
4. Please write any type of advice that you think i might found useful.

Thanks a lot for your answers and for your help,
best regards,
BoSCHoW.
boschow
 
Posts: 2
Joined: 2007-02-21 23:58

Re: Beggining with programing microcontrollers

Postby njkt » 2007-02-22 01:18

boschow wrote:1. What should i know about the micro controller before starting to program?

2. Which book to you suggest to get familiar with the programing?

3. What programing language should i choose for programing ?

4. Please write any type of advice that you think i might found useful.



All i can really suggest is that you become very familiar with Assembly programming and logic because you'll likely be programming all structures yourself
User avatar
njkt
 
Posts: 39
Joined: 2006-07-29 08:43
Location: California

Postby Ed Hall » 2007-02-22 03:39

I'm not sure if this woud be immediately helpful for your job, but I would take a look at the PICMicro tutorials on line and study how they work. I'm fond of the 16F628 as a basic one to work with. You can use several computer programs to build the code and simulate the operation. After you get familiar with the 16F628, you can move to more complex devices.

You should learn assembly language, although C is also mentioned in the on line tutorials. The 16F628 only has 35 instructions in its set and they are fully documented in the chip .pdf file available from Microchip.

Here are a couple of sites if you're interested in trying my suggestions. The first one has you building boards for experiments. If you want to go with hardware testing, you can breadboard or follow the author's advice for the boards, but you can also do a lot of the testing with simulators.

http://www.winpicprog.co.uk/pic_tutorial.htm is a tutorial page that can get you started. As I mentioned above, you don't need to build the hardware devices to start. You can run some of the programs in the simulator. Of course, any that expect interaction, such as pressing a switch, won't simulate well. But, you can get a feel for how they work.

http://www.microchip.com/ makes the PICMicro controller chips and is a source for the documentation

When you move to the hardware you will need a programmer capable of programming the 16F628, if that's the direction you head. Programs you will want to look at for linux OSs will be:

gputils (includes a compiller to create the hex code from assembly code)
gpsim (allows you to simulate the running of the program in the chip)
PICPrg (allows you to program the chip with a hardware programmer)

I hope this is of some help in getting you started. I'm having lots of fun with my PICMicro programming - the best part is that I have successfully moved the entire process to linux with available open source programs and some help from this forum. Thanks guys!

Good luck with your new endeavor, BoSCHoW.

Take Care,
Ed
Ed Hall
 


Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable