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.

Using C to program a PIC??

Status
Not open for further replies.

Enigma

New Member
Hey!
I’m new to programming PICs. I’m building a robot that follows a white line. I need to program it. The robot is going to be designed around a Mitsubishi M16C/62 board. I was wondering how I would go about programming it in C rather than assembly. What software I would need to do this? Would I just write the program in C and let the compiler do the rest (converting it to assembly). Which language would it be easier to program the robot in (C or assembly). I really would be grateful for any help!

Arigato
^_^
 
In my opinion C is a better choice especially in a higher end processor like your M16C. Using C lets you ignore a lot of irritating assembly stuff and focus on your application. A little knowledge of assembly is useful though because it will let you write faster C code if you remember what assembly instructions it will be compiled into.

In order to program in C you need a compiler. Be careful though- different microcontrollers need different compilers because of their different instruction sets. Just to let you know a PIC is a brand of microcontroller rather than a generic term your M16C is also a microcontroller - not a PIC. To find out what compiler you need contact Renesas (they now own all of Mitsubisi's microcontrollers) and they will let you know what you need.

Brent
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top