1 Replies - 2663 Views - Last Post: 05 March 2010 - 02:57 PM Rate Topic: -----

#1 m031  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-March 10

using hitech c compiler

Posted 05 March 2010 - 12:14 PM

HI,I am having a problem while writing a program to run stepper motor in c for pic 16f877a. I don't know how to use the port names. Can anyone help me out please??
I am using hi-tech c compiler.
Is This A Good Question/Topic? 0
  • +

Replies To: using hitech c compiler

#2 horace  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 291
  • View blog
  • Posts: 1,900
  • Joined: 25-October 06

Re: using hitech c compiler

Posted 05 March 2010 - 02:57 PM

View Postm031, on 05 March 2010 - 06:14 PM, said:

HI,I am having a problem while writing a program to run stepper motor in c for pic 16f877a. I don't know how to use the port names. Can anyone help me out please??
I am using hi-tech c compiler.

if you look in the HI-TECH doc directory you should find documentation, e.g.
C:\Program Files\HI-TECH Software\PICC\9.70\docs

in the program you include the header
#include <htc.h>


which will include the header for the particular PIC16 you are using

you then use the port names so
        TRISD6=0;               // RD6 is LED output
        RD6=1;                  // set LED
        while(1)
        {                                        
            RD6=!RD6;      // invert LED to blink it
     ...


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1