Mikroc for pic help needed!!!!!!!!!!

Thread Starter

mailus

Joined Jun 16, 2012
19
hello,,,,
i am beginner to microcontroller. i want to learn programming throw mikroc.
any body help me..... give some examples

doubt in pic16f84

how to read a switch from port A.
how to set RB0 as input & RB1-7 as output.
 

JohnInTX

Joined Jun 26, 2012
4,787
how to read a switch from port A.
how to set RB0 as input & RB1-7 as output.
Download the data sheet and read section 4 first. Even with C you have to know something about the underlying hardware.

After that, you'll have to rough out a problem-solving strategy (flow chart etc) that identifies all of the parts of your problem and create a step by step procedure to solve it. This step does not require a PIC, compiler or even a programming language. A pencil and paper will do.

Presumably, you know something about C. If not, learn the basics of its syntax and some common constructs (variables, loops, function calls etc).

Once you know what you have to do, combine what you have learned about the PIC I/O (how to use it and what it can do) with the C language as described by your compiler and write code that fits the job.

any body help me..... give some examples
There are lots of examples here that do simple things like flashing an LED. While you can learn a lot from reading good code, the best examples for learning are the ones you write and debug yourself.

I'm not familiar with your compiler but you should take a look at MPLAB-X with a free compiler and lots of tutorials.

Its a step-by-step process, have fun!
 
Top