programming problem with the HI-TECH PICC and C complier

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
ke
Posts: 4
Joined: Thu Jan 18, 2007 6:45 pm

programming problem with the HI-TECH PICC and C complier

Post by ke »

I used to do a lot of projects with MPLAB programming, now I got multiprogrammer to be programmed by sourceboost, when I am programming, the two compliers mentioned don't recognize the a lot registers for example the register to configue the A to D converter, Timer, CCP and says "unrecognied identifier" by the way I wonder how the clock frequency can be measured accurately, if it is generated by crystal (I can't rotate the potentiometer to exactly 8MHz that I really need.)

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

If the clock is driven by a crystal then the frequency is set to that of the crystal. The potentiometer only adjusts the frequency in RC mode.

Registers in BoostC are lowercase.

Code: Select all

porta = 0x00;    //Set Port A = 0
status = 0;        //Set Status = 0
portb = 0xFF;    //Set Port B = 255
You may need to locate the header file for you PIC, copy it into the local program folder and include it into your code

Code: Select all

#include "p16f84.h"
The header files are normally based near the BoostC compiler in an include folder.

Post Reply