Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: switchblade on January 25, 2009, 05:51:51 PM

Title: Newbie.....line following robot
Post by: switchblade on January 25, 2009, 05:51:51 PM
hey guys I have decided to build a line following robot for my final year project and I have never attempted this before. I have decided to either go with the PIC 16F616 or the 16F84A. I have all the features such as:
line following with the light sensor array
obstacle detection
Motor control

but i dont know about the compiler......can i write any program in c++ and use a compiler to translate it to PIC language??
also what are the good ones...........CCS C Compiler but have no clue how to use it

can you guys help me on this??

Title: Re: Newbie.....line following robot
Post by: cosminprund on January 26, 2009, 01:56:03 AM
PIC models before PIC18 lack the kinds of instructions required for an C compiler to work properly (specifically they're very inflexible in addressing mode). There are C compilers that do work with PIC16's and PIC12's but they can't do what the MCU can't do. I've only used the HI-TECH "C" compiler for the PIC16.

From the PIC18 up the MCU has an much better instruction set that makes an compiler easier - and you can use the free C18 compiler from Microchip!

IF you want to program in C/C++ you'll need to look at PIC18 or at AVR's!