High Level Language for PICs

Discussion in 'Programmer's Corner' started by Iodem_Asakura, Oct 5, 2005.

  1. Iodem_Asakura

    Thread Starter Senior Member

    Sep 14, 2004
    140
    0
    I have heard of some compilers on C and Basic to program PICs, but i don't know much abouit that. Can you give me some information. I have only programmed PICs using his about 35 instructions set in assambler language.
     
  2. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    143
    Have a look at the following Technical Documentaion page for Microchip PIC Microcontrollers:

    http://www.microchip.com/stellent/idcplg?I...GrpID=PIC%20MCU

    Select your device and it will return a series of downloadable pdf files for the microcontroller of your choice. You should be able to find a C language reference manual from the search results, amongst other things.

    I do recommend looking around the Microchip website since it contains some very useful information.
     
  3. pebe

    AAC Fanatic!

    Oct 11, 2004
    628
    3
    If you are already using assembler and are happy with it, then I suggest you stay with it. It makes for the most efficient use of code and you have control over all aspects of your programing.
     
  4. Iodem_Asakura

    Thread Starter Senior Member

    Sep 14, 2004
    140
    0
    I know i have more control programming in assambler. But i think i can do some things more quickly (and still be eficient) using other High Level Language.
     
  5. Overclocked2300

    Senior Member

    Apr 24, 2005
    124
    0
    You could always use PIC BASIC and PIC BASIC PRO. Those are easy languages.
     
  6. king_rero

    New Member

    Oct 10, 2005
    4
    0
    Hi
    whould mind if give me good compiler name or link!
     
  7. Overclocked2300

    Senior Member

    Apr 24, 2005
    124
    0
    Umm I beleave the people who make the pics have free software (compliers etc) on their site (microchip.com)

    I myself would like to get into C because you can do more (well the programing is more simplified) but I have to get started in PIC BASIC first
     
  8. king_rero

    New Member

    Oct 10, 2005
    4
    0
    Ok, Many thanx indeed.
    BUT
    exactly I need just a simple led program for 16f877a
    Because I've built a multipic programmer and I wanna test it so please help me
     
  9. Overclocked2300

    Senior Member

    Apr 24, 2005
    124
    0
    Well what do you want the program to do? Do you want the LED to flash? Blink Once? Or stay on? Theres a number of things you can make an LED do.
     
  10. king_rero

    New Member

    Oct 10, 2005
    4
    0
    At first thank u 4 care
    I wrote some one but I've confused I hope that my code is wrong .....
    any way my code is normal , flash an LED on port A0 when Port A6 is high
    and my programmer successes in the programming at least as icprog told me and so winpic.
    Do you want the LED to flash?
    this what I want.

    many thanx again
     
  11. king_rero

    New Member

    Oct 10, 2005
    4
    0
    Hi again
    Here is my code I tested my multipic with,
    Code ( (Unknown Language)):
    1.  
    2. ;my first code for 16f877A
    3. ;Autor:king_rero
    4. ;<Email edited out>
    5. ;
    6. ;
    7. LIST    P=16F877a
    8. STATUS   EQU H'03'
    9. TRISA    EQU H'85'      ;TRISA REGISTER FOR SETUP OF PORTB
    10. PORTA    EQU H'05'      ;PORTA REGISTER TO DRIVE PORT B
    11. ;***SET UP PORT A IN & OUTPUT****
    12.     BSF     STATUS,5    ;SWITCH TO BANK0 TO SET UP PORT B
    13.     MOVLW   B'110000'   ;RA0,1,2,3 ARE OUT, RA4,5 ARE INPUT
    14.     MOVWF   TRISA       ;
    15.     BCF     STATUS,5    ;SWITCH BACK TO BANK0 TO USE PORT B
    16. ;******************MAIN LED PROGRAM*******************************
    17.    
    18. MAIN    BTFSS   PORTA,4
    19.     GOTO    MAIN
    20.     MOVLW   B'000011'       ;Turn the LED on by first putting
    21.         MOVWF   PORTA           ;it into the w register and then  
    22. END
    23. [CODE=rich]
    24. and I used HS crystal and tried RC oscillator,BUt ......
    25. Nothing gonna be good!!!!!!!
    26. sometimes my 16f877A earased by himself and when I checked it up with
    27. multipic it's really earased!!!!!
    28. for real I completely wondered....
    29.  
    30. Thank you[/CODE]
     
Loading...