How to start MAP lab IDE v8.33 for PIC16F676..?

Discussion in 'Programmer's Corner' started by RRITESH KAKKAR, Mar 7, 2012.

  1. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hello,

    I am new to map lab i want to know how to start it...
    please help me to start with PIC 16f676 with blinking LED like 555 chip...as table.


    thanks
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Last edited: Mar 7, 2012
    RRITESH KAKKAR likes this.
  3. harry99932

    Member

    Dec 30, 2010
    38
    2
    checkout the tutorials on googlium electronics website, they were brilliant when i started and includesorting out linker files etc in mplab. sometimes they dont open properly (not sure if its my end or there server but if the tutorials are down let me know and i might be able to scan a hard copy to email you

    cheers harry
     
    RRITESH KAKKAR likes this.
  4. stanman11

    Member

    Nov 23, 2010
    230
    4
    the first thing you do is create new project.
    this will allow you to select the chip you using.
    from there it will open up new windows and other such things i havent figured out myself.
     
    RRITESH KAKKAR likes this.
  5. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    I don't find there any MAP lab tutorial..
    please help me to start.
    after that what to do..?
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    RRITESH KAKKAR likes this.
  7. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hi,

    I want to make a program which will glow LED on pressing external switch...please help.
     
  8. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    C or Assembler ;)
     
  9. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Only assembly...
     
  10. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Did you manage to write a program blinking a LED?
     
  11. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Bcf status,rp0 'bank zero
    movlw 00h
    movwf porta

    bsf status,rp0 'bank 1
    Movlw 00h
    movwf trisa

    bcf status,rp0 'bank 0
    start:
    movlw 00h
    movwf porta
    call delay
    movlw 0ffh
    movwf porta
    call delay
    goto start

    delay:
    Movlw 0ffh
    movwf 021h
    dcrfzs 021h,0h
    return
     
  12. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    How do you set the configuration bits. Do you set them in MPLAB or not at all. I am asking because this is very important. You should also for your sake set this in the code. And it is also very hard for other to help then this information is not in the code.
     
    RRITESH KAKKAR likes this.
  13. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    sorry??

    I am using OSHON simulator, can we do simulation in map lab if yes please tell how?
     
  14. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    This should be:

    Code ( (Unknown Language)):
    1. delay
    2. movlw ffh
    3. movwf count   ;can't put this inside the loop
    4. loop
    5. decfsz count, F   ;using W or F instead of 0 or 1 is much clearer
    6. goto loop
    7. return
    This will still be too fast for the eye to see if your oscillator is 4MHz

    You can declare variable names at the start of the program, it's much clearer than just using numbers for the files:
    Code ( (Unknown Language)):
    1. cblock 0x20
    2. count
    3. foo
    4. bar
    5. ....
    6. endc
    7.  
     
    RRITESH KAKKAR likes this.
  15. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Is MAP lab MPLAB?

    You can get several free compilers for the PIC processors, which run under MPLAB. I think it would be much better if you wrote your code in C rather than assembly.
     
    RRITESH KAKKAR likes this.
Loading...