you have mikroC, C18 and hi tech C to choose from. And everybody has their preference. First, try all the C's and see which suits you.
The first step to you perform is draw a flowchart describing the working you expect.
+++
if you are new to programming PICs you need get some understanding of how to operate the IO pins and use a timer, e.g. setiing TRIS bits and LAT bits etc
start with some simple programs, e.g.
1. implement a for() loop blinking a LED on/off
2. read a switch using the on/off value to switch an LED on/off
3. using a timer blink LED on/off 1 second period
you now have the basic knowledge to start implementing the flowchart recommended in previous posts.
What do you mean by development board ? and i am using PIC 16f877A and my compiler is CCSare you using a development board? which microcontroller?
I am so thanks full but there is a problem , the microchip website has filtered in my country so i could not open the links , by the way do you CCS compiler has HELP in its options like other software or not because my version ccs_4.084 does not have!!!! and I want to know its my software problem or this compiler does not have HELP ?!!!!!!!!!development boards typically have a range of peripherals and are used to develop prototype systems before designing a PCB for the target project, e.g.
**broken link removed**
**broken link removed**
// blink two LEDs and copy a switch to LED
//
// connect SW2 ro RA0
// connect RD7, RD6 and RD5 to LEDs
#include <htc.h>
// delay function
void delay(int x)
{
int i;
for(i=0;i<10000;i++);
}
void main(void)
{
while (1){
RP0=1;
TRISA0=1; // RA0 is input
TRISD7=0; // RD7 is output
TRISD6=0; // RD6 is output
TRISD5=0; // RD5 is output
ANSEL=0; // set RA0 digital input
CMCON0=7; // "
RP0=0;
RD7=0; // initialise the LEDs
RD6=1;
RD5=1;
while(1)
{
RD5=RA0; // copy sw2 to LED
delay(1000);
RD7=!RD7; // invert LED
RD6=!RD6; // invert LED
}
}
}
Using the HI-Tech compiler on the Microchip mechatronics board this blinks two LEDs and copies the value of switch to an LED
thank you so much , can you explain more about pros and cons of HI-tech ? and compare it with CCS and micro C compilers ? because i am at the begin of the way and i am looking forwards to finding the best compiler for the C language and PIC microcontroller
cannot help with advice as I have not used the PIC16 for many years and then I only used the Hi-Tech compiler
Thank you very much , I want to instull a Hi-Tech compiler but , that Has some internal problem so can you introduce a free link ?
try downloading the lite version fromcannot help with advice as I have not used the PIC16 for many years and then I only used the Hi-Tech compiler
Thank you very much , I want to instull a Hi-Tech compiler but , that Has some internal problem so can you introduce a free link ?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?