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

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
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
 

t06afre

Joined May 11, 2009
5,934
Last edited:

harry99932

Joined Dec 30, 2010
38
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
 

stanman11

Joined Nov 23, 2010
228
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.
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
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
 

t06afre

Joined May 11, 2009
5,934
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.
 

Markd77

Joined Sep 7, 2009
2,806
delay:
Movlw 0ffh
movwf 021h
dcrfzs 021h,0h
return
This should be:

Rich (BB code):
delay
movlw ffh
movwf count   ;can't put this inside the loop
loop
decfsz count, F   ;using W or F instead of 0 or 1 is much clearer
goto loop
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:
Rich (BB code):
cblock 0x20
count
foo
bar
....
endc
 

John P

Joined Oct 14, 2008
2,026
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.
 
Top