Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Code used for PIC programming?

Status
Not open for further replies.

Clyd3

New Member
Hi, I'm new to PICs, but have decided to try out the tutorial by Nigel Goodwin. Links from http://www.winpicprog.co.uk, but I have not quite got the cash for it yet, so I went through the tutorial briefly, without actually doing anything. Now I have lots of questions:
1. What languages can one use to program PICs
2. If the language with all the hexidecimal stuff in the tutorial is assembly,
. how do I do simple mathematics things like multiplying, and where can
. I learn more PIC assembly?
3a. What compilers could I use, if I didnt do it in the hex language?
3b. If I could say used C++, what compiler would I use.
4. What language do you suggest I should use, where can I learn this
. language, and how can I use it (compilers, etc.)

Hope I dont make you tired with all the questions, thanks,
 
I recommend reading the tutorials here... **broken link removed**

This is how i first learned how to program/use PICs and that was only a few days ago and i already have a good understanding of the basics.
 
Clyd3 said:
Hi, I'm new to PICs, but have decided to try out the tutorial by Nigel Goodwin. Links from http://www.winpicprog.co.uk, but I have not quite got the cash for it yet, so I went through the tutorial briefly, without actually doing anything. Now I have lots of questions:
1. What languages can one use to program PICs

There are various languages, but assembler is very important, if you don't have a reasonable understanding of assembler you can't effectively use a high level lanuage.

2. If the language with all the hexidecimal stuff in the tutorial is assembly,
. how do I do simple mathematics things like multiplying, and where can
. I learn more PIC assembly?

My tutorials aren't really intended for absolute beginners, they basically provide working examples for you to experiment with. To multiply you simply do what high level compilers do, load the values into registers and call a subroutine - but you need to write (or download) the subroutine.

3a. What compilers could I use, if I didnt do it in the hex language?

Most popular are BASIC or C, although there is a free language called JAL (Just Another Language) which seems fairly popular.

3b. If I could say used C++, what compiler would I use.

C++ would be a waste of time really, most of the ++ bits aren't very relevent to PIC, but there are plenty of C compilers available to buy - but they are expensive. You can usually download limited demo versions.

4. What language do you suggest I should use, where can I learn this
. language, and how can I use it (compilers, etc.)

Hope I dont make you tired with all the questions, thanks,

I would suggest you learn assembler, there's only 35 commands, and it will help you greatly if you move to C or BASIC later.

Don't forget, all the compiler is doing is converting your code to assembler, that's all the PIC understands - not even that really, machine code is what it understands, but assembler is a human version of that.
 
Learning Assembler

So where do I learn these commands?
 
Tutorials

Yeah, I did, awesome, just what I needed. Thanks a lot man. :D

I am still waiting for my PICs to arrive though, as I cant just ride down the road and pick them up (I live in South Africa, but I love it here). :cry:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top