hi-tech language

Discussion in 'Embedded Systems and Microcontrollers' started by micro1, Mar 10, 2015.

  1. micro1

    Thread Starter Member

    Feb 22, 2015
    52
    0
    hi-tech language
    what is meant be 0X00 ,0XFF ,0X80 , 0X03 and goto?

    Capture.PNG
    Captu1re.PNG
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    You are using Hi-Tech C. Hi-Tech is (was?) the conpany. And you are using their version of C.

    Those are hexadecimal values, as per the C specification.

    The goto seems to be a holdover from assembly, but I have never used it.

    Have a look at the user's manual.
     
    Last edited: Mar 10, 2015
    micro1 likes this.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    0x (zero and the letter x) is the standard way to designate a hexadecimal number, so this is the same as saying 0, 3, 255, and 0 again. Very helpful when setting bits. one day you will grow to love doing just that.

    "goto" means just that: go to the address defined by the lable, here "line1". So it is the same as a jump command. Note the lable is arbitrary but must not be repeated.
     
    micro1 likes this.
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Oh please don´t use gotos when you write your code. They should be allowed to use in only a few very specific cases, and definitely not as a general way to write code. Any unexperienced coder who uses goto will 99 out of 100 times make the ugliest mess of spaghetti code that he nor anyone else will be able to understand just a week later. Learn how to use functions and blocks instead, and how to write nice and understandable code.
     
    micro1 likes this.
  5. micro1

    Thread Starter Member

    Feb 22, 2015
    52
    0
    OK very nice
    what is meant by FOSC ? (( __config (FOSC_HS & WDTE_OFF..........)
     
  6. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It references the oscillator. You've, effectively configured the PIC for a high-speed crystal to make your oscillator.

    What it stands for, you'd have to ask the people that decided on it...
     
    micro1 likes this.
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    It seems time for you to RTFM: Read The Fine Manual that comes with the compiler to explain these things.

    Much faster than asking here too!
     
    micro1 likes this.
Loading...